Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / include / linux / dcbnl.h
1 /*
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
23 #include <linux/types.h>
24
25 /* 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  */
52 struct 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  */
76 struct 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
85 /* 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.
88  *
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  */
102 struct dcb_app {
103         __u8    selector;
104         __u32   protocol;
105         __u8    priority;
106 };
107
108 struct dcbmsg {
109         __u8               dcb_family;
110         __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.
129  * @DCB_CMD_GCAP: request the DCB capabilities of the device
130  * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
131  * @DCB_CMD_SNUMTCS: set the number of traffic classes
132  * @DCB_CMD_GBCN: set backward congestion notification configuration
133  * @DCB_CMD_SBCN: get backward congestion notification configration.
134  * @DCB_CMD_GAPP: get application protocol configuration
135  * @DCB_CMD_SAPP: set application protocol configuration
136  * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
137  * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
138  * @DCB_CMD_GDCBX: get DCBX engine configuration
139  * @DCB_CMD_SDCBX: set DCBX engine configuration
140  * @DCB_CMD_GFEATCFG: get DCBX features flags
141  * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
142  */
143 enum dcbnl_commands {
144         DCB_CMD_UNDEFINED,
145
146         DCB_CMD_GSTATE,
147         DCB_CMD_SSTATE,
148
149         DCB_CMD_PGTX_GCFG,
150         DCB_CMD_PGTX_SCFG,
151         DCB_CMD_PGRX_GCFG,
152         DCB_CMD_PGRX_SCFG,
153
154         DCB_CMD_PFC_GCFG,
155         DCB_CMD_PFC_SCFG,
156
157         DCB_CMD_SET_ALL,
158
159         DCB_CMD_GPERM_HWADDR,
160
161         DCB_CMD_GCAP,
162
163         DCB_CMD_GNUMTCS,
164         DCB_CMD_SNUMTCS,
165
166         DCB_CMD_PFC_GSTATE,
167         DCB_CMD_PFC_SSTATE,
168
169         DCB_CMD_BCN_GCFG,
170         DCB_CMD_BCN_SCFG,
171
172         DCB_CMD_GAPP,
173         DCB_CMD_SAPP,
174
175         DCB_CMD_IEEE_SET,
176         DCB_CMD_IEEE_GET,
177
178         DCB_CMD_GDCBX,
179         DCB_CMD_SDCBX,
180
181         DCB_CMD_GFEATCFG,
182         DCB_CMD_SFEATCFG,
183
184         __DCB_CMD_ENUM_MAX,
185         DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
186 };
187
188 /**
189  * enum dcbnl_attrs - DCB top-level netlink attributes
190  *
191  * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
192  * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
193  * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
194  * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
195  * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
196  * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
197  * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
198  * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
199  * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
200  * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
201  * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
202  * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
203  * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
204  * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
205  * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
206  */
207 enum dcbnl_attrs {
208         DCB_ATTR_UNDEFINED,
209
210         DCB_ATTR_IFNAME,
211         DCB_ATTR_STATE,
212         DCB_ATTR_PFC_STATE,
213         DCB_ATTR_PFC_CFG,
214         DCB_ATTR_NUM_TC,
215         DCB_ATTR_PG_CFG,
216         DCB_ATTR_SET_ALL,
217         DCB_ATTR_PERM_HWADDR,
218         DCB_ATTR_CAP,
219         DCB_ATTR_NUMTCS,
220         DCB_ATTR_BCN,
221         DCB_ATTR_APP,
222
223         /* IEEE std attributes */
224         DCB_ATTR_IEEE,
225
226         DCB_ATTR_DCBX,
227         DCB_ATTR_FEATCFG,
228
229         __DCB_ATTR_ENUM_MAX,
230         DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
231 };
232
233 enum ieee_attrs {
234         DCB_ATTR_IEEE_UNSPEC,
235         DCB_ATTR_IEEE_ETS,
236         DCB_ATTR_IEEE_PFC,
237         DCB_ATTR_IEEE_APP_TABLE,
238         __DCB_ATTR_IEEE_MAX
239 };
240 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
241
242 enum ieee_attrs_app {
243         DCB_ATTR_IEEE_APP_UNSPEC,
244         DCB_ATTR_IEEE_APP,
245         __DCB_ATTR_IEEE_APP_MAX
246 };
247 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
248
249 /**
250  * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
251  *
252  * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
253  * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
254  * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
255  * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
256  * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
257  * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
258  * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
259  * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
260  * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
261  * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
262  * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
263  *
264  */
265 enum dcbnl_pfc_up_attrs {
266         DCB_PFC_UP_ATTR_UNDEFINED,
267
268         DCB_PFC_UP_ATTR_0,
269         DCB_PFC_UP_ATTR_1,
270         DCB_PFC_UP_ATTR_2,
271         DCB_PFC_UP_ATTR_3,
272         DCB_PFC_UP_ATTR_4,
273         DCB_PFC_UP_ATTR_5,
274         DCB_PFC_UP_ATTR_6,
275         DCB_PFC_UP_ATTR_7,
276         DCB_PFC_UP_ATTR_ALL,
277
278         __DCB_PFC_UP_ATTR_ENUM_MAX,
279         DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
280 };
281
282 /**
283  * enum dcbnl_pg_attrs - DCB Priority Group attributes
284  *
285  * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
286  * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
287  * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
288  * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
289  * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
290  * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
291  * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
292  * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
293  * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
294  * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
295  * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
296  * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
297  * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
298  * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
299  * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
300  * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
301  * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
302  * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
303  * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
304  * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
305  * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
306  *
307  */
308 enum dcbnl_pg_attrs {
309         DCB_PG_ATTR_UNDEFINED,
310
311         DCB_PG_ATTR_TC_0,
312         DCB_PG_ATTR_TC_1,
313         DCB_PG_ATTR_TC_2,
314         DCB_PG_ATTR_TC_3,
315         DCB_PG_ATTR_TC_4,
316         DCB_PG_ATTR_TC_5,
317         DCB_PG_ATTR_TC_6,
318         DCB_PG_ATTR_TC_7,
319         DCB_PG_ATTR_TC_MAX,
320         DCB_PG_ATTR_TC_ALL,
321
322         DCB_PG_ATTR_BW_ID_0,
323         DCB_PG_ATTR_BW_ID_1,
324         DCB_PG_ATTR_BW_ID_2,
325         DCB_PG_ATTR_BW_ID_3,
326         DCB_PG_ATTR_BW_ID_4,
327         DCB_PG_ATTR_BW_ID_5,
328         DCB_PG_ATTR_BW_ID_6,
329         DCB_PG_ATTR_BW_ID_7,
330         DCB_PG_ATTR_BW_ID_MAX,
331         DCB_PG_ATTR_BW_ID_ALL,
332
333         __DCB_PG_ATTR_ENUM_MAX,
334         DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
335 };
336
337 /**
338  * enum dcbnl_tc_attrs - DCB Traffic Class attributes
339  *
340  * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
341  * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
342  *                          Valid values are:  0-7
343  * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
344  *                                Some devices may not support changing the
345  *                                user priority map of a TC.
346  * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
347  *                                 0 - none
348  *                                 1 - group strict
349  *                                 2 - link strict
350  * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
351  *                            not configured to use link strict priority,
352  *                            this is the percentage of bandwidth of the
353  *                            priority group this traffic class belongs to
354  * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
355  *
356  */
357 enum dcbnl_tc_attrs {
358         DCB_TC_ATTR_PARAM_UNDEFINED,
359
360         DCB_TC_ATTR_PARAM_PGID,
361         DCB_TC_ATTR_PARAM_UP_MAPPING,
362         DCB_TC_ATTR_PARAM_STRICT_PRIO,
363         DCB_TC_ATTR_PARAM_BW_PCT,
364         DCB_TC_ATTR_PARAM_ALL,
365
366         __DCB_TC_ATTR_PARAM_ENUM_MAX,
367         DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
368 };
369
370 /**
371  * enum dcbnl_cap_attrs - DCB Capability attributes
372  *
373  * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
374  * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
375  * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
376  * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
377  * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
378  *                               traffic class mapping
379  * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
380  *                                number of traffic classes the device
381  *                                can be configured to use for Priority Groups
382  * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
383  *                                 number of traffic classes the device can be
384  *                                 configured to use for Priority Flow Control
385  * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
386  * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
387  *                             Notification
388  * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
389  *
390  */
391 enum dcbnl_cap_attrs {
392         DCB_CAP_ATTR_UNDEFINED,
393         DCB_CAP_ATTR_ALL,
394         DCB_CAP_ATTR_PG,
395         DCB_CAP_ATTR_PFC,
396         DCB_CAP_ATTR_UP2TC,
397         DCB_CAP_ATTR_PG_TCS,
398         DCB_CAP_ATTR_PFC_TCS,
399         DCB_CAP_ATTR_GSP,
400         DCB_CAP_ATTR_BCN,
401         DCB_CAP_ATTR_DCBX,
402
403         __DCB_CAP_ATTR_ENUM_MAX,
404         DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
405 };
406
407 /**
408  * DCBX capability flags
409  *
410  * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
411  *                     'set' routines are used to configure the device with
412  *                     the negotiated parameters
413  *
414  * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
415  *                            by another entity
416  *                            'get' routines are used to retrieve the
417  *                            negotiated parameters
418  *                            'set' routines can be used to set the initial
419  *                            negotiation configuration
420  *
421  * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
422  *                        supports the CEE protocol flavor
423  *
424  * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
425  *                         supports the IEEE protocol flavor
426  *
427  * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
428  *                       supports static configuration (i.e no actual
429  *                       negotiation is performed negotiated parameters equal
430  *                       the initial configuration)
431  *
432  */
433 #define DCB_CAP_DCBX_HOST               0x01
434 #define DCB_CAP_DCBX_LLD_MANAGED        0x02
435 #define DCB_CAP_DCBX_VER_CEE            0x04
436 #define DCB_CAP_DCBX_VER_IEEE           0x08
437 #define DCB_CAP_DCBX_STATIC             0x10
438
439 /**
440  * enum dcbnl_numtcs_attrs - number of traffic classes
441  *
442  * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
443  * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
444  * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
445  *                               priority groups
446  * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
447  *                                support priority flow control
448  */
449 enum dcbnl_numtcs_attrs {
450         DCB_NUMTCS_ATTR_UNDEFINED,
451         DCB_NUMTCS_ATTR_ALL,
452         DCB_NUMTCS_ATTR_PG,
453         DCB_NUMTCS_ATTR_PFC,
454
455         __DCB_NUMTCS_ATTR_ENUM_MAX,
456         DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
457 };
458
459 enum dcbnl_bcn_attrs{
460         DCB_BCN_ATTR_UNDEFINED = 0,
461
462         DCB_BCN_ATTR_RP_0,
463         DCB_BCN_ATTR_RP_1,
464         DCB_BCN_ATTR_RP_2,
465         DCB_BCN_ATTR_RP_3,
466         DCB_BCN_ATTR_RP_4,
467         DCB_BCN_ATTR_RP_5,
468         DCB_BCN_ATTR_RP_6,
469         DCB_BCN_ATTR_RP_7,
470         DCB_BCN_ATTR_RP_ALL,
471
472         DCB_BCN_ATTR_BCNA_0,
473         DCB_BCN_ATTR_BCNA_1,
474         DCB_BCN_ATTR_ALPHA,
475         DCB_BCN_ATTR_BETA,
476         DCB_BCN_ATTR_GD,
477         DCB_BCN_ATTR_GI,
478         DCB_BCN_ATTR_TMAX,
479         DCB_BCN_ATTR_TD,
480         DCB_BCN_ATTR_RMIN,
481         DCB_BCN_ATTR_W,
482         DCB_BCN_ATTR_RD,
483         DCB_BCN_ATTR_RU,
484         DCB_BCN_ATTR_WRTT,
485         DCB_BCN_ATTR_RI,
486         DCB_BCN_ATTR_C,
487         DCB_BCN_ATTR_ALL,
488
489         __DCB_BCN_ATTR_ENUM_MAX,
490         DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
491 };
492
493 /**
494  * enum dcb_general_attr_values - general DCB attribute values
495  *
496  * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
497  *
498  */
499 enum dcb_general_attr_values {
500         DCB_ATTR_VALUE_UNDEFINED = 0xff
501 };
502
503 #define DCB_APP_IDTYPE_ETHTYPE  0x00
504 #define DCB_APP_IDTYPE_PORTNUM  0x01
505 enum dcbnl_app_attrs {
506         DCB_APP_ATTR_UNDEFINED,
507
508         DCB_APP_ATTR_IDTYPE,
509         DCB_APP_ATTR_ID,
510         DCB_APP_ATTR_PRIORITY,
511
512         __DCB_APP_ATTR_ENUM_MAX,
513         DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
514 };
515
516 /**
517  * enum dcbnl_featcfg_attrs - features conifiguration flags
518  *
519  * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
520  * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
521  * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
522  * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
523  *                                 flow control
524  * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
525  *
526  */
527 #define DCB_FEATCFG_ERROR       0x01    /* error in feature resolution */
528 #define DCB_FEATCFG_ENABLE      0x02    /* enable feature */
529 #define DCB_FEATCFG_WILLING     0x04    /* feature is willing */
530 #define DCB_FEATCFG_ADVERTISE   0x08    /* advertise feature */
531 enum dcbnl_featcfg_attrs {
532         DCB_FEATCFG_ATTR_UNDEFINED,
533         DCB_FEATCFG_ATTR_ALL,
534         DCB_FEATCFG_ATTR_PG,
535         DCB_FEATCFG_ATTR_PFC,
536         DCB_FEATCFG_ATTR_APP,
537
538         __DCB_FEATCFG_ATTR_ENUM_MAX,
539         DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
540 };
541
542 #endif /* __LINUX_DCBNL_H__ */