|
|
049c96 |
From 8a5444de3226e5acb78307b79146f0456b4244cf Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Sat, 9 Jul 2016 11:33:14 +0200
|
|
|
049c96 |
Subject: [PATCH] devlink: add manpage for shared buffer
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1342515
|
|
|
049c96 |
Upstream Status: iproute2.git commit 4bf138d6d2747
|
|
|
049c96 |
|
|
|
049c96 |
commit 4bf138d6d2747b198fc0a78f5fe4e1c9287e9e90
|
|
|
049c96 |
Author: Jiri Pirko <jiri@mellanox.com>
|
|
|
049c96 |
Date: Fri Apr 15 09:51:53 2016 +0200
|
|
|
049c96 |
|
|
|
049c96 |
devlink: add manpage for shared buffer
|
|
|
049c96 |
|
|
|
049c96 |
Manpage for devlink "sb" object.
|
|
|
049c96 |
|
|
|
049c96 |
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
049c96 |
---
|
|
|
049c96 |
man/man8/devlink-dev.8 | 1 +
|
|
|
049c96 |
man/man8/devlink-monitor.8 | 1 +
|
|
|
049c96 |
man/man8/devlink-port.8 | 1 +
|
|
|
049c96 |
man/man8/devlink-sb.8 | 313 +++++++++++++++++++++++++++++++++++++++++++++
|
|
|
049c96 |
4 files changed, 316 insertions(+)
|
|
|
049c96 |
create mode 100644 man/man8/devlink-sb.8
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8
|
|
|
049c96 |
index af96a29..62bcead 100644
|
|
|
049c96 |
--- a/man/man8/devlink-dev.8
|
|
|
049c96 |
+++ b/man/man8/devlink-dev.8
|
|
|
049c96 |
@@ -52,6 +52,7 @@ Shows the state of specified devlink device.
|
|
|
049c96 |
.SH SEE ALSO
|
|
|
049c96 |
.BR devlink (8),
|
|
|
049c96 |
.BR devlink-port (8),
|
|
|
049c96 |
+.BR devlink-sb (8),
|
|
|
049c96 |
.BR devlink-monitor (8),
|
|
|
049c96 |
.br
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/man/man8/devlink-monitor.8 b/man/man8/devlink-monitor.8
|
|
|
049c96 |
index 98134c3..13fe641 100644
|
|
|
049c96 |
--- a/man/man8/devlink-monitor.8
|
|
|
049c96 |
+++ b/man/man8/devlink-monitor.8
|
|
|
049c96 |
@@ -29,6 +29,7 @@ opens Devlink Netlink socket, listens on it and dumps state changes.
|
|
|
049c96 |
.SH SEE ALSO
|
|
|
049c96 |
.BR devlink (8),
|
|
|
049c96 |
.BR devlink-dev (8),
|
|
|
049c96 |
+.BR devlink-sb (8),
|
|
|
049c96 |
.BR devlink-port (8),
|
|
|
049c96 |
.br
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/man/man8/devlink-port.8 b/man/man8/devlink-port.8
|
|
|
049c96 |
index d78837c..a639d01 100644
|
|
|
049c96 |
--- a/man/man8/devlink-port.8
|
|
|
049c96 |
+++ b/man/man8/devlink-port.8
|
|
|
049c96 |
@@ -120,6 +120,7 @@ Unplit the specified previously split devlink port.
|
|
|
049c96 |
.SH SEE ALSO
|
|
|
049c96 |
.BR devlink (8),
|
|
|
049c96 |
.BR devlink-dev (8),
|
|
|
049c96 |
+.BR devlink-sb (8),
|
|
|
049c96 |
.BR devlink-monitor (8),
|
|
|
049c96 |
.br
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/man/man8/devlink-sb.8 b/man/man8/devlink-sb.8
|
|
|
049c96 |
new file mode 100644
|
|
|
049c96 |
index 0000000..ffb5553
|
|
|
049c96 |
--- /dev/null
|
|
|
049c96 |
+++ b/man/man8/devlink-sb.8
|
|
|
049c96 |
@@ -0,0 +1,313 @@
|
|
|
049c96 |
+.TH DEVLINK\-SB 8 "14 Apr 2016" "iproute2" "Linux"
|
|
|
049c96 |
+.SH NAME
|
|
|
049c96 |
+devlink-sb \- devlink shared buffer configuration
|
|
|
049c96 |
+.SH SYNOPSIS
|
|
|
049c96 |
+.sp
|
|
|
049c96 |
+.ad l
|
|
|
049c96 |
+.in +8
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.B devlink
|
|
|
049c96 |
+.RI "[ " OPTIONS " ]"
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.RI " { " COMMAND " | "
|
|
|
049c96 |
+.BR help " }"
|
|
|
049c96 |
+.sp
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.IR OPTIONS " := { "
|
|
|
049c96 |
+\fB\-V\fR[\fIersion\fR] |
|
|
|
049c96 |
+\fB\-n\fR[\fIno-nice-names\fR] }
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb show "
|
|
|
049c96 |
+.RI "[ " DEV " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ] ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb pool show "
|
|
|
049c96 |
+.RI "[ " DEV " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.B pool
|
|
|
049c96 |
+.IR POOL_INDEX " ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BI "devlink sb pool set " DEV "
|
|
|
049c96 |
+.RB "[ " sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI pool " POOL_INDEX "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI size " POOL_SIZE "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BR thtype " { " static " | " dynamic " }"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb port pool show "
|
|
|
049c96 |
+.RI "[ " DEV/PORT_INDEX " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.B pool
|
|
|
049c96 |
+.IR POOL_INDEX " ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BI "devlink sb port pool set " DEV/PORT_INDEX "
|
|
|
049c96 |
+.RB "[ " sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI pool " POOL_INDEX "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI th " THRESHOLD "
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb tc bind show "
|
|
|
049c96 |
+.RI "[ " DEV/PORT_INDEX " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI tc " TC_INDEX "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.B type
|
|
|
049c96 |
+.RB "{ " ingress " | " egress " } ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BI "devlink sb tc bind set " DEV/PORT_INDEX "
|
|
|
049c96 |
+.RB "[ " sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI tc " TC_INDEX "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BR type " { " ingress " | " egress " }"
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI pool " POOL_INDEX "
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.BI th " THRESHOLD "
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb occupancy show "
|
|
|
049c96 |
+.RI "{ " DEV " | " DEV/PORT_INDEX " } [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ] "
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb occupancy snapshot "
|
|
|
049c96 |
+.IR DEV " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.BR "devlink sb occupancy clearmax "
|
|
|
049c96 |
+.IR DEV " [ "
|
|
|
049c96 |
+.B sb
|
|
|
049c96 |
+.IR SB_INDEX " ]"
|
|
|
049c96 |
+
|
|
|
049c96 |
+.ti -8
|
|
|
049c96 |
+.B devlink sb help
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SH "DESCRIPTION"
|
|
|
049c96 |
+.SS devlink sb show - display available shared buffers and their attributes
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to show shared buffers.
|
|
|
049c96 |
+If this argument is omitted all shared buffers of all devices are listed.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "SB_INDEX"
|
|
|
049c96 |
+- specifies the shared buffer.
|
|
|
049c96 |
+If this argument is omitted shared buffer with index 0 is selected.
|
|
|
049c96 |
+Behaviour of this argument it the same for every command.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb pool show - display available pools and their attributes
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to show pools.
|
|
|
049c96 |
+If this argument is omitted all pools of all devices are listed.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb pool set - set attributes of pool
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to set pool.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI size " POOL_SIZE"
|
|
|
049c96 |
+size of the pool in Bytes.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BR thtype " { " static " | " dynamic " } "
|
|
|
049c96 |
+pool threshold type.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.I static
|
|
|
049c96 |
+- Threshold values for the pool will be passed in Bytes.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.I dynamic
|
|
|
049c96 |
+- Threshold values ("to_alpha") for the pool will be used to compute alpha parameter according to formula:
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.in +16
|
|
|
049c96 |
+alpha = 2 ^ (to_alpha - 10)
|
|
|
049c96 |
+.in -16
|
|
|
049c96 |
+
|
|
|
049c96 |
+.in +10
|
|
|
049c96 |
+The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow:
|
|
|
049c96 |
+.in -10
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.in +16
|
|
|
049c96 |
+max_usage = alpha / (1 + alpha) * Free_Buffer
|
|
|
049c96 |
+.in -16
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb port pool show - display port-pool combinations and threshold for each
|
|
|
049c96 |
+.I "DEV/PORT_INDEX"
|
|
|
049c96 |
+- specifies the devlink port.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI pool " POOL_INDEX"
|
|
|
049c96 |
+pool index.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb port pool set - set port-pool threshold
|
|
|
049c96 |
+.I "DEV/PORT_INDEX"
|
|
|
049c96 |
+- specifies the devlink port.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI pool " POOL_INDEX"
|
|
|
049c96 |
+pool index.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI th " THRESHOLD"
|
|
|
049c96 |
+threshold value. Type of the value is either Bytes or "to_alpha", depends on
|
|
|
049c96 |
+.B thtype
|
|
|
049c96 |
+set for the pool.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb tc bind show - display port-TC to pool bindings and threshold for each
|
|
|
049c96 |
+
|
|
|
049c96 |
+.I "DEV/PORT_INDEX"
|
|
|
049c96 |
+- specifies the devlink port.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI tc " TC_INDEX"
|
|
|
049c96 |
+index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BR type " { " ingress " | " egress " } "
|
|
|
049c96 |
+TC type.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb tc bind set - set port-TC to pool binding with specified threshold
|
|
|
049c96 |
+
|
|
|
049c96 |
+.I "DEV/PORT_INDEX"
|
|
|
049c96 |
+- specifies the devlink port.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI tc " TC_INDEX"
|
|
|
049c96 |
+index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BR type " { " ingress " | " egress " } "
|
|
|
049c96 |
+TC type.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI pool " POOL_INDEX"
|
|
|
049c96 |
+index of pool to bind this to.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.TP
|
|
|
049c96 |
+.BI th " THRESHOLD"
|
|
|
049c96 |
+threshold value. Type of the value is either Bytes or "to_alpha", depends on
|
|
|
049c96 |
+.B thtype
|
|
|
049c96 |
+set for the pool.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb occupancy show - display shared buffer occupancy values for device or port
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+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:
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+.in +16
|
|
|
049c96 |
+current_value/max_value
|
|
|
049c96 |
+.in -16
|
|
|
049c96 |
+Note that before showing values, one has to issue
|
|
|
049c96 |
+.b occupancy snapshot
|
|
|
049c96 |
+command first.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to show occupancy values for.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.I "DEV/PORT_INDEX"
|
|
|
049c96 |
+- specifies the devlink port to show occupancy values for.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device
|
|
|
049c96 |
+This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be showed using
|
|
|
049c96 |
+.B occupancy show
|
|
|
049c96 |
+command.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to take occupancy snapshot on.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SS devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device
|
|
|
049c96 |
+This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue
|
|
|
049c96 |
+.B occupancy snapshot
|
|
|
049c96 |
+command.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+.I "DEV"
|
|
|
049c96 |
+- specifies the devlink device to clear occupancy watermarks on.
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SH "EXAMPLES"
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+devlink sb show
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+List available share buffers.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+devlink sb pool show
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+List available pools and their config.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+devlink sb port pool show pci/0000:03:00.0/1 pool 0
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Show port-pool setup for specified port and pool.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Change threshold for port specified port and pool.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Show pool binding and threshold for specified port and TC.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Set pool binding and threshold for specified port and TC.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+sudo devlink sb occupancy snapshot pci/0000:03:00.0
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Make a snapshot of occupancy of shared buffer for specified devlink device.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+devlink sb occupancy show pci/0000:03:00.0/1
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Show occupancy for specified port from the snapshot.
|
|
|
049c96 |
+.RE
|
|
|
049c96 |
+.PP
|
|
|
049c96 |
+sudo devlink sb occupancy clearmax pci/0000:03:00.0
|
|
|
049c96 |
+.RS 4
|
|
|
049c96 |
+Clear watermarks for shared buffer of specified devlink device.
|
|
|
049c96 |
+
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SH SEE ALSO
|
|
|
049c96 |
+.BR devlink (8),
|
|
|
049c96 |
+.BR devlink-dev (8),
|
|
|
049c96 |
+.BR devlink-port (8),
|
|
|
049c96 |
+.BR devlink-monitor (8),
|
|
|
049c96 |
+.br
|
|
|
049c96 |
+
|
|
|
049c96 |
+.SH AUTHOR
|
|
|
049c96 |
+Jiri Pirko <jiri@mellanox.com>
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|