Blame man/man8/devlink-sb.8

Packit Service 3880ab
.TH DEVLINK\-SB 8 "14 Apr 2016" "iproute2" "Linux"
Packit Service 3880ab
.SH NAME
Packit Service 3880ab
devlink-sb \- devlink shared buffer configuration
Packit Service 3880ab
.SH SYNOPSIS
Packit Service 3880ab
.sp
Packit Service 3880ab
.ad l
Packit Service 3880ab
.in +8
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.B devlink
Packit Service 3880ab
.RI "[ " OPTIONS " ]"
Packit Service 3880ab
.B sb
Packit Service 3880ab
.RI  " { " COMMAND " | "
Packit Service 3880ab
.BR help " }"
Packit Service 3880ab
.sp
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.IR OPTIONS " := { "
Packit Service 3880ab
\fB\-V\fR[\fIersion\fR] |
Packit Service 3880ab
\fB\-n\fR[\fIno-nice-names\fR] }
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb show "
Packit Service 3880ab
.RI "[ " DEV " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ] ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb pool show "
Packit Service 3880ab
.RI "[ " DEV " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.B pool
Packit Service 3880ab
.IR POOL_INDEX " ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BI "devlink sb pool set " DEV "
Packit Service 3880ab
.RB "[ " sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI pool " POOL_INDEX "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI size " POOL_SIZE "
Packit Service 3880ab
.br
Packit Service 3880ab
.BR thtype " { " static " | " dynamic " }"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb port pool show "
Packit Service 3880ab
.RI "[ " DEV/PORT_INDEX " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.B pool
Packit Service 3880ab
.IR POOL_INDEX " ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BI "devlink sb port pool set " DEV/PORT_INDEX "
Packit Service 3880ab
.RB "[ " sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI pool " POOL_INDEX "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI th " THRESHOLD "
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb tc bind show "
Packit Service 3880ab
.RI "[ " DEV/PORT_INDEX " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI tc " TC_INDEX "
Packit Service 3880ab
.br
Packit Service 3880ab
.B type
Packit Service 3880ab
.RB "{ " ingress " | " egress " } ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BI "devlink sb tc bind set " DEV/PORT_INDEX "
Packit Service 3880ab
.RB "[ " sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI tc " TC_INDEX "
Packit Service 3880ab
.br
Packit Service 3880ab
.BR type " { " ingress " | " egress " }"
Packit Service 3880ab
.br
Packit Service 3880ab
.BI pool " POOL_INDEX "
Packit Service 3880ab
.br
Packit Service 3880ab
.BI th " THRESHOLD "
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb occupancy show "
Packit Service 3880ab
.RI "{ " DEV " | " DEV/PORT_INDEX " } [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ] "
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb occupancy snapshot "
Packit Service 3880ab
.IR DEV " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "devlink sb occupancy clearmax "
Packit Service 3880ab
.IR DEV " [ "
Packit Service 3880ab
.B sb
Packit Service 3880ab
.IR SB_INDEX " ]"
Packit Service 3880ab
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.B devlink sb help
Packit Service 3880ab
Packit Service 3880ab
.SH "DESCRIPTION"
Packit Service 3880ab
.SS devlink sb show - display available shared buffers and their attributes
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to show shared buffers.
Packit Service 3880ab
If this argument is omitted all shared buffers of all devices are listed.
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "SB_INDEX"
Packit Service 3880ab
- specifies the shared buffer.
Packit Service 3880ab
If this argument is omitted shared buffer with index 0 is selected.
Packit Service 3880ab
Behaviour of this argument it the same for every command.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb pool show - display available pools and their attributes
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to show pools.
Packit Service 3880ab
If this argument is omitted all pools of all devices are listed.
Packit Service 3880ab
Packit Service 3880ab
Display available pools listing their
Packit Service 3880ab
.B type, size, thtype
Packit Service 3880ab
and
Packit Service 3880ab
.B cell_size. cell_size
Packit Service 3880ab
is the allocation granularity of memory within the shared buffer. Drivers
Packit Service 3880ab
may round up, round down or reject
Packit Service 3880ab
.B size
Packit Service 3880ab
passed to the set command if it is not multiple of
Packit Service 3880ab
.B cell_size.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb pool set - set attributes of pool
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to set pool.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI size " POOL_SIZE"
Packit Service 3880ab
size of the pool in Bytes.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BR thtype " { " static " | " dynamic " } "
Packit Service 3880ab
pool threshold type.
Packit Service 3880ab
Packit Service 3880ab
.I static
Packit Service 3880ab
- Threshold values for the pool will be passed in Bytes.
Packit Service 3880ab
Packit Service 3880ab
.I dynamic
Packit Service 3880ab
- Threshold values ("to_alpha") for the pool will be used to compute alpha parameter according to formula:
Packit Service 3880ab
.br
Packit Service 3880ab
.in +16
Packit Service 3880ab
alpha = 2 ^ (to_alpha - 10)
Packit Service 3880ab
.in -16
Packit Service 3880ab
Packit Service 3880ab
.in +10
Packit Service 3880ab
The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow:
Packit Service 3880ab
.in -10
Packit Service 3880ab
.br
Packit Service 3880ab
.in +16
Packit Service 3880ab
max_usage = alpha / (1 + alpha) * Free_Buffer
Packit Service 3880ab
.in -16
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb port pool show - display port-pool combinations and threshold for each
Packit Service 3880ab
.I "DEV/PORT_INDEX"
Packit Service 3880ab
- specifies the devlink port.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI pool " POOL_INDEX"
Packit Service 3880ab
pool index.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb port pool set - set port-pool threshold
Packit Service 3880ab
.I "DEV/PORT_INDEX"
Packit Service 3880ab
- specifies the devlink port.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI pool " POOL_INDEX"
Packit Service 3880ab
pool index.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI th " THRESHOLD"
Packit Service 3880ab
threshold value. Type of the value is either Bytes or "to_alpha", depends on
Packit Service 3880ab
.B thtype
Packit Service 3880ab
set for the pool.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb tc bind show - display port-TC to pool bindings and threshold for each
Packit Service 3880ab
Packit Service 3880ab
.I "DEV/PORT_INDEX"
Packit Service 3880ab
- specifies the devlink port.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI tc " TC_INDEX"
Packit Service 3880ab
index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BR type " { " ingress " | " egress " } "
Packit Service 3880ab
TC type.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb tc bind set - set port-TC to pool binding with specified threshold
Packit Service 3880ab
Packit Service 3880ab
.I "DEV/PORT_INDEX"
Packit Service 3880ab
- specifies the devlink port.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI tc " TC_INDEX"
Packit Service 3880ab
index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BR type " { " ingress " | " egress " } "
Packit Service 3880ab
TC type.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI pool " POOL_INDEX"
Packit Service 3880ab
index of pool to bind this to.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI th " THRESHOLD"
Packit Service 3880ab
threshold value. Type of the value is either Bytes or "to_alpha", depends on
Packit Service 3880ab
.B thtype
Packit Service 3880ab
set for the pool.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb occupancy show - display shared buffer occupancy values for device or port
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
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:
Packit Service 3880ab
.br
Packit Service 3880ab
.in +16
Packit Service 3880ab
current_value/max_value
Packit Service 3880ab
.in -16
Packit Service 3880ab
Note that before showing values, one has to issue
Packit Service 3880ab
.B occupancy snapshot
Packit Service 3880ab
command first.
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to show occupancy values for.
Packit Service 3880ab
Packit Service 3880ab
.I "DEV/PORT_INDEX"
Packit Service 3880ab
- specifies the devlink port to show occupancy values for.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device
Packit Service 3880ab
This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be showed using
Packit Service 3880ab
.B occupancy show
Packit Service 3880ab
command.
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to take occupancy snapshot on.
Packit Service 3880ab
Packit Service 3880ab
.SS devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device
Packit Service 3880ab
This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue
Packit Service 3880ab
.B occupancy snapshot
Packit Service 3880ab
command.
Packit Service 3880ab
Packit Service 3880ab
.PP
Packit Service 3880ab
.I "DEV"
Packit Service 3880ab
- specifies the devlink device to clear occupancy watermarks on.
Packit Service 3880ab
Packit Service 3880ab
.SH "EXAMPLES"
Packit Service 3880ab
.PP
Packit Service 3880ab
devlink sb show
Packit Service 3880ab
.RS 4
Packit Service 3880ab
List available share buffers.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
devlink sb pool show
Packit Service 3880ab
.RS 4
Packit Service 3880ab
List available pools and their config.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
devlink sb port pool show pci/0000:03:00.0/1 pool 0
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Show port-pool setup for specified port and pool.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Change threshold for port specified port and pool.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Show pool binding and threshold for specified port and TC.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Set pool binding and threshold for specified port and TC.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
sudo devlink sb occupancy snapshot pci/0000:03:00.0
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Make a snapshot of occupancy of shared buffer for specified devlink device.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
devlink sb occupancy show pci/0000:03:00.0/1
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Show occupancy for specified port from the snapshot.
Packit Service 3880ab
.RE
Packit Service 3880ab
.PP
Packit Service 3880ab
sudo devlink sb occupancy clearmax pci/0000:03:00.0
Packit Service 3880ab
.RS 4
Packit Service 3880ab
Clear watermarks for shared buffer of specified devlink device.
Packit Service 3880ab
.RE
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
.SH SEE ALSO
Packit Service 3880ab
.BR devlink (8),
Packit Service 3880ab
.BR devlink-dev (8),
Packit Service 3880ab
.BR devlink-port (8),
Packit Service 3880ab
.BR devlink-monitor (8),
Packit Service 3880ab
.br
Packit Service 3880ab
Packit Service 3880ab
.SH AUTHOR
Packit Service 3880ab
Jiri Pirko <jiri@mellanox.com>