if_vtnet: improve dumping a kernel
Disable software LRO during kernel dumping, because having it enabled requires to be in a network epoch, which might or might not be the case depending on the code path resulting in the panic. Reviewed by: markj MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D34787
This commit is contained in:
parent
613b4b7971
commit
53236f905d
@ -4404,8 +4404,27 @@ vtnet_debugnet_init(struct ifnet *ifp, int *nrxr, int *ncl, int *clsize)
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user