Fix iflib freelist state corruption
This fixes a bug in iflib freelist management that breaks the required correspondence between freelist indexes and driver ring slots. PR: 243126, 243392, 240628 Reported by: avg, alexandr.oleynikov@gmail.com, Harald Schmalzbauer Reviewed by: avg, gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23943
This commit is contained in:
parent
30b5d9be24
commit
9e9b738ac5
@ -2072,7 +2072,9 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count)
|
||||
bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map,
|
||||
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
|
||||
ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx);
|
||||
fl->ifl_fragidx = frag_idx;
|
||||
fl->ifl_fragidx = frag_idx + 1;
|
||||
if (fl->ifl_fragidx == fl->ifl_size)
|
||||
fl->ifl_fragidx = 0;
|
||||
|
||||
return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user