Page MenuHomeFreeBSD

D34787.diff
No OneTemporary

D34787.diff

diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -4404,8 +4404,27 @@
}
static void
-vtnet_debugnet_event(struct ifnet *ifp __unused, enum debugnet_ev event __unused)
+vtnet_debugnet_event(struct ifnet *ifp, enum debugnet_ev event)
{
+ struct vtnet_softc *sc;
+ static bool sw_lro_enabled = false;
+
+ /*
+ * Disable software LRO, since it would require entering the network
+ * epoch when calling vtnet_txq_eof() in vtnet_debugnet_poll().
+ */
+ sc = if_getsoftc(ifp);
+ switch (event) {
+ case DEBUGNET_START:
+ sw_lro_enabled = (sc->vtnet_flags & VTNET_FLAG_SW_LRO) != 0;
+ if (sw_lro_enabled)
+ sc->vtnet_flags &= ~VTNET_FLAG_SW_LRO;
+ break;
+ case DEBUGNET_END:
+ if (sw_lro_enabled)
+ sc->vtnet_flags |= VTNET_FLAG_SW_LRO;
+ break;
+ }
}
static int

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 16, 5:32 PM (2 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27664027
Default Alt Text
D34787.diff (894 B)

Event Timeline