svn commit: r353654 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Wed Oct 16 16:32:58 UTC 2019
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();
}
More information about the svn-src-all
mailing list