HomeFreeBSD

o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE

Description

o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE

controller datasheet revision 3.3, in the context of Ethernet
MACs the control data describing the packet buffers typically
are named "descriptors". Each of these descriptors references
one buffer, multiple of which a packet can be composed of.
By contrast, in comments, messages and the names of structure
members, iflib(4) refers to DMA resources employed for RX and
TX buffers (rather than control data) as "desc(riptors)".
This odd naming convention of iflib(4) made reviewing r343085
and identifying wrong and missing bus_dmamap_sync(9) calls in
particular way harder than it already is. This convention may
also explain why the netmap(4) part of iflib(4) pairs the DMA
tags for control data with DMA maps of buffers and vice versa
in calls to bus_dma(9) functions.
Therefore, change iflib(4) to refer to buf(fers) when buffers
and not the usual understanding of descriptors is meant. This
change does not include corrections to the DMA resources used
in the netmap(4) parts. However, it revises error messages to
state which kind of allocation/creation failed. Specifically,
the "Unable to allocate tx_buffer (map) memory" copy & pasted
inappropriately on several occasions was replaced with proper
messages.

o Enhance some other error messages to indicate which half - RX

or TX - they apply to instead of using identical text in both
cases and generally canonicalize them.

o Correct the descriptions of iflib_{r,t}xsd_alloc() to reflect

reality; current code doesn't use {r,t}x_buffer structures.

o In iflib_queues_alloc():

  • Remove redundant BUS_DMA_NOWAIT of iflib_dma_alloc() calls,
  • change the M_WAITOK from malloc(9) calls into M_NOWAIT. The return values are already checked, deferred DMA allocations not being an option at this point, BUS_DMA_NOWAIT has to be used anyway and prior malloc(9) calls in this function also specify M_NOWAIT.

Reviewed by: shurd
Differential Revision: https://reviews.freebsd.org/D19067

Details

Committed
mariusFeb 4 2019, 8:46 PM
Reviewer
shurd
Differential Revision
D19067: Change iflib(4) to employ the usual convention of "descriptor"
Parents
rS343752: s/Maximal/Maximum/ in sysctl description.
Branches
Unknown
Tags
Unknown