open-isns: Fix warnings reported by gcc-4.5.2
[open-iscsi.git] / usr / dcbnl.h
blob2216e636d8117ffacf2ed5bacdf76ef50eb53698
1 /*
2 * Local copy of the kernel's dcbnl.h
4 * Copyright (c) 2008-2011, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 * Author: Lucy Liu <lucy.liu@intel.com>
22 #ifndef __LINUX_DCBNL_H__
23 #define __LINUX_DCBNL_H__
25 #include <linux/types.h>
27 /* IEEE 802.1Qaz std supported values */
28 #define IEEE_8021QAZ_MAX_TCS 8
30 #define IEEE_8021QAZ_TSA_STRICT 0
31 #define IEEE_8021QAZ_TSA_CB_SHAPER 1
32 #define IEEE_8021QAZ_TSA_ETS 2
33 #define IEEE_8021QAZ_TSA_VENDOR 255
35 /* This structure contains the IEEE 802.1Qaz ETS managed object
37 * @willing: willing bit in ETS configuration TLV
38 * @ets_cap: indicates supported capacity of ets feature
39 * @cbs: credit based shaper ets algorithm supported
40 * @tc_tx_bw: tc tx bandwidth indexed by traffic class
41 * @tc_rx_bw: tc rx bandwidth indexed by traffic class
42 * @tc_tsa: TSA Assignment table, indexed by traffic class
43 * @prio_tc: priority assignment table mapping 8021Qp to traffic class
44 * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
45 * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
46 * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
48 * Recommended values are used to set fields in the ETS recommendation TLV
49 * with hardware offloaded LLDP.
51 * ----
52 * TSA Assignment 8 bit identifiers
53 * 0 strict priority
54 * 1 credit-based shaper
55 * 2 enhanced transmission selection
56 * 3-254 reserved
57 * 255 vendor specific
59 struct ieee_ets {
60 __u8 willing;
61 __u8 ets_cap;
62 __u8 cbs;
63 __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
64 __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
65 __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
66 __u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
67 __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
68 __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
69 __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
72 /* This structure contains the IEEE 802.1Qaz PFC managed object
74 * @pfc_cap: Indicates the number of traffic classes on the local device
75 * that may simultaneously have PFC enabled.
76 * @pfc_en: bitmap indicating pfc enabled traffic classes
77 * @mbc: enable macsec bypass capability
78 * @delay: the allowance made for a round-trip propagation delay of the
79 * link in bits.
80 * @requests: count of the sent pfc frames
81 * @indications: count of the received pfc frames
83 struct ieee_pfc {
84 __u8 pfc_cap;
85 __u8 pfc_en;
86 __u8 mbc;
87 __u16 delay;
88 __u64 requests[IEEE_8021QAZ_MAX_TCS];
89 __u64 indications[IEEE_8021QAZ_MAX_TCS];
92 /* CEE DCBX std supported values */
93 #define CEE_DCBX_MAX_PGS 8
94 #define CEE_DCBX_MAX_PRIO 8
96 /**
97 * struct cee_pg - CEE Priority-Group managed object
99 * @willing: willing bit in the PG tlv
100 * @error: error bit in the PG tlv
101 * @pg_en: enable bit of the PG feature
102 * @tcs_supported: number of traffic classes supported
103 * @pg_bw: bandwidth percentage for each priority group
104 * @prio_pg: priority to PG mapping indexed by priority
106 struct cee_pg {
107 __u8 willing;
108 __u8 error;
109 __u8 pg_en;
110 __u8 tcs_supported;
111 __u8 pg_bw[CEE_DCBX_MAX_PGS];
112 __u8 prio_pg[CEE_DCBX_MAX_PGS];
116 * struct cee_pfc - CEE PFC managed object
118 * @willing: willing bit in the PFC tlv
119 * @error: error bit in the PFC tlv
120 * @pfc_en: bitmap indicating pfc enabled traffic classes
121 * @tcs_supported: number of traffic classes supported
123 struct cee_pfc {
124 __u8 willing;
125 __u8 error;
126 __u8 pfc_en;
127 __u8 tcs_supported;
130 /* IEEE 802.1Qaz std supported values */
131 #define IEEE_8021QAZ_APP_SEL_ETHERTYPE 1
132 #define IEEE_8021QAZ_APP_SEL_STREAM 2
133 #define IEEE_8021QAZ_APP_SEL_DGRAM 3
134 #define IEEE_8021QAZ_APP_SEL_ANY 4
136 /* This structure contains the IEEE 802.1Qaz APP managed object. This
137 * object is also used for the CEE std as well. There is no difference
138 * between the objects.
140 * @selector: protocol identifier type
141 * @protocol: protocol of type indicated
142 * @priority: 3-bit unsigned integer indicating priority
144 * ----
145 * Selector field values
146 * 0 Reserved
147 * 1 Ethertype
148 * 2 Well known port number over TCP or SCTP
149 * 3 Well known port number over UDP or DCCP
150 * 4 Well known port number over TCP, SCTP, UDP, or DCCP
151 * 5-7 Reserved
153 struct dcb_app {
154 __u8 selector;
155 __u8 priority;
156 __u16 protocol;
160 * struct dcb_peer_app_info - APP feature information sent by the peer
162 * @willing: willing bit in the peer APP tlv
163 * @error: error bit in the peer APP tlv
165 * In addition to this information the full peer APP tlv also contains
166 * a table of 'app_count' APP objects defined above.
168 struct dcb_peer_app_info {
169 __u8 willing;
170 __u8 error;
173 struct dcbmsg {
174 __u8 dcb_family;
175 __u8 cmd;
176 __u16 dcb_pad;
180 * enum dcbnl_commands - supported DCB commands
182 * @DCB_CMD_UNDEFINED: unspecified command to catch errors
183 * @DCB_CMD_GSTATE: request the state of DCB in the device
184 * @DCB_CMD_SSTATE: set the state of DCB in the device
185 * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
186 * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
187 * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
188 * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
189 * @DCB_CMD_PFC_GCFG: request the priority flow control configuration
190 * @DCB_CMD_PFC_SCFG: set the priority flow control configuration
191 * @DCB_CMD_SET_ALL: apply all changes to the underlying device
192 * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
193 * device. Only useful when using bonding.
194 * @DCB_CMD_GCAP: request the DCB capabilities of the device
195 * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
196 * @DCB_CMD_SNUMTCS: set the number of traffic classes
197 * @DCB_CMD_GBCN: set backward congestion notification configuration
198 * @DCB_CMD_SBCN: get backward congestion notification configration.
199 * @DCB_CMD_GAPP: get application protocol configuration
200 * @DCB_CMD_SAPP: set application protocol configuration
201 * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
202 * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
203 * @DCB_CMD_GDCBX: get DCBX engine configuration
204 * @DCB_CMD_SDCBX: set DCBX engine configuration
205 * @DCB_CMD_GFEATCFG: get DCBX features flags
206 * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
207 * @DCB_CMD_CEE_GET: get CEE aggregated configuration
209 enum dcbnl_commands {
210 DCB_CMD_UNDEFINED,
212 DCB_CMD_GSTATE,
213 DCB_CMD_SSTATE,
215 DCB_CMD_PGTX_GCFG,
216 DCB_CMD_PGTX_SCFG,
217 DCB_CMD_PGRX_GCFG,
218 DCB_CMD_PGRX_SCFG,
220 DCB_CMD_PFC_GCFG,
221 DCB_CMD_PFC_SCFG,
223 DCB_CMD_SET_ALL,
225 DCB_CMD_GPERM_HWADDR,
227 DCB_CMD_GCAP,
229 DCB_CMD_GNUMTCS,
230 DCB_CMD_SNUMTCS,
232 DCB_CMD_PFC_GSTATE,
233 DCB_CMD_PFC_SSTATE,
235 DCB_CMD_BCN_GCFG,
236 DCB_CMD_BCN_SCFG,
238 DCB_CMD_GAPP,
239 DCB_CMD_SAPP,
241 DCB_CMD_IEEE_SET,
242 DCB_CMD_IEEE_GET,
244 DCB_CMD_GDCBX,
245 DCB_CMD_SDCBX,
247 DCB_CMD_GFEATCFG,
248 DCB_CMD_SFEATCFG,
250 DCB_CMD_CEE_GET,
252 __DCB_CMD_ENUM_MAX,
253 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
257 * enum dcbnl_attrs - DCB top-level netlink attributes
259 * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
260 * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
261 * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
262 * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
263 * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
264 * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
265 * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
266 * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
267 * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
268 * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
269 * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
270 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
271 * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
272 * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
273 * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
274 * @DCB_ATTR_CEE: CEE std supported attributes (NLA_NESTED)
276 enum dcbnl_attrs {
277 DCB_ATTR_UNDEFINED,
279 DCB_ATTR_IFNAME,
280 DCB_ATTR_STATE,
281 DCB_ATTR_PFC_STATE,
282 DCB_ATTR_PFC_CFG,
283 DCB_ATTR_NUM_TC,
284 DCB_ATTR_PG_CFG,
285 DCB_ATTR_SET_ALL,
286 DCB_ATTR_PERM_HWADDR,
287 DCB_ATTR_CAP,
288 DCB_ATTR_NUMTCS,
289 DCB_ATTR_BCN,
290 DCB_ATTR_APP,
292 /* IEEE std attributes */
293 DCB_ATTR_IEEE,
295 DCB_ATTR_DCBX,
296 DCB_ATTR_FEATCFG,
298 /* CEE nested attributes */
299 DCB_ATTR_CEE,
301 __DCB_ATTR_ENUM_MAX,
302 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
306 * enum ieee_attrs - IEEE 802.1Qaz get/set attributes
308 * @DCB_ATTR_IEEE_UNSPEC: unspecified
309 * @DCB_ATTR_IEEE_ETS: negotiated ETS configuration
310 * @DCB_ATTR_IEEE_PFC: negotiated PFC configuration
311 * @DCB_ATTR_IEEE_APP_TABLE: negotiated APP configuration
312 * @DCB_ATTR_IEEE_PEER_ETS: peer ETS configuration - get only
313 * @DCB_ATTR_IEEE_PEER_PFC: peer PFC configuration - get only
314 * @DCB_ATTR_IEEE_PEER_APP: peer APP tlv - get only
316 enum ieee_attrs {
317 DCB_ATTR_IEEE_UNSPEC,
318 DCB_ATTR_IEEE_ETS,
319 DCB_ATTR_IEEE_PFC,
320 DCB_ATTR_IEEE_APP_TABLE,
321 DCB_ATTR_IEEE_PEER_ETS,
322 DCB_ATTR_IEEE_PEER_PFC,
323 DCB_ATTR_IEEE_PEER_APP,
324 __DCB_ATTR_IEEE_MAX
326 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
328 enum ieee_attrs_app {
329 DCB_ATTR_IEEE_APP_UNSPEC,
330 DCB_ATTR_IEEE_APP,
331 __DCB_ATTR_IEEE_APP_MAX
333 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
336 * enum cee_attrs - CEE DCBX get attributes
338 * @DCB_ATTR_CEE_UNSPEC: unspecified
339 * @DCB_ATTR_CEE_PEER_PG: peer PG configuration - get only
340 * @DCB_ATTR_CEE_PEER_PFC: peer PFC configuration - get only
341 * @DCB_ATTR_CEE_PEER_APP: peer APP tlv - get only
343 enum cee_attrs {
344 DCB_ATTR_CEE_UNSPEC,
345 DCB_ATTR_CEE_PEER_PG,
346 DCB_ATTR_CEE_PEER_PFC,
347 DCB_ATTR_CEE_PEER_APP_TABLE,
348 __DCB_ATTR_CEE_MAX
350 #define DCB_ATTR_CEE_MAX (__DCB_ATTR_CEE_MAX - 1)
352 enum peer_app_attr {
353 DCB_ATTR_CEE_PEER_APP_UNSPEC,
354 DCB_ATTR_CEE_PEER_APP_INFO,
355 DCB_ATTR_CEE_PEER_APP,
356 __DCB_ATTR_CEE_PEER_APP_MAX
358 #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
361 * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
363 * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
364 * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
365 * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
366 * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
367 * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
368 * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
369 * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
370 * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
371 * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
372 * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
373 * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
376 enum dcbnl_pfc_up_attrs {
377 DCB_PFC_UP_ATTR_UNDEFINED,
379 DCB_PFC_UP_ATTR_0,
380 DCB_PFC_UP_ATTR_1,
381 DCB_PFC_UP_ATTR_2,
382 DCB_PFC_UP_ATTR_3,
383 DCB_PFC_UP_ATTR_4,
384 DCB_PFC_UP_ATTR_5,
385 DCB_PFC_UP_ATTR_6,
386 DCB_PFC_UP_ATTR_7,
387 DCB_PFC_UP_ATTR_ALL,
389 __DCB_PFC_UP_ATTR_ENUM_MAX,
390 DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
394 * enum dcbnl_pg_attrs - DCB Priority Group attributes
396 * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
397 * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
398 * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
399 * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
400 * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
401 * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
402 * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
403 * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
404 * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
405 * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
406 * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
407 * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
408 * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
409 * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
410 * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
411 * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
412 * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
413 * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
414 * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
415 * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
416 * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
419 enum dcbnl_pg_attrs {
420 DCB_PG_ATTR_UNDEFINED,
422 DCB_PG_ATTR_TC_0,
423 DCB_PG_ATTR_TC_1,
424 DCB_PG_ATTR_TC_2,
425 DCB_PG_ATTR_TC_3,
426 DCB_PG_ATTR_TC_4,
427 DCB_PG_ATTR_TC_5,
428 DCB_PG_ATTR_TC_6,
429 DCB_PG_ATTR_TC_7,
430 DCB_PG_ATTR_TC_MAX,
431 DCB_PG_ATTR_TC_ALL,
433 DCB_PG_ATTR_BW_ID_0,
434 DCB_PG_ATTR_BW_ID_1,
435 DCB_PG_ATTR_BW_ID_2,
436 DCB_PG_ATTR_BW_ID_3,
437 DCB_PG_ATTR_BW_ID_4,
438 DCB_PG_ATTR_BW_ID_5,
439 DCB_PG_ATTR_BW_ID_6,
440 DCB_PG_ATTR_BW_ID_7,
441 DCB_PG_ATTR_BW_ID_MAX,
442 DCB_PG_ATTR_BW_ID_ALL,
444 __DCB_PG_ATTR_ENUM_MAX,
445 DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
449 * enum dcbnl_tc_attrs - DCB Traffic Class attributes
451 * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
452 * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
453 * Valid values are: 0-7
454 * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
455 * Some devices may not support changing the
456 * user priority map of a TC.
457 * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
458 * 0 - none
459 * 1 - group strict
460 * 2 - link strict
461 * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
462 * not configured to use link strict priority,
463 * this is the percentage of bandwidth of the
464 * priority group this traffic class belongs to
465 * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
468 enum dcbnl_tc_attrs {
469 DCB_TC_ATTR_PARAM_UNDEFINED,
471 DCB_TC_ATTR_PARAM_PGID,
472 DCB_TC_ATTR_PARAM_UP_MAPPING,
473 DCB_TC_ATTR_PARAM_STRICT_PRIO,
474 DCB_TC_ATTR_PARAM_BW_PCT,
475 DCB_TC_ATTR_PARAM_ALL,
477 __DCB_TC_ATTR_PARAM_ENUM_MAX,
478 DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
482 * enum dcbnl_cap_attrs - DCB Capability attributes
484 * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
485 * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
486 * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
487 * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
488 * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
489 * traffic class mapping
490 * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
491 * number of traffic classes the device
492 * can be configured to use for Priority Groups
493 * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
494 * number of traffic classes the device can be
495 * configured to use for Priority Flow Control
496 * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
497 * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
498 * Notification
499 * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
502 enum dcbnl_cap_attrs {
503 DCB_CAP_ATTR_UNDEFINED,
504 DCB_CAP_ATTR_ALL,
505 DCB_CAP_ATTR_PG,
506 DCB_CAP_ATTR_PFC,
507 DCB_CAP_ATTR_UP2TC,
508 DCB_CAP_ATTR_PG_TCS,
509 DCB_CAP_ATTR_PFC_TCS,
510 DCB_CAP_ATTR_GSP,
511 DCB_CAP_ATTR_BCN,
512 DCB_CAP_ATTR_DCBX,
514 __DCB_CAP_ATTR_ENUM_MAX,
515 DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
519 * DCBX capability flags
521 * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
522 * 'set' routines are used to configure the device with
523 * the negotiated parameters
525 * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
526 * by another entity
527 * 'get' routines are used to retrieve the
528 * negotiated parameters
529 * 'set' routines can be used to set the initial
530 * negotiation configuration
532 * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
533 * supports the CEE protocol flavor
535 * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
536 * supports the IEEE protocol flavor
538 * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
539 * supports static configuration (i.e no actual
540 * negotiation is performed negotiated parameters equal
541 * the initial configuration)
544 #define DCB_CAP_DCBX_HOST 0x01
545 #define DCB_CAP_DCBX_LLD_MANAGED 0x02
546 #define DCB_CAP_DCBX_VER_CEE 0x04
547 #define DCB_CAP_DCBX_VER_IEEE 0x08
548 #define DCB_CAP_DCBX_STATIC 0x10
551 * enum dcbnl_numtcs_attrs - number of traffic classes
553 * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
554 * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
555 * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
556 * priority groups
557 * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
558 * support priority flow control
560 enum dcbnl_numtcs_attrs {
561 DCB_NUMTCS_ATTR_UNDEFINED,
562 DCB_NUMTCS_ATTR_ALL,
563 DCB_NUMTCS_ATTR_PG,
564 DCB_NUMTCS_ATTR_PFC,
566 __DCB_NUMTCS_ATTR_ENUM_MAX,
567 DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
570 enum dcbnl_bcn_attrs{
571 DCB_BCN_ATTR_UNDEFINED = 0,
573 DCB_BCN_ATTR_RP_0,
574 DCB_BCN_ATTR_RP_1,
575 DCB_BCN_ATTR_RP_2,
576 DCB_BCN_ATTR_RP_3,
577 DCB_BCN_ATTR_RP_4,
578 DCB_BCN_ATTR_RP_5,
579 DCB_BCN_ATTR_RP_6,
580 DCB_BCN_ATTR_RP_7,
581 DCB_BCN_ATTR_RP_ALL,
583 DCB_BCN_ATTR_BCNA_0,
584 DCB_BCN_ATTR_BCNA_1,
585 DCB_BCN_ATTR_ALPHA,
586 DCB_BCN_ATTR_BETA,
587 DCB_BCN_ATTR_GD,
588 DCB_BCN_ATTR_GI,
589 DCB_BCN_ATTR_TMAX,
590 DCB_BCN_ATTR_TD,
591 DCB_BCN_ATTR_RMIN,
592 DCB_BCN_ATTR_W,
593 DCB_BCN_ATTR_RD,
594 DCB_BCN_ATTR_RU,
595 DCB_BCN_ATTR_WRTT,
596 DCB_BCN_ATTR_RI,
597 DCB_BCN_ATTR_C,
598 DCB_BCN_ATTR_ALL,
600 __DCB_BCN_ATTR_ENUM_MAX,
601 DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
605 * enum dcb_general_attr_values - general DCB attribute values
607 * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
610 enum dcb_general_attr_values {
611 DCB_ATTR_VALUE_UNDEFINED = 0xff
614 #define DCB_APP_IDTYPE_ETHTYPE 0x00
615 #define DCB_APP_IDTYPE_PORTNUM 0x01
616 enum dcbnl_app_attrs {
617 DCB_APP_ATTR_UNDEFINED,
619 DCB_APP_ATTR_IDTYPE,
620 DCB_APP_ATTR_ID,
621 DCB_APP_ATTR_PRIORITY,
623 __DCB_APP_ATTR_ENUM_MAX,
624 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
628 * enum dcbnl_featcfg_attrs - features conifiguration flags
630 * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
631 * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
632 * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
633 * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
634 * flow control
635 * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
638 #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
639 #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
640 #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
641 #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
642 enum dcbnl_featcfg_attrs {
643 DCB_FEATCFG_ATTR_UNDEFINED,
644 DCB_FEATCFG_ATTR_ALL,
645 DCB_FEATCFG_ATTR_PG,
646 DCB_FEATCFG_ATTR_PFC,
647 DCB_FEATCFG_ATTR_APP,
649 __DCB_FEATCFG_ATTR_ENUM_MAX,
650 DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
653 #endif /* __LINUX_DCBNL_H__ */