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

EXAMPLES

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

SEE ALSO

221       devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),
222
223

AUTHOR

225       Jiri Pirko <jiri@mellanox.com>
226
227
228
229iproute2                          14 Apr 2016                    DEVLINK-SB(8)
Impressum