Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dcbnl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2011, 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 <[email protected]>
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 #define IEEE_8021QAZ_TSA_STRICT 0
29 #define IEEE_8021QAZ_TSA_CB_SHAPER 1
30 #define IEEE_8021QAZ_TSA_ETS 2
31 #define IEEE_8021QAZ_TSA_VENDOR 255
32 
33 /* This structure contains the IEEE 802.1Qaz ETS managed object
34  *
35  * @willing: willing bit in ETS configuration TLV
36  * @ets_cap: indicates supported capacity of ets feature
37  * @cbs: credit based shaper ets algorithm supported
38  * @tc_tx_bw: tc tx bandwidth indexed by traffic class
39  * @tc_rx_bw: tc rx bandwidth indexed by traffic class
40  * @tc_tsa: TSA Assignment table, indexed by traffic class
41  * @prio_tc: priority assignment table mapping 8021Qp to traffic class
42  * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
43  * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
44  * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
45  *
46  * Recommended values are used to set fields in the ETS recommendation TLV
47  * with hardware offloaded LLDP.
48  *
49  * ----
50  * TSA Assignment 8 bit identifiers
51  * 0 strict priority
52  * 1 credit-based shaper
53  * 2 enhanced transmission selection
54  * 3-254 reserved
55  * 255 vendor specific
56  */
57 struct ieee_ets {
68 };
69 
70 /* This structure contains rate limit extension to the IEEE 802.1Qaz ETS
71  * managed object.
72  * Values are 64 bits long and specified in Kbps to enable usage over both
73  * slow and very fast networks.
74  *
75  * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class
76  */
77 struct ieee_maxrate {
79 };
80 
81 /* This structure contains the IEEE 802.1Qaz PFC managed object
82  *
83  * @pfc_cap: Indicates the number of traffic classes on the local device
84  * that may simultaneously have PFC enabled.
85  * @pfc_en: bitmap indicating pfc enabled traffic classes
86  * @mbc: enable macsec bypass capability
87  * @delay: the allowance made for a round-trip propagation delay of the
88  * link in bits.
89  * @requests: count of the sent pfc frames
90  * @indications: count of the received pfc frames
91  */
92 struct ieee_pfc {
99 };
100 
101 /* CEE DCBX std supported values */
102 #define CEE_DCBX_MAX_PGS 8
103 #define CEE_DCBX_MAX_PRIO 8
104 
115 struct cee_pg {
122 };
123 
132 struct cee_pfc {
137 };
138 
139 /* IEEE 802.1Qaz std supported values */
140 #define IEEE_8021QAZ_APP_SEL_ETHERTYPE 1
141 #define IEEE_8021QAZ_APP_SEL_STREAM 2
142 #define IEEE_8021QAZ_APP_SEL_DGRAM 3
143 #define IEEE_8021QAZ_APP_SEL_ANY 4
144 
145 /* This structure contains the IEEE 802.1Qaz APP managed object. This
146  * object is also used for the CEE std as well. There is no difference
147  * between the objects.
148  *
149  * @selector: protocol identifier type
150  * @protocol: protocol of type indicated
151  * @priority: 3-bit unsigned integer indicating priority
152  *
153  * ----
154  * Selector field values
155  * 0 Reserved
156  * 1 Ethertype
157  * 2 Well known port number over TCP or SCTP
158  * 3 Well known port number over UDP or DCCP
159  * 4 Well known port number over TCP, SCTP, UDP, or DCCP
160  * 5-7 Reserved
161  */
162 struct dcb_app {
166 };
167 
180 };
181 
182 struct dcbmsg {
186 };
187 
221 
224 
229 
232 
234 
236 
238 
241 
244 
247 
250 
253 
256 
259 
262 
265 };
266 
289 
302 
303  /* IEEE std attributes */
305 
308 
309  /* CEE nested attributes */
311 
314 };
315 
337 };
338 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
339 
344 };
345 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
346 
362 enum cee_attrs {
373 };
374 #define DCB_ATTR_CEE_MAX (__DCB_ATTR_CEE_MAX - 1)
375 
381 };
382 #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
383 
388 };
389 #define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1)
390 
409 
419 
422 };
423 
452 
463 
474 
477 };
478 
501 
507 
510 };
511 
544 
547 };
548 
575 #define DCB_CAP_DCBX_HOST 0x01
576 #define DCB_CAP_DCBX_LLD_MANAGED 0x02
577 #define DCB_CAP_DCBX_VER_CEE 0x04
578 #define DCB_CAP_DCBX_VER_IEEE 0x08
579 #define DCB_CAP_DCBX_STATIC 0x10
580 
596 
599 };
600 
603 
613 
630 
633 };
634 
643 };
644 
645 #define DCB_APP_IDTYPE_ETHTYPE 0x00
646 #define DCB_APP_IDTYPE_PORTNUM 0x01
649 
653 
656 };
657 
669 #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
670 #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
671 #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
672 #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
679 
682 };
683 
684 #endif /* __LINUX_DCBNL_H__ */