HomeFreeBSD

netmap: refactor netmap_reset

Description

netmap: refactor netmap_reset

The netmap_reset() function is meant to be called by the driver
when they initialize (or re-initialize) a hardware ring.
However, since the introduction of support for opening (in
netmap mode) a subset of the available rings, netmap_reset()
may be called multiple times on actively used rings, causing
both kring and netmap ring to transition to an inconsistent
state.
This changes improves the situation by resetting all the
indices fields of the kring to 0, as expected after the
reinitialization of a hardware ring.

PR: 252518
MFC after: 1 week

Details

Provenance
vmaffioneAuthored on Jan 9 2021, 10:07 PM
Parents
rG3189ba61673a: netmap: iflib: fix asserts in netmap_fl_refill()
Branches
Unknown
Tags
Unknown