devlink-sb β devlink shared buffer configuration
| Use Case | Command | Description |
|---|---|---|
| π List shared buffers | devlink sb show | Display all available shared buffers and their attributes |
| π List pools | devlink sb pool show | Show pools with type, size, thtype, cell_size |
| βοΈ Set pool attributes | devlink sb pool set DEV [sb SB_INDEX] pool POOL_INDEX size SIZE thtype static|dynamic | Configure pool size and threshold type |
| π Show port-pool threshold | devlink sb port pool show DEV/PORT_INDEX [sb SB_INDEX] pool POOL_INDEX | Display threshold for portβpool combination |
| βοΈ Set port-pool threshold | devlink sb port pool set DEV/PORT_INDEX [sb SB_INDEX] pool POOL_INDEX th THRESHOLD | Change threshold for a portβpool mapping |
| π Show TC bindings | devlink sb tc bind show DEV/PORT_INDEX [sb SB_INDEX] tc TC_INDEX type ingress|egress | Display pool binding and threshold for a TC |
| βοΈ Set TC binding | devlink sb tc bind set DEV/PORT_INDEX [sb SB_INDEX] tc TC_INDEX type ingress|egress pool POOL_INDEX th THRESHOLD | Bind TC to pool with threshold |
| πΈ Take occupancy snapshot | devlink sb occupancy snapshot DEV [sb SB_INDEX] | Capture current occupancy values |
| π Show occupancy | devlink sb occupancy show DEV|DEV/PORT_INDEX [sb SB_INDEX] | Display snapshot occupancy (current/max) |
| π§Ή Clear watermarks | devlink sb occupancy clearmax DEV [sb SB_INDEX] | Reset max occupancy values |
devlink [ OPTIONS ] sb { COMMAND | help }
OPTIONS := { -V[ersion] | -n[no-nice-names] }
devlink sb show [ DEV [ sb SB_INDEX ] ]
devlink sb pool show [ DEV [ sb SB_INDEX ]
pool POOL_INDEX ]
devlink sb pool set DEV [ sb SB_INDEX ]
pool POOL_INDEX
size POOL_SIZE
thtype { static | dynamic }
devlink sb port pool show [ DEV/PORT_INDEX [ sb SB_INDEX ]
pool POOL_INDEX ]
devlink sb port pool set DEV/PORT_INDEX [ sb SB_INDEX ]
pool POOL_INDEX
th THRESHOLD
devlink sb tc bind show [ DEV/PORT_INDEX [ sb SB_INDEX ]
tc TC_INDEX
type { ingress | egress } ]
devlink sb tc bind set DEV/PORT_INDEX [ sb SB_INDEX ]
tc TC_INDEX
type { ingress | egress }
pool POOL_INDEX
th THRESHOLD
devlink sb occupancy show { DEV | DEV/PORT_INDEX } [ sb SB_INDEX ]
devlink sb occupancy snapshot DEV [ sb SB_INDEX ]
devlink sb occupancy clearmax DEV [ sb SB_INDEX ]
devlink sb help
alpha = 2 ^ (to_alpha - 10). The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow: max_usage = alpha / (1 + alpha) * Free_Buffer.This command is used to browse shared buffer occupancy values. Values are shown for every portβpool combination as well as for all portβTC combinations (with pool this portβTC is bound to). Format of value is: current_value/max_value. Note that before showing values, one has to issue occupancy snapshot command first.
This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be shown using occupancy show command.
This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue occupancy snapshot command.
devlink sb show
List available shared buffers.
devlink sb pool show
List available pools and their config.
devlink sb port pool show pci/0000:03:00.0/1 pool 0
Show port-pool setup for specified port and pool.
sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
Change threshold for specified port and pool.
devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
Show pool binding and threshold for specified port and TC.
sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
Set pool binding and threshold for specified port and TC.
sudo devlink sb occupancy snapshot pci/0000:03:00.0
Make a snapshot of occupancy of shared buffer for specified devlink device.
devlink sb occupancy show pci/0000:03:00.0/1
Show occupancy for specified port from the snapshot.
sudo devlink sb occupancy clearmax pci/0000:03:00.0
Clear watermarks for shared buffer of specified devlink device.
devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8)
Jiri Pirko <jiri AT mellanox.com>
iproute2 14 Apr 2016 DEVLINK-SB(8)
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-30 21:49 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format