HomeFreeBSD

cxgbe(4): Save proper zone index on low memory in refill_fl().

Description

cxgbe(4): Save proper zone index on low memory in refill_fl().

When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it
falls back to safe (4KB) ones. But it still saved into sd->zidx
the original fl->zidx instead of fl->safe_zidx. It caused problems
with the later use of that cluster, including memory and/or data
corruption.

While there, make refill_fl() to use the safe zone for all following
clusters for the call, since it is unlikely that large succeed.

MFC after: 3 days
Sponsored by: iXsystems, Inc.
Reviewed by: np, jhb
Differential Revision: https://reviews.freebsd.org/D28716

Details

Provenance
mavAuthored on Feb 17 2021, 2:15 AM
Reviewer
np
Differential Revision
D28716: cxgbe(4): Save proper zone index on low memory in refill_fl().
Parents
rGaa5fef60bf66: linux: Update the i386/linux vdso deinitialization routine
Branches
Unknown
Tags
Unknown