summaryrefslogtreecommitdiffstats
path: root/man/man8/dcb-app.8
blob: be505a0be3087eecf60d23109f2084d72c004c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
.TH DCB-APP 8 "6 December 2020" "iproute2" "Linux"
.SH NAME
dcb-app \- show / manipulate application priority table of
the DCB (Data Center Bridging) subsystem
.SH SYNOPSIS
.sp
.ad l
.in +8

.ti -8
.B dcb
.RI "[ " OPTIONS " ] "
.B app
.RI "{ " COMMAND " | " help " }"
.sp

.ti -8
.B dcb app " { " show " | " flush " } " dev
.RI DEV
.RB "[ " default-prio " ]"
.RB "[ " ethtype-prio " ]"
.RB "[ " stream-port-prio " ]"
.RB "[ " dgram-port-prio " ]"
.RB "[ " port-prio " ]"
.RB "[ " dscp-prio " ]"
.RB "[ " pcp-prio " ]"

.ti -8
.B dcb app " { " add " | " del " | " replace " } " dev
.RI DEV
.RB "[ " default-prio " " \fIPRIO-LIST\fB " ]"
.RB "[ " ethtype-prio " " \fIET-MAP\fB " ]"
.RB "[ " stream-port-prio " " \fIPORT-MAP\fB " ]"
.RB "[ " dgram-port-prio " " \fIPORT-MAP\fB " ]"
.RB "[ " port-prio " " \fIPORT-MAP\fB " ]"
.RB "[ " dscp-prio " " \fIDSCP-MAP\fB " ]"
.RB "[ " pcp-prio " " \fIPCP-MAP\fB " ]"

.ti -8
.IR PRIO-LIST " := [ " PRIO-LIST " ] " PRIO

.ti -8
.IR ET-MAP " := [ " ET-MAP " ] " ET-MAPPING

.ti -8
.IR ET-MAPPING " := " ET\fB:\fIPRIO\fR

.ti -8
.IR PORT-MAP " := [ " PORT-MAP " ] " PORT-MAPPING

.ti -8
.IR PORT-MAPPING " := " PORT\fB:\fIPRIO\fR

.ti -8
.IR DSCP-MAP " := [ " DSCP-MAP " ] " DSCP-MAPPING

.ti -8
.IR DSCP-MAPPING " := { " DSCP " | " \fBall " }" \fB:\fIPRIO\fR

.ti -8
.IR PCP-MAP " := [ " PCP-MAP " ] " PCP-MAPPING

.ti -8
.IR PCP-MAPPING " := " PCP\fB:\fIPRIO\fR

.ti -8
.IR ET " := { " \fB0x600\fR " .. " \fB0xffff\fR " }"

.ti -8
.IR PORT " := { " \fB1\fR " .. " \fB65535\fR " }"

.ti -8
.IR DSCP " := { " \fB0\fR " .. " \fB63\fR " }"

.ti -8
.IR PCP " := { " \fB0(nd/de)\fR " .. " \fB7(nd/de)\fR " }"

.ti -8
.IR PRIO " := { " \fB0\fR " .. " \fB7\fR " }"

.SH DESCRIPTION

.B dcb app
is used to configure APP table, or application priority table in the DCB (Data
Center Bridging) subsystem. The APP table is used to assign priority to traffic
based on value in one of several headers: EtherType, L4 destination port, or
DSCP. It also allows configuration of port-default priority that is chosen if no
other prioritization rule applies.

DCB APP entries are 3-tuples of selector, protocol ID, and priority. Selector is
an enumeration that picks one of the prioritization namespaces. Currently it
mostly corresponds to configurable parameters described below. Protocol ID is a
value in the selector namespace. E.g. for EtherType selector, protocol IDs are
the individual EtherTypes, for DSCP they are individual code points. The
priority is the priority that should be assigned to traffic that matches the
selector and protocol ID.

The APP table is a set of DCB APP entries. The only requirement is that
duplicate entries are not added. Notably, it is valid to have conflicting
priority assignment for the same selector and protocol ID. For example, the set
of two APP entries (DSCP, 10, 1) and (DSCP, 10, 2), where packets with DSCP of
10 should get priority of both 1 and 2, form a well-defined APP table. The
.B dcb app
tool allows low-level management of the app table by adding and deleting
individual APP 3-tuples through
.B add
and
.B del
commands. On the other hand, the command
.B replace
does what one would typically want in this situation--first adds the new
configuration, and then removes the obsolete one, so that only one
prioritization is in effect for a given selector and protocol ID.

.SH COMMANDS

.TP
.B show
Display all entries with a given selector. When no selector is given, shows all
APP table entries categorized per selector.

.TP
.B flush
Remove all entries with a given selector. When no selector is given, removes all
APP table entries.

.TP
.B add
.TQ
.B del
Add and, respectively, remove individual APP 3-tuples to and from the DCB APP
table.

.TP
.B replace
Take the list of entries mentioned as parameter, and add those that are not
present in the APP table yet. Then remove those entries, whose selector and
protocol ID have been mentioned as parameter, but not with the exact same
priority. This has the effect of, for the given selector and protocol ID,
causing that the table only contains the priority (or priorities) given as
parameter.

.SH PARAMETERS

The following table shows parameters in a way that they would be used with
\fBadd\fR, \fBdel\fR and \fBreplace\fR commands. For \fBshow\fR and \fBflush\fR,
the parameter name is to be used as a simple keyword without further arguments.

.TP
.B default-prio \fIPRIO-LIST
The priority to be used for traffic the priority of which is otherwise
unspecified. The argument is a list of individual priorities. Note that
.B default-prio
rules are configured as triplets (\fBEtherType\fR, \fB0\fR, \fIPRIO\fR).
.B dcb app
translates these rules to the symbolic name
.B default-prio
and back.

.TP
.B ethtype-prio \fIET-MAP
\fIET-MAP\fR uses the array parameter syntax, see
.BR dcb (8)
for details. Keys are EtherType values. Values are priorities to be assigned to
traffic with the matching EtherType.

.TP
.B stream-port-prio \fIPORT-MAP
.TQ
.B dgram-port-prio \fIPORT-MAP
.TQ
.B port-prio \fIPORT-MAP
\fIPORT-MAP\fR uses the array parameter syntax, see
.BR dcb (8)
for details. Keys are L4 destination port numbers that match on, respectively,
TCP and SCTP traffic, UDP and DCCP traffic, and either of those. Values are
priorities that should be assigned to matching traffic.

.TP
.B dscp-prio \fIDSCP-MAP
\fIDSCP-MAP\fR uses the array parameter syntax, see
.BR dcb (8)
for details. Keys are DSCP points, values are priorities assigned to
traffic with matching DSCP. DSCP points can be written either directly as
numeric values, or using symbolic names specified in
.B /etc/iproute2/rt_dsfield
(however note that the file specifies full 8-bit dsfield values, whereas
.B dcb app
will only use the higher six bits).
.B dcb app show
will similarly format DSCP values as symbolic names if possible. The
command line option
.B -N
turns the show translation off.

.TP
.B pcp-prio \fIPCP-MAP
\fIPCP-MAP\fR uses the array parameter syntax, see
.BR dcb (8)
for details. Keys are PCP/DEI. Values are priorities assigned to traffic with
matching PCP/DEI. PCP/DEI values are written as a combination of numeric- and
symbolic values, to accommodate for both. PCP always in numerical form e.g
0 .. 7 and DEI in symbolic form e.g 'de' (drop-eligible), indicating that the
DEI bit is 1 or 'nd' (not-drop-eligible), indicating that the DEI bit is 0.
In combination 2de:1 translates to a mapping of PCP=2 and DEI=1 to priority 1.

.SH EXAMPLE & USAGE

Prioritize traffic with DSCP 0 to priority 0, 24 to 3 and 48 to 6:

.P
# dcb app add dev eth0 dscp-prio 0:0 24:3 48:6

Add another rule to configure DSCP 24 to priority 2 and show the result:

.P
# dcb app add dev eth0 dscp-prio 24:2
.br
# dcb app show dev eth0 dscp-prio
.br
dscp-prio 0:0 CS3:2 CS3:3 CS6:6
.br
# dcb -N app show dev eth0 dscp-prio
.br
dscp-prio 0:0 24:2 24:3 48:6

Reconfigure the table so that the only rule for DSCP 24 is for assignment of
priority 4:

.P
# dcb app replace dev eth0 dscp-prio 24:4
.br
# dcb app -N show dev eth0 dscp-prio
.br
dscp-prio 0:0 24:4 48:6

Flush all DSCP rules:

.P
# dcb app flush dev eth0 dscp-prio
.br
# dcb app show dev eth0 dscp-prio
.br
(nothing)

Add a rule to map traffic with PCP 1 and DEI 0 to priority 1 and PCP 2 and DEI 1
to priority 2:

.P
# dcb app add dev eth0 pcp-prio 1nd:1 2de:2
.br
# dcb app show dev eth0 pcp-prio
.br
pcp-prio 1nd:1 2de:2

.SH EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

.SH SEE ALSO
.BR dcb (8)

.SH REPORTING BUGS
Report any bugs to the Network Developers mailing list
.B <netdev@vger.kernel.org>
where the development and maintenance is primarily done.
You do not have to be subscribed to the list to send a message there.

.SH AUTHOR
Petr Machata <me@pmachata.org>