diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-03-28 21:12:39 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-04-16 15:56:32 +0000 |
commit | 8062f37d1c99ded250b36ad90fb32bb5f77ee600 (patch) | |
tree | e538dc390aa886a71357a93859b72db50931daf9 | |
parent | cc16c3c3cb5f166a2c743077ac8ec37f6af5c24a (diff) |
vtnet: set VNET context in RX handler
The context is required for NIC-level pfil(9) filtering.
(cherry picked from commit 3f2b9607756d0f92ca29c844db0718b313a06634)
-rw-r--r-- | sys/dev/virtio/network/if_vtnet.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 7d6411876b3d..245a6b6d7359 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2095,6 +2095,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) VTNET_RXQ_LOCK_ASSERT(rxq); + CURVNET_SET_QUIET(if_getvnet(ifp)); while (count-- > 0) { struct mbuf *m; uint32_t len, nbufs, adjsz; @@ -2188,6 +2189,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) #endif virtqueue_notify(vq); } + CURVNET_RESTORE(); return (count > 0 ? 0 : EAGAIN); } |