blob: 16eea36d8934a6a7896200380ca40deb666ab86c [file] [log] [blame]
Alexander Duyck2f90b862008-11-20 20:52:10 -08001/*
2 * Copyright (c) 2008, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Author: Lucy Liu <lucy.liu@intel.com>
18 */
19
20#ifndef __LINUX_DCBNL_H__
21#define __LINUX_DCBNL_H__
22
Chris Leech5c252222009-02-27 10:01:36 +000023#include <linux/types.h>
24
John Fastabend3e290272010-12-30 09:25:46 +000025/* IEEE 802.1Qaz std supported values */
26#define IEEE_8021QAZ_MAX_TCS 8
27
28/* This structure contains the IEEE 802.1Qaz ETS managed object
29 *
30 * @willing: willing bit in ETS configuratin TLV
31 * @ets_cap: indicates supported capacity of ets feature
32 * @cbs: credit based shaper ets algorithm supported
33 * @tc_tx_bw: tc tx bandwidth indexed by traffic class
34 * @tc_rx_bw: tc rx bandwidth indexed by traffic class
35 * @tc_tsa: TSA Assignment table, indexed by traffic class
36 * @prio_tc: priority assignment table mapping 8021Qp to traffic class
37 * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
38 * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
39 * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
40 *
41 * Recommended values are used to set fields in the ETS recommendation TLV
42 * with hardware offloaded LLDP.
43 *
44 * ----
45 * TSA Assignment 8 bit identifiers
46 * 0 strict priority
47 * 1 credit-based shaper
48 * 2 enhanced transmission selection
49 * 3-254 reserved
50 * 255 vendor specific
51 */
52struct ieee_ets {
53 __u8 willing;
54 __u8 ets_cap;
55 __u8 cbs;
56 __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
57 __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
58 __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
59 __u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
60 __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
61 __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
62 __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
63};
64
65/* This structure contains the IEEE 802.1Qaz PFC managed object
66 *
67 * @pfc_cap: Indicates the number of traffic classes on the local device
68 * that may simultaneously have PFC enabled.
69 * @pfc_en: bitmap indicating pfc enabled traffic classes
70 * @mbc: enable macsec bypass capability
71 * @delay: the allowance made for a round-trip propagation delay of the
72 * link in bits.
73 * @requests: count of the sent pfc frames
74 * @indications: count of the received pfc frames
75 */
76struct ieee_pfc {
77 __u8 pfc_cap;
78 __u8 pfc_en;
79 __u8 mbc;
80 __u16 delay;
81 __u64 requests[IEEE_8021QAZ_MAX_TCS];
82 __u64 indications[IEEE_8021QAZ_MAX_TCS];
83};
84
John Fastabend9ab933a2010-12-30 09:26:31 +000085/* This structure contains the IEEE 802.1Qaz APP managed object. This
86 * object is also used for the CEE std as well. There is no difference
87 * between the objects.
John Fastabend3e290272010-12-30 09:25:46 +000088 *
89 * @selector: protocol identifier type
90 * @protocol: protocol of type indicated
91 * @priority: 3-bit unsigned integer indicating priority
92 *
93 * ----
94 * Selector field values
95 * 0 Reserved
96 * 1 Ethertype
97 * 2 Well known port number over TCP or SCTP
98 * 3 Well known port number over UDP or DCCP
99 * 4 Well known port number over TCP, SCTP, UDP, or DCCP
100 * 5-7 Reserved
101 */
102struct dcb_app {
103 __u8 selector;
104 __u32 protocol;
105 __u8 priority;
106};
107
Alexander Duyck2f90b862008-11-20 20:52:10 -0800108struct dcbmsg {
Chris Leech5c252222009-02-27 10:01:36 +0000109 __u8 dcb_family;
Alexander Duyck2f90b862008-11-20 20:52:10 -0800110 __u8 cmd;
111 __u16 dcb_pad;
112};
113
114/**
115 * enum dcbnl_commands - supported DCB commands
116 *
117 * @DCB_CMD_UNDEFINED: unspecified command to catch errors
118 * @DCB_CMD_GSTATE: request the state of DCB in the device
119 * @DCB_CMD_SSTATE: set the state of DCB in the device
120 * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
121 * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
122 * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
123 * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
124 * @DCB_CMD_PFC_GCFG: request the priority flow control configuration
125 * @DCB_CMD_PFC_SCFG: set the priority flow control configuration
126 * @DCB_CMD_SET_ALL: apply all changes to the underlying device
127 * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
128 * device. Only useful when using bonding.
Alexander Duyck46132182008-11-20 21:05:08 -0800129 * @DCB_CMD_GCAP: request the DCB capabilities of the device
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800130 * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
131 * @DCB_CMD_SNUMTCS: set the number of traffic classes
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800132 * @DCB_CMD_GBCN: set backward congestion notification configuration
133 * @DCB_CMD_SBCN: get backward congestion notification configration.
Yi Zou0f6f2902009-08-31 12:32:34 +0000134 * @DCB_CMD_GAPP: get application protocol configuration
135 * @DCB_CMD_SAPP: set application protocol configuration
John Fastabend3e290272010-12-30 09:25:46 +0000136 * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
137 * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
Shmulik Ravid6241b622010-12-30 06:26:48 +0000138 * @DCB_CMD_GDCBX: get DCBX engine configuration
139 * @DCB_CMD_SDCBX: set DCBX engine configuration
Alexander Duyck2f90b862008-11-20 20:52:10 -0800140 */
141enum dcbnl_commands {
142 DCB_CMD_UNDEFINED,
143
144 DCB_CMD_GSTATE,
145 DCB_CMD_SSTATE,
146
147 DCB_CMD_PGTX_GCFG,
148 DCB_CMD_PGTX_SCFG,
149 DCB_CMD_PGRX_GCFG,
150 DCB_CMD_PGRX_SCFG,
151
152 DCB_CMD_PFC_GCFG,
153 DCB_CMD_PFC_SCFG,
154
155 DCB_CMD_SET_ALL,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800156
Alexander Duyck2f90b862008-11-20 20:52:10 -0800157 DCB_CMD_GPERM_HWADDR,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800158
Alexander Duyck46132182008-11-20 21:05:08 -0800159 DCB_CMD_GCAP,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800160
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800161 DCB_CMD_GNUMTCS,
162 DCB_CMD_SNUMTCS,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800163
Alexander Duyck0eb3aa92008-11-20 21:09:23 -0800164 DCB_CMD_PFC_GSTATE,
165 DCB_CMD_PFC_SSTATE,
Alexander Duyck2f90b862008-11-20 20:52:10 -0800166
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800167 DCB_CMD_BCN_GCFG,
168 DCB_CMD_BCN_SCFG,
169
Yi Zou0f6f2902009-08-31 12:32:34 +0000170 DCB_CMD_GAPP,
171 DCB_CMD_SAPP,
172
John Fastabend3e290272010-12-30 09:25:46 +0000173 DCB_CMD_IEEE_SET,
174 DCB_CMD_IEEE_GET,
175
Shmulik Ravid6241b622010-12-30 06:26:48 +0000176 DCB_CMD_GDCBX,
177 DCB_CMD_SDCBX,
178
Alexander Duyck2f90b862008-11-20 20:52:10 -0800179 __DCB_CMD_ENUM_MAX,
180 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
181};
182
Alexander Duyck2f90b862008-11-20 20:52:10 -0800183/**
184 * enum dcbnl_attrs - DCB top-level netlink attributes
185 *
186 * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
187 * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
188 * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
189 * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
190 * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
191 * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
192 * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
193 * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
194 * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
Alexander Duyck46132182008-11-20 21:05:08 -0800195 * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800196 * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800197 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
John Fastabend3e290272010-12-30 09:25:46 +0000198 * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
Shmulik Ravid6241b622010-12-30 06:26:48 +0000199 * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
Alexander Duyck2f90b862008-11-20 20:52:10 -0800200 */
201enum dcbnl_attrs {
202 DCB_ATTR_UNDEFINED,
203
204 DCB_ATTR_IFNAME,
205 DCB_ATTR_STATE,
206 DCB_ATTR_PFC_STATE,
207 DCB_ATTR_PFC_CFG,
208 DCB_ATTR_NUM_TC,
209 DCB_ATTR_PG_CFG,
210 DCB_ATTR_SET_ALL,
211 DCB_ATTR_PERM_HWADDR,
Alexander Duyck46132182008-11-20 21:05:08 -0800212 DCB_ATTR_CAP,
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800213 DCB_ATTR_NUMTCS,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800214 DCB_ATTR_BCN,
Yi Zou0f6f2902009-08-31 12:32:34 +0000215 DCB_ATTR_APP,
Alexander Duyck2f90b862008-11-20 20:52:10 -0800216
John Fastabend3e290272010-12-30 09:25:46 +0000217 /* IEEE std attributes */
218 DCB_ATTR_IEEE,
219
Shmulik Ravid6241b622010-12-30 06:26:48 +0000220 DCB_ATTR_DCBX,
221
Alexander Duyck2f90b862008-11-20 20:52:10 -0800222 __DCB_ATTR_ENUM_MAX,
223 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
224};
225
John Fastabend3e290272010-12-30 09:25:46 +0000226enum ieee_attrs {
227 DCB_ATTR_IEEE_UNSPEC,
228 DCB_ATTR_IEEE_ETS,
229 DCB_ATTR_IEEE_PFC,
230 DCB_ATTR_IEEE_APP_TABLE,
231 __DCB_ATTR_IEEE_MAX
232};
233#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
234
235enum ieee_attrs_app {
236 DCB_ATTR_IEEE_APP_UNSPEC,
237 DCB_ATTR_IEEE_APP,
238 __DCB_ATTR_IEEE_APP_MAX
239};
240#define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
241
Alexander Duyck2f90b862008-11-20 20:52:10 -0800242/**
243 * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
244 *
245 * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
246 * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
247 * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
248 * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
249 * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
250 * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
251 * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
252 * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
253 * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
254 * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
255 * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
256 *
257 */
258enum dcbnl_pfc_up_attrs {
259 DCB_PFC_UP_ATTR_UNDEFINED,
260
261 DCB_PFC_UP_ATTR_0,
262 DCB_PFC_UP_ATTR_1,
263 DCB_PFC_UP_ATTR_2,
264 DCB_PFC_UP_ATTR_3,
265 DCB_PFC_UP_ATTR_4,
266 DCB_PFC_UP_ATTR_5,
267 DCB_PFC_UP_ATTR_6,
268 DCB_PFC_UP_ATTR_7,
269 DCB_PFC_UP_ATTR_ALL,
270
271 __DCB_PFC_UP_ATTR_ENUM_MAX,
272 DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
273};
274
275/**
276 * enum dcbnl_pg_attrs - DCB Priority Group attributes
277 *
278 * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
279 * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
280 * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
281 * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
282 * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
283 * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
284 * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
285 * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
286 * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
287 * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
288 * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
289 * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
290 * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
291 * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
292 * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
293 * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
294 * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
295 * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
296 * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
297 * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
298 * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
299 *
300 */
301enum dcbnl_pg_attrs {
302 DCB_PG_ATTR_UNDEFINED,
303
304 DCB_PG_ATTR_TC_0,
305 DCB_PG_ATTR_TC_1,
306 DCB_PG_ATTR_TC_2,
307 DCB_PG_ATTR_TC_3,
308 DCB_PG_ATTR_TC_4,
309 DCB_PG_ATTR_TC_5,
310 DCB_PG_ATTR_TC_6,
311 DCB_PG_ATTR_TC_7,
312 DCB_PG_ATTR_TC_MAX,
313 DCB_PG_ATTR_TC_ALL,
314
315 DCB_PG_ATTR_BW_ID_0,
316 DCB_PG_ATTR_BW_ID_1,
317 DCB_PG_ATTR_BW_ID_2,
318 DCB_PG_ATTR_BW_ID_3,
319 DCB_PG_ATTR_BW_ID_4,
320 DCB_PG_ATTR_BW_ID_5,
321 DCB_PG_ATTR_BW_ID_6,
322 DCB_PG_ATTR_BW_ID_7,
323 DCB_PG_ATTR_BW_ID_MAX,
324 DCB_PG_ATTR_BW_ID_ALL,
325
326 __DCB_PG_ATTR_ENUM_MAX,
327 DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
328};
329
330/**
331 * enum dcbnl_tc_attrs - DCB Traffic Class attributes
332 *
333 * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
334 * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
335 * Valid values are: 0-7
336 * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
337 * Some devices may not support changing the
338 * user priority map of a TC.
339 * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
340 * 0 - none
341 * 1 - group strict
342 * 2 - link strict
343 * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
344 * not configured to use link strict priority,
345 * this is the percentage of bandwidth of the
346 * priority group this traffic class belongs to
347 * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
348 *
349 */
350enum dcbnl_tc_attrs {
351 DCB_TC_ATTR_PARAM_UNDEFINED,
352
353 DCB_TC_ATTR_PARAM_PGID,
354 DCB_TC_ATTR_PARAM_UP_MAPPING,
355 DCB_TC_ATTR_PARAM_STRICT_PRIO,
356 DCB_TC_ATTR_PARAM_BW_PCT,
357 DCB_TC_ATTR_PARAM_ALL,
358
359 __DCB_TC_ATTR_PARAM_ENUM_MAX,
360 DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
361};
362
363/**
Alexander Duyck46132182008-11-20 21:05:08 -0800364 * enum dcbnl_cap_attrs - DCB Capability attributes
365 *
366 * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
367 * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
368 * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
369 * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
370 * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
371 * traffic class mapping
372 * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
373 * number of traffic classes the device
374 * can be configured to use for Priority Groups
375 * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
376 * number of traffic classes the device can be
377 * configured to use for Priority Flow Control
378 * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
379 * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
380 * Notification
Shmulik Ravid6241b622010-12-30 06:26:48 +0000381 * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
382 *
Alexander Duyck46132182008-11-20 21:05:08 -0800383 */
384enum dcbnl_cap_attrs {
385 DCB_CAP_ATTR_UNDEFINED,
386 DCB_CAP_ATTR_ALL,
387 DCB_CAP_ATTR_PG,
388 DCB_CAP_ATTR_PFC,
389 DCB_CAP_ATTR_UP2TC,
390 DCB_CAP_ATTR_PG_TCS,
391 DCB_CAP_ATTR_PFC_TCS,
392 DCB_CAP_ATTR_GSP,
393 DCB_CAP_ATTR_BCN,
Shmulik Ravid6241b622010-12-30 06:26:48 +0000394 DCB_CAP_ATTR_DCBX,
Alexander Duyck46132182008-11-20 21:05:08 -0800395
396 __DCB_CAP_ATTR_ENUM_MAX,
397 DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
398};
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800399
400/**
Shmulik Ravid6241b622010-12-30 06:26:48 +0000401 * DCBX capability flags
402 *
403 * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
404 * 'set' routines are used to configure the device with
405 * the negotiated parameters
406 *
407 * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
408 * by another entity
409 * 'get' routines are used to retrieve the
410 * negotiated parameters
411 * 'set' routines can be used to set the initial
412 * negotiation configuration
413 *
414 * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
415 * supports the CEE protocol flavor
416 *
417 * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
418 * supports the IEEE protocol flavor
419 *
420 * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
421 * supports static configuration (i.e no actual
422 * negotiation is performed negotiated parameters equal
423 * the initial configuration)
424 *
425 */
426#define DCB_CAP_DCBX_HOST 0x01
427#define DCB_CAP_DCBX_LLD_MANAGED 0x02
428#define DCB_CAP_DCBX_VER_CEE 0x04
429#define DCB_CAP_DCBX_VER_IEEE 0x08
430#define DCB_CAP_DCBX_STATIC 0x10
431
432/**
Alexander Duyck33dbabc2008-11-20 21:08:19 -0800433 * enum dcbnl_numtcs_attrs - number of traffic classes
434 *
435 * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
436 * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
437 * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
438 * priority groups
439 * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
440 * support priority flow control
441 */
442enum dcbnl_numtcs_attrs {
443 DCB_NUMTCS_ATTR_UNDEFINED,
444 DCB_NUMTCS_ATTR_ALL,
445 DCB_NUMTCS_ATTR_PG,
446 DCB_NUMTCS_ATTR_PFC,
447
448 __DCB_NUMTCS_ATTR_ENUM_MAX,
449 DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
450};
451
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800452enum dcbnl_bcn_attrs{
453 DCB_BCN_ATTR_UNDEFINED = 0,
454
455 DCB_BCN_ATTR_RP_0,
456 DCB_BCN_ATTR_RP_1,
457 DCB_BCN_ATTR_RP_2,
458 DCB_BCN_ATTR_RP_3,
459 DCB_BCN_ATTR_RP_4,
460 DCB_BCN_ATTR_RP_5,
461 DCB_BCN_ATTR_RP_6,
462 DCB_BCN_ATTR_RP_7,
463 DCB_BCN_ATTR_RP_ALL,
464
Don Skidmoref4314e82008-12-21 20:10:29 -0800465 DCB_BCN_ATTR_BCNA_0,
466 DCB_BCN_ATTR_BCNA_1,
Alexander Duyck859ee3c2008-11-20 21:10:23 -0800467 DCB_BCN_ATTR_ALPHA,
468 DCB_BCN_ATTR_BETA,
469 DCB_BCN_ATTR_GD,
470 DCB_BCN_ATTR_GI,
471 DCB_BCN_ATTR_TMAX,
472 DCB_BCN_ATTR_TD,
473 DCB_BCN_ATTR_RMIN,
474 DCB_BCN_ATTR_W,
475 DCB_BCN_ATTR_RD,
476 DCB_BCN_ATTR_RU,
477 DCB_BCN_ATTR_WRTT,
478 DCB_BCN_ATTR_RI,
479 DCB_BCN_ATTR_C,
480 DCB_BCN_ATTR_ALL,
481
482 __DCB_BCN_ATTR_ENUM_MAX,
483 DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
484};
485
Alexander Duyck46132182008-11-20 21:05:08 -0800486/**
Alexander Duyck2f90b862008-11-20 20:52:10 -0800487 * enum dcb_general_attr_values - general DCB attribute values
488 *
489 * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
490 *
491 */
492enum dcb_general_attr_values {
493 DCB_ATTR_VALUE_UNDEFINED = 0xff
494};
495
Yi Zou0f6f2902009-08-31 12:32:34 +0000496#define DCB_APP_IDTYPE_ETHTYPE 0x00
497#define DCB_APP_IDTYPE_PORTNUM 0x01
498enum dcbnl_app_attrs {
499 DCB_APP_ATTR_UNDEFINED,
500
501 DCB_APP_ATTR_IDTYPE,
502 DCB_APP_ATTR_ID,
503 DCB_APP_ATTR_PRIORITY,
504
505 __DCB_APP_ATTR_ENUM_MAX,
506 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
507};
Alexander Duyck2f90b862008-11-20 20:52:10 -0800508
509#endif /* __LINUX_DCBNL_H__ */