Date: Thu, 23 Jan 2020 01:35:02 +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: r357008 - head/sys/dev/netmap Message-ID: <202001230135.00N1Z2nK036030@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Jan 23 01:35:02 2020 New Revision: 357008 URL: https://svnweb.freebsd.org/changeset/base/357008 Log: In netmap() call ether_input() within the network epoch. Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Thu Jan 23 01:30:50 2020 (r357007) +++ head/sys/dev/netmap/netmap.c Thu Jan 23 01:35:02 2020 (r357008) @@ -437,11 +437,13 @@ ports attached to the switch) #include <sys/socketvar.h> /* struct socket */ #include <sys/malloc.h> #include <sys/poll.h> +#include <sys/proc.h> #include <sys/rwlock.h> #include <sys/socket.h> /* sockaddrs */ #include <sys/selinfo.h> #include <sys/sysctl.h> #include <sys/jail.h> +#include <sys/epoch.h> #include <net/vnet.h> #include <net/if.h> #include <net/if_var.h> @@ -1146,9 +1148,11 @@ netmap_dtor(void *data) static void netmap_send_up(struct ifnet *dst, struct mbq *q) { + struct epoch_tracker et; struct mbuf *m; struct mbuf *head = NULL, *prev = NULL; + NET_EPOCH_ENTER(et); /* Send packets up, outside the lock; head/prev machinery * is only useful for Windows. */ while ((m = mbq_dequeue(q)) != NULL) { @@ -1160,6 +1164,7 @@ netmap_send_up(struct ifnet *dst, struct mbq *q) } if (head) nm_os_send_up(dst, NULL, head); + NET_EPOCH_EXIT(et); mbq_fini(q); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001230135.00N1Z2nK036030>