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.

Approved by: re@ (gjb@)
Sponsored by: iXsystems, Inc.
Reviewed by: np, jhb
Differential Revision: https://reviews.freebsd.org/D28716

(cherry picked from commit 294e62bebf36f873fd083d2fe8edd78919dda4e8)
(cherry picked from commit c930816b76713623ccdef09d682e41266c1d724f)

Details

Provenance
mavAuthored on Feb 17 2021, 2:15 AM
npCommitted on Feb 23 2021, 12:46 AM
Reviewer
np
Differential Revision
D28716: cxgbe(4): Save proper zone index on low memory in refill_fl().
Parents
rGae093a0614f3: libdtrace: Stop relying on lex compatibility
Branches
Unknown
Tags
Unknown