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
DEV - specifies the devlink device to show shared buffers. If this argument is omitted all shared buffers of all devices are listed.
SB_INDEX - specifies the shared buffer. If this argument is omitted shared buffer with index 0 is selected. Behaviour of this argument it the same for every command.
DEV - specifies the devlink device to show pools. If this argument is omitted all pools of all devices are listed.
Display available pools listing their type, size, thtype and cell_size. cell_size is the allocation granularity of memory within the shared buffer. Drivers may round up, round down or reject size passed to the set command if it is not multiple of cell_size.
DEV - specifies the devlink device to set pool.
static - Threshold values for the pool will be passed in Bytes.
dynamic
- Threshold values ("to_alpha") for the pool will be used to compute alpha parameter according to formula:
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
DEV/PORT_INDEX - specifies the devlink port.
DEV/PORT_INDEX - specifies the devlink port.
This command is used to browse shared buffer occupancy values. Values are showed 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.
DEV - specifies the devlink device to show occupancy values for.
DEV/PORT_INDEX - specifies the devlink port to show occupancy values for.
DEV - specifies the devlink device to take occupancy snapshot on.
DEV - specifies the devlink device to clear occupancy watermarks on.
devlink sb show
devlink sb pool show
devlink sb port pool show pci/0000:03:00.0/1 pool 0
sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
sudo devlink sb occupancy snapshot pci/0000:03:00.0
devlink sb occupancy show pci/0000:03:00.0/1
sudo devlink sb occupancy clearmax pci/0000:03:00.0