HomeFreeBSD

iflib: add assert to prevent out-of-bounds array access

Description

iflib: add assert to prevent out-of-bounds array access

The iflib_queues_alloc() allocates isc_nrxqs iflib_dma_info structs
for each rxqset, and links each struct to a different free list.
As a result, it must be isc_nrxqs >= isc_nfl (plus the completion
queue, if present).
Add an assertion to make this constraint explicit.

MFC after: 2 weeks

(cherry picked from commit 4ba9ad0dc316940f32065b05f24259f942c0692d)

Details

Provenance
vmaffioneAuthored on Jan 10 2021, 1:49 PM
Parents
rG0b97b9ae187f: lualoader: fix lua-lint run
Branches
Unknown
Tags
Unknown