tap(4) calls ether_input() in context of write(2). Enter network
epoch here. The tun(4) side doesn't need this, as netisr code will take care.
This commit is contained in:
parent
a44700782e
commit
af614b8e04
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357009
@ -1778,6 +1778,7 @@ static int
|
||||
tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m,
|
||||
struct virtio_net_hdr_mrg_rxbuf *vhdr)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct ether_header *eh;
|
||||
struct ifnet *ifp;
|
||||
|
||||
@ -1808,7 +1809,9 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m,
|
||||
|
||||
/* Pass packet up to parent. */
|
||||
CURVNET_SET(ifp->if_vnet);
|
||||
NET_EPOCH_ENTER(et);
|
||||
(*ifp->if_input)(ifp, m);
|
||||
NET_EPOCH_EXIT(et);
|
||||
CURVNET_RESTORE();
|
||||
/* ibytes are counted in parent */
|
||||
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user