559 lines
10 KiB
HTML
559 lines
10 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of DEVLINK-SB</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>DEVLINK-SB</H1>
|
|
Section: Linux (8)<BR>Updated: 14 Apr 2016<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
devlink-sb - devlink shared buffer configuration
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
|
|
|
|
<BR>
|
|
|
|
<B>devlink</B>
|
|
|
|
[ <I>OPTIONS</I> ]
|
|
|
|
<B>sb</B>
|
|
|
|
{ <I>COMMAND</I> |
|
|
|
|
<B>help</B> }
|
|
|
|
<P>
|
|
<P>
|
|
<BR>
|
|
|
|
<I>OPTIONS</I> := {
|
|
|
|
<B>-V</B>[<I>ersion</I>] |
|
|
<B>-n</B>[<I>no-nice-names</I>] }
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb show </B>
|
|
|
|
[ <I>DEV</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ] ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb pool show </B>
|
|
|
|
[ <I>DEV</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>pool</B>
|
|
|
|
<I>POOL_INDEX</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb pool set </B><I>DEV</I><B></B>
|
|
|
|
[ <B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>pool</B><I> POOL_INDEX </I>
|
|
|
|
<BR>
|
|
|
|
<B>size</B><I> POOL_SIZE </I>
|
|
|
|
<BR>
|
|
|
|
<B>thtype</B> { <B>static</B> | <B>dynamic</B> }
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb port pool show </B>
|
|
|
|
[ <I>DEV/PORT_INDEX</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>pool</B>
|
|
|
|
<I>POOL_INDEX</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb port pool set </B><I>DEV/PORT_INDEX</I><B></B>
|
|
|
|
[ <B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>pool</B><I> POOL_INDEX </I>
|
|
|
|
<BR>
|
|
|
|
<B>th</B><I> THRESHOLD </I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb tc bind show </B>
|
|
|
|
[ <I>DEV/PORT_INDEX</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>tc</B><I> TC_INDEX </I>
|
|
|
|
<BR>
|
|
|
|
<B>type</B>
|
|
|
|
{ <B>ingress</B> | <B>egress</B> } ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb tc bind set </B><I>DEV/PORT_INDEX</I><B></B>
|
|
|
|
[ <B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<BR>
|
|
|
|
<B>tc</B><I> TC_INDEX </I>
|
|
|
|
<BR>
|
|
|
|
<B>type</B> { <B>ingress</B> | <B>egress</B> }
|
|
|
|
<BR>
|
|
|
|
<B>pool</B><I> POOL_INDEX </I>
|
|
|
|
<BR>
|
|
|
|
<B>th</B><I> THRESHOLD </I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb occupancy show </B>
|
|
|
|
{ <I>DEV</I> | <I>DEV/PORT_INDEX</I> } [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb occupancy snapshot </B>
|
|
|
|
<I>DEV</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb occupancy clearmax </B>
|
|
|
|
<I>DEV</I> [
|
|
|
|
<B>sb</B>
|
|
|
|
<I>SB_INDEX</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>devlink sb help</B>
|
|
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H3>devlink sb show - display available shared buffers and their attributes</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to show shared buffers.
|
|
If this argument is omitted all shared buffers of all devices are listed.
|
|
<P>
|
|
<P>
|
|
|
|
<I>SB_INDEX</I>
|
|
|
|
- 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.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H3>devlink sb pool show - display available pools and their attributes</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to show pools.
|
|
If this argument is omitted all pools of all devices are listed.
|
|
<P>
|
|
Display available pools listing their
|
|
<B>type, size, thtype</B>
|
|
|
|
and
|
|
<B>cell_size. cell_size</B>
|
|
|
|
is the allocation granularity of memory within the shared buffer. Drivers
|
|
may round up, round down or reject
|
|
<B>size</B>
|
|
|
|
passed to the set command if it is not multiple of
|
|
<B>cell_size.</B>
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>devlink sb pool set - set attributes of pool</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to set pool.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="1"><B>size</B><I> POOL_SIZE</I>
|
|
|
|
<DD>
|
|
size of the pool in Bytes.
|
|
<P>
|
|
<DT id="2"><B>thtype</B> { <B>static</B> | <B>dynamic</B> }
|
|
|
|
<DD>
|
|
pool threshold type.
|
|
<P>
|
|
<I>static</I>
|
|
|
|
- Threshold values for the pool will be passed in Bytes.
|
|
<P>
|
|
<I>dynamic</I>
|
|
|
|
- Threshold values ("to_alpha") for the pool will be used to compute alpha parameter according to formula:
|
|
<BR>
|
|
|
|
|
|
alpha = 2 ^ (to_alpha - 10)
|
|
|
|
<P>
|
|
|
|
The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow:
|
|
|
|
<BR>
|
|
|
|
|
|
max_usage = alpha / (1 + alpha) * Free_Buffer
|
|
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H3>devlink sb port pool show - display port-pool combinations and threshold for each</H3>
|
|
|
|
<I>DEV/PORT_INDEX</I>
|
|
|
|
- specifies the devlink port.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="3"><B>pool</B><I> POOL_INDEX</I>
|
|
|
|
<DD>
|
|
pool index.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H3>devlink sb port pool set - set port-pool threshold</H3>
|
|
|
|
<I>DEV/PORT_INDEX</I>
|
|
|
|
- specifies the devlink port.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="4"><B>pool</B><I> POOL_INDEX</I>
|
|
|
|
<DD>
|
|
pool index.
|
|
<P>
|
|
<DT id="5"><B>th</B><I> THRESHOLD</I>
|
|
|
|
<DD>
|
|
threshold value. Type of the value is either Bytes or "to_alpha", depends on
|
|
<B>thtype</B>
|
|
|
|
set for the pool.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>devlink sb tc bind show - display port-TC to pool bindings and threshold for each</H3>
|
|
|
|
<P>
|
|
<I>DEV/PORT_INDEX</I>
|
|
|
|
- specifies the devlink port.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="6"><B>tc</B><I> TC_INDEX</I>
|
|
|
|
<DD>
|
|
index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
|
|
<P>
|
|
<DT id="7"><B>type</B> { <B>ingress</B> | <B>egress</B> }
|
|
|
|
<DD>
|
|
TC type.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>devlink sb tc bind set - set port-TC to pool binding with specified threshold</H3>
|
|
|
|
<P>
|
|
<I>DEV/PORT_INDEX</I>
|
|
|
|
- specifies the devlink port.
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="8"><B>tc</B><I> TC_INDEX</I>
|
|
|
|
<DD>
|
|
index of either ingress or egress TC, usually in range 0 to 8 (depends on device).
|
|
<P>
|
|
<DT id="9"><B>type</B> { <B>ingress</B> | <B>egress</B> }
|
|
|
|
<DD>
|
|
TC type.
|
|
<P>
|
|
<DT id="10"><B>pool</B><I> POOL_INDEX</I>
|
|
|
|
<DD>
|
|
index of pool to bind this to.
|
|
<P>
|
|
<DT id="11"><B>th</B><I> THRESHOLD</I>
|
|
|
|
<DD>
|
|
threshold value. Type of the value is either Bytes or "to_alpha", depends on
|
|
<B>thtype</B>
|
|
|
|
set for the pool.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAL"> </A>
|
|
<H3>devlink sb occupancy show - display shared buffer occupancy values for device or port</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
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:
|
|
<BR>
|
|
|
|
|
|
current_value/max_value
|
|
|
|
Note that before showing values, one has to issue
|
|
<B>occupancy snapshot</B>
|
|
|
|
command first.
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to show occupancy values for.
|
|
<P>
|
|
<I>DEV/PORT_INDEX</I>
|
|
|
|
- specifies the devlink port to show occupancy values for.
|
|
<P>
|
|
<A NAME="lbAM"> </A>
|
|
<H3>devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device</H3>
|
|
|
|
This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be showed using
|
|
<B>occupancy show</B>
|
|
|
|
command.
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to take occupancy snapshot on.
|
|
<P>
|
|
<A NAME="lbAN"> </A>
|
|
<H3>devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device</H3>
|
|
|
|
This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue
|
|
<B>occupancy snapshot</B>
|
|
|
|
command.
|
|
<P>
|
|
<P>
|
|
|
|
<I>DEV</I>
|
|
|
|
- specifies the devlink device to clear occupancy watermarks on.
|
|
<P>
|
|
<A NAME="lbAO"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
devlink sb show
|
|
<DL COMPACT><DT id="12"><DD>
|
|
List available share buffers.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
devlink sb pool show
|
|
<DL COMPACT><DT id="13"><DD>
|
|
List available pools and their config.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
devlink sb port pool show pci/0000:03:00.0/1 pool 0
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Show port-pool setup for specified port and pool.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Change threshold for port specified port and pool.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Show pool binding and threshold for specified port and TC.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9
|
|
<DL COMPACT><DT id="17"><DD>
|
|
Set pool binding and threshold for specified port and TC.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
sudo devlink sb occupancy snapshot pci/0000:03:00.0
|
|
<DL COMPACT><DT id="18"><DD>
|
|
Make a snapshot of occupancy of shared buffer for specified devlink device.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
devlink sb occupancy show pci/0000:03:00.0/1
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Show occupancy for specified port from the snapshot.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
sudo devlink sb occupancy clearmax pci/0000:03:00.0
|
|
<DL COMPACT><DT id="20"><DD>
|
|
Clear watermarks for shared buffer of specified devlink device.
|
|
</DL>
|
|
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAP"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+devlink">devlink</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+devlink-dev">devlink-dev</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+devlink-port">devlink-port</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+devlink-monitor">devlink-monitor</A></B>(8),
|
|
|
|
<BR>
|
|
|
|
<P>
|
|
<A NAME="lbAQ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Jiri Pirko <<A HREF="mailto:jiri@mellanox.com">jiri@mellanox.com</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="21"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="22"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="23"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="24"><A HREF="#lbAE">devlink sb show - display available shared buffers and their attributes</A><DD>
|
|
<DT id="25"><A HREF="#lbAF">devlink sb pool show - display available pools and their attributes</A><DD>
|
|
<DT id="26"><A HREF="#lbAG">devlink sb pool set - set attributes of pool</A><DD>
|
|
<DT id="27"><A HREF="#lbAH">devlink sb port pool show - display port-pool combinations and threshold for each</A><DD>
|
|
<DT id="28"><A HREF="#lbAI">devlink sb port pool set - set port-pool threshold</A><DD>
|
|
<DT id="29"><A HREF="#lbAJ">devlink sb tc bind show - display port-TC to pool bindings and threshold for each</A><DD>
|
|
<DT id="30"><A HREF="#lbAK">devlink sb tc bind set - set port-TC to pool binding with specified threshold</A><DD>
|
|
<DT id="31"><A HREF="#lbAL">devlink sb occupancy show - display shared buffer occupancy values for device or port</A><DD>
|
|
<DT id="32"><A HREF="#lbAM">devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device</A><DD>
|
|
<DT id="33"><A HREF="#lbAN">devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device</A><DD>
|
|
</DL>
|
|
<DT id="34"><A HREF="#lbAO">EXAMPLES</A><DD>
|
|
<DT id="35"><A HREF="#lbAP">SEE ALSO</A><DD>
|
|
<DT id="36"><A HREF="#lbAQ">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:11 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|