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

(cherry picked from commit 294e62bebf36f873fd083d2fe8edd78919dda4e8)

Details

Provenance
mavAuthored on Feb 17 2021, 2:15 AM
npCommitted on Feb 22 2021, 11:55 PM
Reviewer
np
Differential Revision
D28716: cxgbe(4): Save proper zone index on low memory in refill_fl().
Parents
rGbc1df392499d: MFC 1c808fcd859f: Allocate BAR for ENA MSIx vector table
Branches
Unknown
Tags
Unknown