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 command first.
155
156
157       DEV - specifies the devlink device to show occupancy values for.
158
159       DEV/PORT_INDEX - specifies the devlink port to show occupancy values
160       for.
161
162
163   devlink sb occupancy snapshot - take occupancy snapshot of shared buffer
164       for device
165       This command is used to take a snapshot of shared buffer occupancy val‐
166       ues. After that, the values can be showed using occupancy show command.
167
168
169       DEV - specifies the devlink device to take occupancy snapshot on.
170
171
172   devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer
173       for device
174       This command is used to reset maximal occupancy values reached for
175       whole device. Note that before browsing reset values, one has to issue
176       occupancy snapshot command.
177
178
179       DEV - specifies the devlink device to clear occupancy watermarks on.
180
181

EXAMPLES

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

SEE ALSO

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

AUTHOR

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