]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE
authormarius <marius@FreeBSD.org>
Mon, 4 Feb 2019 20:46:57 +0000 (20:46 +0000)
committermarius <marius@FreeBSD.org>
Mon, 4 Feb 2019 20:46:57 +0000 (20:46 +0000)
commitad1f2c5455dbc6d314c7a64621ff21ad64e50da1
treefe6ad914d6b36ba5b645333832c5e12ee83f0940
parent8b153f7788b227fccf1748d2d1470c07098cf73f
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
sys/net/iflib.c