re: netmap: enable/disable krings on interface reinit
This prevents krings from being used during an interface reset, and notifies the active applications. See also 1d238b07d5d4d9660ae0. MFC after: 1 week
This commit is contained in:
parent
8aa8484cbf
commit
54bbcca4f9
@ -3360,6 +3360,10 @@ re_init_locked(struct rl_softc *sc)
|
||||
|
||||
sc->rl_watchdog_timer = 0;
|
||||
callout_reset(&sc->rl_stat_callout, hz, re_tick, sc);
|
||||
|
||||
#ifdef DEV_NETMAP
|
||||
netmap_enable_all_rings(ifp);
|
||||
#endif /* DEV_NETMAP */
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3608,6 +3612,10 @@ re_stop(struct rl_softc *sc)
|
||||
callout_stop(&sc->rl_stat_callout);
|
||||
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
|
||||
|
||||
#ifdef DEV_NETMAP
|
||||
netmap_disable_all_rings(ifp);
|
||||
#endif /* DEV_NETMAP */
|
||||
|
||||
/*
|
||||
* Disable accepting frames to put RX MAC into idle state.
|
||||
* Otherwise it's possible to get frames while stop command
|
||||
|
Loading…
x
Reference in New Issue
Block a user