Skip to content

Commit 8b79380

Browse files
kuba-mooPaolo Abeni
authored andcommitted
docs: fbnic: explain the ring config
fbnic takes 4 parameters to configure the Rx queues. The semantics are similar to other existing NICs but confusing to newcomers. Document it. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent c22f056 commit 8b79380

File tree

1 file changed

+30
-0
lines changed
  • Documentation/networking/device_drivers/ethernet/meta

1 file changed

+30
-0
lines changed

Documentation/networking/device_drivers/ethernet/meta/fbnic.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,36 @@ devlink dev info provides version information for all three components. In
2828
addition to the version the hg commit hash of the build is included as a
2929
separate entry.
3030

31+
Configuration
32+
-------------
33+
34+
Ringparams (ethtool -g / -G)
35+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+
37+
fbnic has two submission (host -> device) rings for every completion
38+
(device -> host) ring. The three ring objects together form a single
39+
"queue" as used by higher layer software (a Rx, or a Tx queue).
40+
41+
For Rx the two submission rings are used to pass empty pages to the NIC.
42+
Ring 0 is the Header Page Queue (HPQ), NIC will use its pages to place
43+
L2-L4 headers (or full frames if frame is not header-data split).
44+
Ring 1 is the Payload Page Queue (PPQ) and used for packet payloads.
45+
The completion ring is used to receive packet notifications / metadata.
46+
ethtool ``rx`` ringparam maps to the size of the completion ring,
47+
``rx-mini`` to the HPQ, and ``rx-jumbo`` to the PPQ.
48+
49+
For Tx both submission rings can be used to submit packets, the completion
50+
ring carries notifications for both. fbnic uses one of the submission
51+
rings for normal traffic from the stack and the second one for XDP frames.
52+
ethtool ``tx`` ringparam controls both the size of the submission rings
53+
and the completion ring.
54+
55+
Every single entry on the HPQ and PPQ (``rx-mini``, ``rx-jumbo``)
56+
corresponds to 4kB of allocated memory, while entries on the remaining
57+
rings are in units of descriptors (8B). The ideal ratio of submission
58+
and completion ring sizes will depend on the workload, as for small packets
59+
multiple packets will fit into a single page.
60+
3161
Upgrading Firmware
3262
------------------
3363

0 commit comments

Comments
 (0)