Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2019 16:32:58 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353654 - head/sys/net
Message-ID:  <201910161632.x9GGWwRx044958@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Oct 16 16:32:58 2019
New Revision: 353654
URL: https://svnweb.freebsd.org/changeset/base/353654

Log:
  do_link_state_change() is executed in taskqueue context and in
  general is allowed to sleep.  Don't enter the epoch for the
  whole duration.  If some event handlers need the epoch, they
  should handle that theirselves.
  
  Discussed with:	hselasky

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Wed Oct 16 16:26:35 2019	(r353653)
+++ head/sys/net/if.c	Wed Oct 16 16:32:58 2019	(r353654)
@@ -2313,11 +2313,9 @@ if_link_state_change(struct ifnet *ifp, int link_state
 static void
 do_link_state_change(void *arg, int pending)
 {
-	struct epoch_tracker et;
 	struct ifnet *ifp;
 	int link_state;
 
-	NET_EPOCH_ENTER(et);
 	ifp = arg;
 	link_state = ifp->if_link_state;
 
@@ -2345,7 +2343,6 @@ do_link_state_change(void *arg, int pending)
 	if (log_link_state_change)
 		if_printf(ifp, "link state changed to %s\n",
 		    (link_state == LINK_STATE_UP) ? "UP" : "DOWN" );
-	NET_EPOCH_EXIT(et);
 	EVENTHANDLER_INVOKE(ifnet_link_event, ifp, link_state);
 	CURVNET_RESTORE();
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910161632.x9GGWwRx044958>