1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright (c) 2008-2011, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 * Author: Lucy Liu <lucy.liu@intel.com>
21 #ifndef __LINUX_DCBNL_H__
22 #define __LINUX_DCBNL_H__
24 #include <linux/types.h>
26 /* IEEE 802.1Qaz std supported values */
27 #define IEEE_8021QAZ_MAX_TCS 8
29 #define IEEE_8021QAZ_TSA_STRICT 0
30 #define IEEE_8021QAZ_TSA_CB_SHAPER 1
31 #define IEEE_8021QAZ_TSA_ETS 2
32 #define IEEE_8021QAZ_TSA_VENDOR 255
34 /* This structure contains the IEEE 802.1Qaz ETS managed object
36 * @willing: willing bit in ETS configuration TLV
37 * @ets_cap: indicates supported capacity of ets feature
38 * @cbs: credit based shaper ets algorithm supported
39 * @tc_tx_bw: tc tx bandwidth indexed by traffic class
40 * @tc_rx_bw: tc rx bandwidth indexed by traffic class
41 * @tc_tsa: TSA Assignment table, indexed by traffic class
42 * @prio_tc: priority assignment table mapping 8021Qp to traffic class
43 * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
44 * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
45 * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
47 * Recommended values are used to set fields in the ETS recommendation TLV
48 * with hardware offloaded LLDP.
51 * TSA Assignment 8 bit identifiers
53 * 1 credit-based shaper
54 * 2 enhanced transmission selection
62 __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
63 __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
64 __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
65 __u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
66 __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
67 __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
68 __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
71 /* This structure contains rate limit extension to the IEEE 802.1Qaz ETS
73 * Values are 64 bits long and specified in Kbps to enable usage over both
74 * slow and very fast networks.
76 * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class
79 __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS];
82 enum dcbnl_cndd_states {
86 DCB_CNDD_INTERIOR_READY,
89 /* This structure contains the IEEE 802.1Qau QCN managed object.
91 *@rpg_enable: enable QCN RP
92 *@rppp_max_rps: maximum number of RPs allowed for this CNPV on this port
93 *@rpg_time_reset: time between rate increases if no CNMs received.
95 *@rpg_byte_reset: transmitted data between rate increases if no CNMs received.
97 *@rpg_threshold: The number of times rpByteStage or rpTimeStage can count
98 * before RP rate control state machine advances states
99 *@rpg_max_rate: the maxinun rate, in Mbits per second,
100 * at which an RP can transmit
101 *@rpg_ai_rate: The rate, in Mbits per second,
102 * used to increase rpTargetRate in the RPR_ACTIVE_INCREASE
103 *@rpg_hai_rate: The rate, in Mbits per second,
104 * used to increase rpTargetRate in the RPR_HYPER_INCREASE state
105 *@rpg_gd: Upon CNM receive, flow rate is limited to (Fb/Gd)*CurrentRate.
106 * rpgGd is given as log2(Gd), where Gd may only be powers of 2
107 *@rpg_min_dec_fac: The minimum factor by which the current transmit rate
108 * can be changed by reception of a CNM.
109 * value is given as percentage (1-100)
110 *@rpg_min_rate: The minimum value, in bits per second, for rate to limit
111 *@cndd_state_machine: The state of the congestion notification domain
112 * defense state machine, as defined by IEEE 802.3Qau
113 * section 32.1.1. In the interior ready state,
114 * the QCN capable hardware may add CN-TAG TLV to the
115 * outgoing traffic, to specifically identify outgoing
120 __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
121 __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
122 __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
123 __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
124 __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
125 __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
126 __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
127 __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
128 __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
129 __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
130 __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
131 __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
134 /* This structure contains the IEEE 802.1Qau QCN statistics.
136 *@rppp_rp_centiseconds: the number of RP-centiseconds accumulated
137 * by RPs at this priority level on this Port
138 *@rppp_created_rps: number of active RPs(flows) that react to CNMs
141 struct ieee_qcn_stats {
142 __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
143 __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
146 /* This structure contains the IEEE 802.1Qaz PFC managed object
148 * @pfc_cap: Indicates the number of traffic classes on the local device
149 * that may simultaneously have PFC enabled.
150 * @pfc_en: bitmap indicating pfc enabled traffic classes
151 * @mbc: enable macsec bypass capability
152 * @delay: the allowance made for a round-trip propagation delay of the
154 * @requests: count of the sent pfc frames
155 * @indications: count of the received pfc frames
162 __u64 requests[IEEE_8021QAZ_MAX_TCS];
163 __u64 indications[IEEE_8021QAZ_MAX_TCS];
166 #define IEEE_8021Q_MAX_PRIORITIES 8
167 #define DCBX_MAX_BUFFERS 8
168 struct dcbnl_buffer {
169 /* priority to buffer mapping */
170 __u8 prio2buffer[IEEE_8021Q_MAX_PRIORITIES];
171 /* buffer size in Bytes */
172 __u32 buffer_size[DCBX_MAX_BUFFERS];
176 /* CEE DCBX std supported values */
177 #define CEE_DCBX_MAX_PGS 8
178 #define CEE_DCBX_MAX_PRIO 8
181 * struct cee_pg - CEE Priority-Group managed object
183 * @willing: willing bit in the PG tlv
184 * @error: error bit in the PG tlv
185 * @pg_en: enable bit of the PG feature
186 * @tcs_supported: number of traffic classes supported
187 * @pg_bw: bandwidth percentage for each priority group
188 * @prio_pg: priority to PG mapping indexed by priority
195 __u8 pg_bw[CEE_DCBX_MAX_PGS];
196 __u8 prio_pg[CEE_DCBX_MAX_PGS];
200 * struct cee_pfc - CEE PFC managed object
202 * @willing: willing bit in the PFC tlv
203 * @error: error bit in the PFC tlv
204 * @pfc_en: bitmap indicating pfc enabled traffic classes
205 * @tcs_supported: number of traffic classes supported
214 /* IEEE 802.1Qaz std supported values */
215 #define IEEE_8021QAZ_APP_SEL_ETHERTYPE 1
216 #define IEEE_8021QAZ_APP_SEL_STREAM 2
217 #define IEEE_8021QAZ_APP_SEL_DGRAM 3
218 #define IEEE_8021QAZ_APP_SEL_ANY 4
219 #define IEEE_8021QAZ_APP_SEL_DSCP 5
221 /* Non-std selector values */
222 #define DCB_APP_SEL_PCP 255
224 /* This structure contains the IEEE 802.1Qaz APP managed object. This
225 * object is also used for the CEE std as well.
227 * @selector: protocol identifier type
228 * @protocol: protocol of type indicated
229 * @priority: 3-bit unsigned integer indicating priority for IEEE
230 * 8-bit 802.1p user priority bitmap for CEE
233 * Selector field values for IEEE 802.1Qaz
236 * 2 Well known port number over TCP or SCTP
237 * 3 Well known port number over UDP or DCCP
238 * 4 Well known port number over TCP, SCTP, UDP, or DCCP
239 * 5 Differentiated Services Code Point (DSCP) value
242 * Selector field values for CEE
244 * 1 Well known port number over TCP or UDP
253 #define IEEE_8021QAZ_APP_SEL_MAX 255
256 * struct dcb_peer_app_info - APP feature information sent by the peer
258 * @willing: willing bit in the peer APP tlv
259 * @error: error bit in the peer APP tlv
261 * In addition to this information the full peer APP tlv also contains
262 * a table of 'app_count' APP objects defined above.
264 struct dcb_peer_app_info {
276 * enum dcbnl_commands - supported DCB commands
278 * @DCB_CMD_UNDEFINED: unspecified command to catch errors
279 * @DCB_CMD_GSTATE: request the state of DCB in the device
280 * @DCB_CMD_SSTATE: set the state of DCB in the device
281 * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
282 * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
283 * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
284 * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
285 * @DCB_CMD_PFC_GCFG: request the priority flow control configuration
286 * @DCB_CMD_PFC_SCFG: set the priority flow control configuration
287 * @DCB_CMD_SET_ALL: apply all changes to the underlying device
288 * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
289 * device. Only useful when using bonding.
290 * @DCB_CMD_GCAP: request the DCB capabilities of the device
291 * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
292 * @DCB_CMD_SNUMTCS: set the number of traffic classes
293 * @DCB_CMD_GBCN: set backward congestion notification configuration
294 * @DCB_CMD_SBCN: get backward congestion notification configuration.
295 * @DCB_CMD_GAPP: get application protocol configuration
296 * @DCB_CMD_SAPP: set application protocol configuration
297 * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
298 * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
299 * @DCB_CMD_GDCBX: get DCBX engine configuration
300 * @DCB_CMD_SDCBX: set DCBX engine configuration
301 * @DCB_CMD_GFEATCFG: get DCBX features flags
302 * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
303 * @DCB_CMD_CEE_GET: get CEE aggregated configuration
304 * @DCB_CMD_IEEE_DEL: delete IEEE 802.1Qaz configuration
306 enum dcbnl_commands {
322 DCB_CMD_GPERM_HWADDR,
351 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
355 * enum dcbnl_attrs - DCB top-level netlink attributes
357 * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
358 * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
359 * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
360 * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
361 * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
362 * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
363 * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
364 * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
365 * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
366 * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
367 * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
368 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
369 * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
370 * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
371 * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
372 * @DCB_ATTR_CEE: CEE std supported attributes (NLA_NESTED)
384 DCB_ATTR_PERM_HWADDR,
390 /* IEEE std attributes */
396 /* CEE nested attributes */
400 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
404 * enum ieee_attrs - IEEE 802.1Qaz get/set attributes
406 * @DCB_ATTR_IEEE_UNSPEC: unspecified
407 * @DCB_ATTR_IEEE_ETS: negotiated ETS configuration
408 * @DCB_ATTR_IEEE_PFC: negotiated PFC configuration
409 * @DCB_ATTR_IEEE_APP_TABLE: negotiated APP configuration
410 * @DCB_ATTR_IEEE_PEER_ETS: peer ETS configuration - get only
411 * @DCB_ATTR_IEEE_PEER_PFC: peer PFC configuration - get only
412 * @DCB_ATTR_IEEE_PEER_APP: peer APP tlv - get only
413 * @DCB_ATTR_DCB_APP_TRUST_TABLE: selector trust table
414 * @DCB_ATTR_DCB_REWR_TABLE: rewrite configuration
417 DCB_ATTR_IEEE_UNSPEC,
420 DCB_ATTR_IEEE_APP_TABLE,
421 DCB_ATTR_IEEE_PEER_ETS,
422 DCB_ATTR_IEEE_PEER_PFC,
423 DCB_ATTR_IEEE_PEER_APP,
424 DCB_ATTR_IEEE_MAXRATE,
426 DCB_ATTR_IEEE_QCN_STATS,
428 DCB_ATTR_DCB_APP_TRUST_TABLE,
429 DCB_ATTR_DCB_REWR_TABLE,
432 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
434 enum ieee_attrs_app {
435 DCB_ATTR_IEEE_APP_UNSPEC,
438 __DCB_ATTR_IEEE_APP_MAX
440 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
443 * enum cee_attrs - CEE DCBX get attributes.
445 * @DCB_ATTR_CEE_UNSPEC: unspecified
446 * @DCB_ATTR_CEE_PEER_PG: peer PG configuration - get only
447 * @DCB_ATTR_CEE_PEER_PFC: peer PFC configuration - get only
448 * @DCB_ATTR_CEE_PEER_APP_TABLE: peer APP tlv - get only
449 * @DCB_ATTR_CEE_TX_PG: TX PG configuration (DCB_CMD_PGTX_GCFG)
450 * @DCB_ATTR_CEE_RX_PG: RX PG configuration (DCB_CMD_PGRX_GCFG)
451 * @DCB_ATTR_CEE_PFC: PFC configuration (DCB_CMD_PFC_GCFG)
452 * @DCB_ATTR_CEE_APP_TABLE: APP configuration (multi DCB_CMD_GAPP)
453 * @DCB_ATTR_CEE_FEAT: DCBX features flags (DCB_CMD_GFEATCFG)
455 * An aggregated collection of the cee std negotiated parameters.
459 DCB_ATTR_CEE_PEER_PG,
460 DCB_ATTR_CEE_PEER_PFC,
461 DCB_ATTR_CEE_PEER_APP_TABLE,
465 DCB_ATTR_CEE_APP_TABLE,
469 #define DCB_ATTR_CEE_MAX (__DCB_ATTR_CEE_MAX - 1)
472 DCB_ATTR_CEE_PEER_APP_UNSPEC,
473 DCB_ATTR_CEE_PEER_APP_INFO,
474 DCB_ATTR_CEE_PEER_APP,
475 __DCB_ATTR_CEE_PEER_APP_MAX
477 #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
480 DCB_ATTR_CEE_APP_UNSPEC,
482 __DCB_ATTR_CEE_APP_MAX
484 #define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1)
487 * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
489 * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
490 * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
491 * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
492 * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
493 * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
494 * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
495 * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
496 * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
497 * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
498 * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
499 * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
502 enum dcbnl_pfc_up_attrs {
503 DCB_PFC_UP_ATTR_UNDEFINED,
515 __DCB_PFC_UP_ATTR_ENUM_MAX,
516 DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
520 * enum dcbnl_pg_attrs - DCB Priority Group attributes
522 * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
523 * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
524 * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
525 * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
526 * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
527 * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
528 * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
529 * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
530 * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
531 * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
532 * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
533 * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
534 * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
535 * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
536 * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
537 * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
538 * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
539 * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
540 * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
541 * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
542 * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
545 enum dcbnl_pg_attrs {
546 DCB_PG_ATTR_UNDEFINED,
567 DCB_PG_ATTR_BW_ID_MAX,
568 DCB_PG_ATTR_BW_ID_ALL,
570 __DCB_PG_ATTR_ENUM_MAX,
571 DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
575 * enum dcbnl_tc_attrs - DCB Traffic Class attributes
577 * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
578 * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
579 * Valid values are: 0-7
580 * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
581 * Some devices may not support changing the
582 * user priority map of a TC.
583 * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
587 * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
588 * not configured to use link strict priority,
589 * this is the percentage of bandwidth of the
590 * priority group this traffic class belongs to
591 * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
594 enum dcbnl_tc_attrs {
595 DCB_TC_ATTR_PARAM_UNDEFINED,
597 DCB_TC_ATTR_PARAM_PGID,
598 DCB_TC_ATTR_PARAM_UP_MAPPING,
599 DCB_TC_ATTR_PARAM_STRICT_PRIO,
600 DCB_TC_ATTR_PARAM_BW_PCT,
601 DCB_TC_ATTR_PARAM_ALL,
603 __DCB_TC_ATTR_PARAM_ENUM_MAX,
604 DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
608 * enum dcbnl_cap_attrs - DCB Capability attributes
610 * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
611 * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
612 * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
613 * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
614 * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
615 * traffic class mapping
616 * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
617 * number of traffic classes the device
618 * can be configured to use for Priority Groups
619 * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
620 * number of traffic classes the device can be
621 * configured to use for Priority Flow Control
622 * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
623 * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
625 * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
628 enum dcbnl_cap_attrs {
629 DCB_CAP_ATTR_UNDEFINED,
635 DCB_CAP_ATTR_PFC_TCS,
640 __DCB_CAP_ATTR_ENUM_MAX,
641 DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
645 * DCBX capability flags
647 * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
648 * 'set' routines are used to configure the device with
649 * the negotiated parameters
651 * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
653 * 'get' routines are used to retrieve the
654 * negotiated parameters
655 * 'set' routines can be used to set the initial
656 * negotiation configuration
658 * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
659 * supports the CEE protocol flavor
661 * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
662 * supports the IEEE protocol flavor
664 * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
665 * supports static configuration (i.e no actual
666 * negotiation is performed negotiated parameters equal
667 * the initial configuration)
670 #define DCB_CAP_DCBX_HOST 0x01
671 #define DCB_CAP_DCBX_LLD_MANAGED 0x02
672 #define DCB_CAP_DCBX_VER_CEE 0x04
673 #define DCB_CAP_DCBX_VER_IEEE 0x08
674 #define DCB_CAP_DCBX_STATIC 0x10
677 * enum dcbnl_numtcs_attrs - number of traffic classes
679 * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
680 * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
681 * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
683 * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
684 * support priority flow control
686 enum dcbnl_numtcs_attrs {
687 DCB_NUMTCS_ATTR_UNDEFINED,
692 __DCB_NUMTCS_ATTR_ENUM_MAX,
693 DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
696 enum dcbnl_bcn_attrs{
697 DCB_BCN_ATTR_UNDEFINED = 0,
726 __DCB_BCN_ATTR_ENUM_MAX,
727 DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
731 * enum dcb_general_attr_values - general DCB attribute values
733 * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
736 enum dcb_general_attr_values {
737 DCB_ATTR_VALUE_UNDEFINED = 0xff
740 #define DCB_APP_IDTYPE_ETHTYPE 0x00
741 #define DCB_APP_IDTYPE_PORTNUM 0x01
742 enum dcbnl_app_attrs {
743 DCB_APP_ATTR_UNDEFINED,
747 DCB_APP_ATTR_PRIORITY,
749 __DCB_APP_ATTR_ENUM_MAX,
750 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
754 * enum dcbnl_featcfg_attrs - features conifiguration flags
756 * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
757 * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
758 * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
759 * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
761 * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
764 #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
765 #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
766 #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
767 #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
768 enum dcbnl_featcfg_attrs {
769 DCB_FEATCFG_ATTR_UNDEFINED,
770 DCB_FEATCFG_ATTR_ALL,
772 DCB_FEATCFG_ATTR_PFC,
773 DCB_FEATCFG_ATTR_APP,
775 __DCB_FEATCFG_ATTR_ENUM_MAX,
776 DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
779 #endif /* __LINUX_DCBNL_H__ */