HomeFreeBSD

Fix iflib zero-length fragment handling

Description

Fix iflib zero-length fragment handling

The dmamap for zero-length fragments should not be unloaded, as doing
so breaks the the cluster-reuse logic in _iflib_fl_refill().

All zero-length fragments are now handled by the assemble_segments()
path so that the cluster-reuse logic there does not have to be
replicated in the small-single-fragment-packet path of
iflib_rxd_pkt_get().

Packets consisting entirely of zero-length fragments (which result in
a NULL mbuf pointer) are now properly tolerated. This allows drivers
(such as the vmx driver) to pass such packets to iflib when a
descriptor error occurs during packet reception, the advantage being
that the refill of descriptors associated with the error packet are
handled via the existing iflib machinery without having to duplicate
parts of that machinery in the driver to handle that error case.

Reviewed by: avg, erj, gallatin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23945

Details

Provenance
pkelseyAuthored on
Reviewer
avg
Differential Revision
D23945: Fix iflib zero-length fragment handling
Parents
rS358995: Fix iflib freelist state corruption
Branches
Unknown
Tags
Unknown