@@ -28,6 +28,36 @@ devlink dev info provides version information for all three components. In
2828addition to the version the hg commit hash of the build is included as a
2929separate 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+
3161Upgrading Firmware
3262------------------
3363
0 commit comments