DCB-BUFFER(8)

๐Ÿ’– DCB-BUFFER ๐Ÿ’–

okay bestie, so this is dcb-buffer from the Linux manual, section 8 โ€” and it's literally the port buffer settings page for the DCB (Data Center Bridging) subsystem. she's niche, she's powerful, she knows exactly what she's doing. let's get into it ๐Ÿซถ


โœจ NAME โœจ

dcb-buffer โ€” show / manipulate port buffer settings of the DCB (Data Center Bridging) subsystem. yes, the whole thing. showing AND manipulating. she does both ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

dcb [ OPTIONS ] buffer { COMMAND | help }

dcb buffer show dev DEV [ prio-buffer ] [ buffer-size ] [ total-size ]

dcb buffer set dev DEV [ prio-buffer PRIO-MAP ] [ buffer-size SIZE-MAP ]

PRIO-MAP := [ PRIO-MAP ] PRIO-MAPPING

PRIO-MAPPING := { PRIO | all }:BUFFER

SIZE-MAP := [ SIZE-MAP ] SIZE-MAPPING

SIZE-MAPPING := { BUFFER | all }:SIZE

PRIO := { 0 .. 7 }

BUFFER := { 0 .. 7 }

SIZE := { INTEGER | INTEGERK | INTEGERM | ... }

likeโ€ฆ look at those little recursive map definitions. PRIO-MAP := [ PRIO-MAP ] PRIO-MAPPING? she's building herself. iconic behaviour honestly ๐ŸŒˆ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so dcb buffer is the tool you use to configure which port buffers your traffic gets assigned to, based on traffic priority โ€” and also how big those buffers are. two jobs, one little command, she's booked and busy.

and because she's generous, she can also do the reverse: peek at the current configuration to see what's set, plus the total device memory that the port buffers are taking up. vibe check on your buffers, basically โœจ


๐ŸŽ€ PARAMETERS ๐ŸŽ€

okay important note first, bestie, don't skip this:

for the read-write parameters, everything below describes only the write direction โ€” like, how you'd use them with the set command. when you're using the show command, you just drop the parameter name in as a plain keyword with no extra arguments. that's it. no map, no nothing. it tells the tool "show me this one value please".

and when you give no parameters at all, the tool shows you the complete buffer configuration. the whole fit. ๐Ÿ‘‘

  • total-size โ€” a read-only property that shows the total device memory taken up by port buffers. heads up though: this might be more than a plain sum of the individual buffer sizes, because there might be some hidden or internal buffers lurking in there doing their own thing ๐Ÿ™ˆ
  • prio-buffer PRIO-MAP โ€” this map uses the array parameter syntax (go read dcb(8) for the deets, iykyk). keys are priorities, values are buffer indices. for each priority, it sets the buffer that traffic with that priority gets directed to. so like, priority โ†’ buffer, one for one ๐Ÿ’ซ
  • buffer-size SIZE-MAP โ€” also array parameter syntax, also dcb(8), same energy. keys are buffer indices, values are the sizes of that buffer in bytes. the sizes can use the notation documented in the PARAMETERS section of tc(8). and ngl, real talk: the size you ask for can get rounded or capped by the driver to satisfy the requirements of the device. so you request a vibe, the driver decides the final number ๐Ÿ˜ญ

๐Ÿ”ฅ EXAMPLE & USAGE ๐Ÿ”ฅ

Configure the priomap in a one-to-one fashion:

# dcb buffer set dev eth0 prio-buffer 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7

Set sizes of all buffers to 10KB, except for buffer 6, which will have the size 1MB:

# dcb buffer set dev eth0 buffer-size all:10K 6:1M

the all: then the override? that's the move. set the baseline, then single out buffer 6 for the glow-up ๐Ÿ’…

Show what was set:

# dcb buffer show dev eth0
prio-buffer 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
buffer-size 0:10Kb 1:10Kb 2:10Kb 3:10Kb 4:10Kb 5:10Kb 6:1Mb 7:10Kb
total-size 1222Kb

look at her. look at the output. every priority mapped, every buffer sized, and the total-size right there at the end being the little summary queen she is ๐Ÿ‘‘


โญ EXIT STATUS โญ

  • exit status is 0 if the command was successful ๐Ÿซถ
  • or a positive integer upon failure ๐Ÿ’€

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

(yeah, just the one. she's self-referential like that. dcb(8) is the mothership, this page is one of her children ๐ŸŒธ)


๐Ÿ“ REPORTING BUGS ๐Ÿ“

found a bug? don't suffer in silence, bestie. report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> โ€” that's where the development and maintenance is primarily done.

and good news: you do not have to be subscribed to the list to send a message there. so there's genuinely zero excuse. send the mail ๐Ÿ’Œ


๐Ÿงš AUTHOR ๐Ÿงš

Petr Machata <me@pmachata.org>


and that's the whole page!! this one came from iproute2, dated 12 November 2020 โ€” so go forth, set your priomaps, size your buffers, and remember: if the driver rounds your size, that's not you failing, that's the device being the main character. periodt ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from