1DEVLINK-SB(8)                        Linux                       DEVLINK-SB(8)
2
3
4

NAME

6       devlink-sb - devlink shared buffer configuration
7

SYNOPSIS

9       devlink [ OPTIONS ] sb  { COMMAND | help }
10
11
12       OPTIONS := { -V[ersion] | -n[no-nice-names] }
13
14       devlink sb show [ DEV [ sb SB_INDEX ] ]
15
16       devlink sb pool show [ DEV [ sb SB_INDEX ]
17               pool POOL_INDEX ]
18
19       devlink sb pool set DEV [ sb SB_INDEX ]
20               pool POOL_INDEX
21               size POOL_SIZE
22               thtype { static | dynamic }
23
24       devlink sb port pool show [ DEV/PORT_INDEX [ sb SB_INDEX ]
25               pool POOL_INDEX ]
26
27       devlink sb port pool set DEV/PORT_INDEX [ sb SB_INDEX ]
28               pool POOL_INDEX
29               th THRESHOLD
30
31       devlink sb tc bind show [ DEV/PORT_INDEX [ sb SB_INDEX ]
32               tc TC_INDEX
33               type { ingress | egress } ]
34
35       devlink sb tc bind set DEV/PORT_INDEX [ sb SB_INDEX ]
36               tc TC_INDEX
37               type { ingress | egress }
38               pool POOL_INDEX
39               th THRESHOLD
40
41       devlink sb occupancy show { DEV | DEV/PORT_INDEX } [ sb SB_INDEX ]
42
43       devlink sb occupancy snapshot DEV [ sb SB_INDEX ]
44
45       devlink sb occupancy clearmax DEV [ sb SB_INDEX ]
46
47       devlink sb help
48
49

DESCRIPTION

51   devlink sb show - display available shared buffers and their attributes
52       DEV - specifies the devlink device to show shared buffers.  If this
53       argument is omitted all shared buffers of all devices are listed.
54
55
56       SB_INDEX - specifies the shared buffer.  If this argument is omitted
57       shared buffer with index 0 is selected.  Behaviour of this argument it
58       the same for every command.
59
60
61   devlink sb pool show - display available pools and their attributes
62       DEV - specifies the devlink device to show pools.  If this argument is
63       omitted all pools of all devices are listed.
64
65
66   devlink sb pool set - set attributes of pool
67       DEV - specifies the devlink device to set pool.
68
69
70       size POOL_SIZE
71              size of the pool in Bytes.
72
73
74       thtype { static | dynamic }
75              pool threshold type.
76
77              static - Threshold values for the pool will be passed in Bytes.
78
79              dynamic - Threshold values ("to_alpha") for the pool will be
80              used to compute alpha parameter according to formula:
81                              alpha = 2 ^ (to_alpha - 10)
82
83                        The range of the passed value is between 0 to 20. The
84                        computed alpha is used to determine the maximum usage
85                        of the flow:
86                              max_usage = alpha / (1 + alpha) * Free_Buffer
87
88
89   devlink sb port pool show - display port-pool combinations and threshold
90       for each
91       DEV/PORT_INDEX - specifies the devlink port.
92
93
94       pool POOL_INDEX
95              pool index.
96
97
98   devlink sb port pool set - set port-pool threshold
99       DEV/PORT_INDEX - specifies the devlink port.
100
101
102       pool POOL_INDEX
103              pool index.
104
105
106       th THRESHOLD
107              threshold value. Type of the value is either Bytes or
108              "to_alpha", depends on thtype set for the pool.
109
110
111   devlink sb tc bind show - display port-TC to pool bindings and threshold
112       for each
113       DEV/PORT_INDEX - specifies the devlink port.
114
115
116       tc TC_INDEX
117              index of either ingress or egress TC, usually in range 0 to 8
118              (depends on device).
119
120
121       type { ingress | egress }
122              TC type.
123
124
125   devlink sb tc bind set - set port-TC to pool binding with specified thresh‐
126       old
127       DEV/PORT_INDEX - specifies the devlink port.
128
129
130       tc TC_INDEX
131              index of either ingress or egress TC, usually in range 0 to 8
132              (depends on device).
133
134
135       type { ingress | egress }
136              TC type.
137
138
139       pool POOL_INDEX
140              index of pool to bind this to.
141
142
143       th THRESHOLD
144              threshold value. Type of the value is either Bytes or
145              "to_alpha", depends on thtype set for the pool.
146
147
148   devlink sb occupancy show - display shared buffer occupancy values for
149       device or port
150       This command is used to browse shared buffer occupancy values. Values
151       are showed for every port-pool combination as well as for all port-TC
152       combinations (with pool this port-TC is bound to). Format of value is:
153                       current_value/max_value
154       Note that before showing values, one has to issue occupancy snapshot
155       command first.
156
157
158       DEV - specifies the devlink device to show occupancy values for.
159
160       DEV/PORT_INDEX - specifies the devlink port to show occupancy values
161       for.
162
163
164   devlink sb occupancy snapshot - take occupancy snapshot of shared buffer
165       for device
166       This command is used to take a snapshot of shared buffer occupancy val‐
167       ues. After that, the values can be showed using occupancy show command.
168
169
170       DEV - specifies the devlink device to take occupancy snapshot on.
171
172
173   devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer
174       for device
175       This command is used to reset maximal occupancy values reached for
176       whole device. Note that before browsing reset values, one has to issue
177       occupancy snapshot command.
178
179
180       DEV - specifies the devlink device to clear occupancy watermarks on.
181
182

EXAMPLES

184       devlink sb show
185           List available share buffers.
186
187       devlink sb pool show
188           List available pools and their config.
189
190       devlink sb port pool show pci/0000:03:00.0/1 pool 0
191           Show port-pool setup for specified port and pool.
192
193       sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15
194           Change threshold for port specified port and pool.
195
196       devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress
197           Show pool binding and threshold for specified port and TC.
198
199       sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0
200       th 9
201           Set pool binding and threshold for specified port and TC.
202
203       sudo devlink sb occupancy snapshot pci/0000:03:00.0
204           Make a snapshot of occupancy of shared buffer for specified devlink
205           device.
206
207       devlink sb occupancy show pci/0000:03:00.0/1
208           Show occupancy for specified port from the snapshot.
209
210       sudo devlink sb occupancy clearmax pci/0000:03:00.0
211           Clear watermarks for shared buffer of specified devlink device.
212
213
214

SEE ALSO

216       devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),
217
218

AUTHOR

220       Jiri Pirko <jiri@mellanox.com>
221
222
223
224iproute2                          14 Apr 2016                    DEVLINK-SB(8)
Impressum