dcbnl.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  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. #ifndef __LINUX_DCBNL_H__
  20. #define __LINUX_DCBNL_H__
  21. #include <linux/types.h>
  22. /* IEEE 802.1Qaz std supported values */
  23. #define IEEE_8021QAZ_MAX_TCS 8
  24. /* This structure contains the IEEE 802.1Qaz ETS managed object
  25. *
  26. * @willing: willing bit in ETS configuratin TLV
  27. * @ets_cap: indicates supported capacity of ets feature
  28. * @cbs: credit based shaper ets algorithm supported
  29. * @tc_tx_bw: tc tx bandwidth indexed by traffic class
  30. * @tc_rx_bw: tc rx bandwidth indexed by traffic class
  31. * @tc_tsa: TSA Assignment table, indexed by traffic class
  32. * @prio_tc: priority assignment table mapping 8021Qp to traffic class
  33. * @tc_reco_bw: recommended tc bandwidth indexed by traffic class for TLV
  34. * @tc_reco_tsa: recommended tc bandwidth indexed by traffic class for TLV
  35. * @reco_prio_tc: recommended tc tx bandwidth indexed by traffic class for TLV
  36. *
  37. * Recommended values are used to set fields in the ETS recommendation TLV
  38. * with hardware offloaded LLDP.
  39. *
  40. * ----
  41. * TSA Assignment 8 bit identifiers
  42. * 0 strict priority
  43. * 1 credit-based shaper
  44. * 2 enhanced transmission selection
  45. * 3-254 reserved
  46. * 255 vendor specific
  47. */
  48. struct ieee_ets {
  49. __u8 willing;
  50. __u8 ets_cap;
  51. __u8 cbs;
  52. __u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
  53. __u8 tc_rx_bw[IEEE_8021QAZ_MAX_TCS];
  54. __u8 tc_tsa[IEEE_8021QAZ_MAX_TCS];
  55. __u8 prio_tc[IEEE_8021QAZ_MAX_TCS];
  56. __u8 tc_reco_bw[IEEE_8021QAZ_MAX_TCS];
  57. __u8 tc_reco_tsa[IEEE_8021QAZ_MAX_TCS];
  58. __u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
  59. };
  60. /* This structure contains the IEEE 802.1Qaz PFC managed object
  61. *
  62. * @pfc_cap: Indicates the number of traffic classes on the local device
  63. * that may simultaneously have PFC enabled.
  64. * @pfc_en: bitmap indicating pfc enabled traffic classes
  65. * @mbc: enable macsec bypass capability
  66. * @delay: the allowance made for a round-trip propagation delay of the
  67. * link in bits.
  68. * @requests: count of the sent pfc frames
  69. * @indications: count of the received pfc frames
  70. */
  71. struct ieee_pfc {
  72. __u8 pfc_cap;
  73. __u8 pfc_en;
  74. __u8 mbc;
  75. __u16 delay;
  76. __u64 requests[IEEE_8021QAZ_MAX_TCS];
  77. __u64 indications[IEEE_8021QAZ_MAX_TCS];
  78. };
  79. /* This structure contains the IEEE 802.1Qaz APP managed object. This
  80. * object is also used for the CEE std as well. There is no difference
  81. * between the objects.
  82. *
  83. * @selector: protocol identifier type
  84. * @protocol: protocol of type indicated
  85. * @priority: 3-bit unsigned integer indicating priority
  86. *
  87. * ----
  88. * Selector field values
  89. * 0 Reserved
  90. * 1 Ethertype
  91. * 2 Well known port number over TCP or SCTP
  92. * 3 Well known port number over UDP or DCCP
  93. * 4 Well known port number over TCP, SCTP, UDP, or DCCP
  94. * 5-7 Reserved
  95. */
  96. struct dcb_app {
  97. __u8 selector;
  98. __u8 priority;
  99. __u16 protocol;
  100. };
  101. struct dcbmsg {
  102. __u8 dcb_family;
  103. __u8 cmd;
  104. __u16 dcb_pad;
  105. };
  106. /**
  107. * enum dcbnl_commands - supported DCB commands
  108. *
  109. * @DCB_CMD_UNDEFINED: unspecified command to catch errors
  110. * @DCB_CMD_GSTATE: request the state of DCB in the device
  111. * @DCB_CMD_SSTATE: set the state of DCB in the device
  112. * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
  113. * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
  114. * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
  115. * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
  116. * @DCB_CMD_PFC_GCFG: request the priority flow control configuration
  117. * @DCB_CMD_PFC_SCFG: set the priority flow control configuration
  118. * @DCB_CMD_SET_ALL: apply all changes to the underlying device
  119. * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
  120. * device. Only useful when using bonding.
  121. * @DCB_CMD_GCAP: request the DCB capabilities of the device
  122. * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
  123. * @DCB_CMD_SNUMTCS: set the number of traffic classes
  124. * @DCB_CMD_GBCN: set backward congestion notification configuration
  125. * @DCB_CMD_SBCN: get backward congestion notification configration.
  126. * @DCB_CMD_GAPP: get application protocol configuration
  127. * @DCB_CMD_SAPP: set application protocol configuration
  128. * @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
  129. * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
  130. * @DCB_CMD_GDCBX: get DCBX engine configuration
  131. * @DCB_CMD_SDCBX: set DCBX engine configuration
  132. * @DCB_CMD_GFEATCFG: get DCBX features flags
  133. * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
  134. */
  135. enum dcbnl_commands {
  136. DCB_CMD_UNDEFINED,
  137. DCB_CMD_GSTATE,
  138. DCB_CMD_SSTATE,
  139. DCB_CMD_PGTX_GCFG,
  140. DCB_CMD_PGTX_SCFG,
  141. DCB_CMD_PGRX_GCFG,
  142. DCB_CMD_PGRX_SCFG,
  143. DCB_CMD_PFC_GCFG,
  144. DCB_CMD_PFC_SCFG,
  145. DCB_CMD_SET_ALL,
  146. DCB_CMD_GPERM_HWADDR,
  147. DCB_CMD_GCAP,
  148. DCB_CMD_GNUMTCS,
  149. DCB_CMD_SNUMTCS,
  150. DCB_CMD_PFC_GSTATE,
  151. DCB_CMD_PFC_SSTATE,
  152. DCB_CMD_BCN_GCFG,
  153. DCB_CMD_BCN_SCFG,
  154. DCB_CMD_GAPP,
  155. DCB_CMD_SAPP,
  156. DCB_CMD_IEEE_SET,
  157. DCB_CMD_IEEE_GET,
  158. DCB_CMD_GDCBX,
  159. DCB_CMD_SDCBX,
  160. DCB_CMD_GFEATCFG,
  161. DCB_CMD_SFEATCFG,
  162. __DCB_CMD_ENUM_MAX,
  163. DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
  164. };
  165. /**
  166. * enum dcbnl_attrs - DCB top-level netlink attributes
  167. *
  168. * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
  169. * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
  170. * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
  171. * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
  172. * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
  173. * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
  174. * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
  175. * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
  176. * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
  177. * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
  178. * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
  179. * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
  180. * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
  181. * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
  182. * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
  183. */
  184. enum dcbnl_attrs {
  185. DCB_ATTR_UNDEFINED,
  186. DCB_ATTR_IFNAME,
  187. DCB_ATTR_STATE,
  188. DCB_ATTR_PFC_STATE,
  189. DCB_ATTR_PFC_CFG,
  190. DCB_ATTR_NUM_TC,
  191. DCB_ATTR_PG_CFG,
  192. DCB_ATTR_SET_ALL,
  193. DCB_ATTR_PERM_HWADDR,
  194. DCB_ATTR_CAP,
  195. DCB_ATTR_NUMTCS,
  196. DCB_ATTR_BCN,
  197. DCB_ATTR_APP,
  198. /* IEEE std attributes */
  199. DCB_ATTR_IEEE,
  200. DCB_ATTR_DCBX,
  201. DCB_ATTR_FEATCFG,
  202. __DCB_ATTR_ENUM_MAX,
  203. DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
  204. };
  205. enum ieee_attrs {
  206. DCB_ATTR_IEEE_UNSPEC,
  207. DCB_ATTR_IEEE_ETS,
  208. DCB_ATTR_IEEE_PFC,
  209. DCB_ATTR_IEEE_APP_TABLE,
  210. __DCB_ATTR_IEEE_MAX
  211. };
  212. #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
  213. enum ieee_attrs_app {
  214. DCB_ATTR_IEEE_APP_UNSPEC,
  215. DCB_ATTR_IEEE_APP,
  216. __DCB_ATTR_IEEE_APP_MAX
  217. };
  218. #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
  219. /**
  220. * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
  221. *
  222. * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
  223. * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
  224. * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
  225. * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
  226. * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
  227. * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
  228. * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
  229. * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
  230. * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
  231. * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
  232. * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
  233. *
  234. */
  235. enum dcbnl_pfc_up_attrs {
  236. DCB_PFC_UP_ATTR_UNDEFINED,
  237. DCB_PFC_UP_ATTR_0,
  238. DCB_PFC_UP_ATTR_1,
  239. DCB_PFC_UP_ATTR_2,
  240. DCB_PFC_UP_ATTR_3,
  241. DCB_PFC_UP_ATTR_4,
  242. DCB_PFC_UP_ATTR_5,
  243. DCB_PFC_UP_ATTR_6,
  244. DCB_PFC_UP_ATTR_7,
  245. DCB_PFC_UP_ATTR_ALL,
  246. __DCB_PFC_UP_ATTR_ENUM_MAX,
  247. DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
  248. };
  249. /**
  250. * enum dcbnl_pg_attrs - DCB Priority Group attributes
  251. *
  252. * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
  253. * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
  254. * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
  255. * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
  256. * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
  257. * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
  258. * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
  259. * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
  260. * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
  261. * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
  262. * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
  263. * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
  264. * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
  265. * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
  266. * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
  267. * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
  268. * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
  269. * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
  270. * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
  271. * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
  272. * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
  273. *
  274. */
  275. enum dcbnl_pg_attrs {
  276. DCB_PG_ATTR_UNDEFINED,
  277. DCB_PG_ATTR_TC_0,
  278. DCB_PG_ATTR_TC_1,
  279. DCB_PG_ATTR_TC_2,
  280. DCB_PG_ATTR_TC_3,
  281. DCB_PG_ATTR_TC_4,
  282. DCB_PG_ATTR_TC_5,
  283. DCB_PG_ATTR_TC_6,
  284. DCB_PG_ATTR_TC_7,
  285. DCB_PG_ATTR_TC_MAX,
  286. DCB_PG_ATTR_TC_ALL,
  287. DCB_PG_ATTR_BW_ID_0,
  288. DCB_PG_ATTR_BW_ID_1,
  289. DCB_PG_ATTR_BW_ID_2,
  290. DCB_PG_ATTR_BW_ID_3,
  291. DCB_PG_ATTR_BW_ID_4,
  292. DCB_PG_ATTR_BW_ID_5,
  293. DCB_PG_ATTR_BW_ID_6,
  294. DCB_PG_ATTR_BW_ID_7,
  295. DCB_PG_ATTR_BW_ID_MAX,
  296. DCB_PG_ATTR_BW_ID_ALL,
  297. __DCB_PG_ATTR_ENUM_MAX,
  298. DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
  299. };
  300. /**
  301. * enum dcbnl_tc_attrs - DCB Traffic Class attributes
  302. *
  303. * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
  304. * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
  305. * Valid values are: 0-7
  306. * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
  307. * Some devices may not support changing the
  308. * user priority map of a TC.
  309. * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
  310. * 0 - none
  311. * 1 - group strict
  312. * 2 - link strict
  313. * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
  314. * not configured to use link strict priority,
  315. * this is the percentage of bandwidth of the
  316. * priority group this traffic class belongs to
  317. * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
  318. *
  319. */
  320. enum dcbnl_tc_attrs {
  321. DCB_TC_ATTR_PARAM_UNDEFINED,
  322. DCB_TC_ATTR_PARAM_PGID,
  323. DCB_TC_ATTR_PARAM_UP_MAPPING,
  324. DCB_TC_ATTR_PARAM_STRICT_PRIO,
  325. DCB_TC_ATTR_PARAM_BW_PCT,
  326. DCB_TC_ATTR_PARAM_ALL,
  327. __DCB_TC_ATTR_PARAM_ENUM_MAX,
  328. DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
  329. };
  330. /**
  331. * enum dcbnl_cap_attrs - DCB Capability attributes
  332. *
  333. * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
  334. * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
  335. * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
  336. * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
  337. * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
  338. * traffic class mapping
  339. * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
  340. * number of traffic classes the device
  341. * can be configured to use for Priority Groups
  342. * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
  343. * number of traffic classes the device can be
  344. * configured to use for Priority Flow Control
  345. * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
  346. * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
  347. * Notification
  348. * @DCB_CAP_ATTR_DCBX: (NLA_U8) device supports DCBX engine
  349. *
  350. */
  351. enum dcbnl_cap_attrs {
  352. DCB_CAP_ATTR_UNDEFINED,
  353. DCB_CAP_ATTR_ALL,
  354. DCB_CAP_ATTR_PG,
  355. DCB_CAP_ATTR_PFC,
  356. DCB_CAP_ATTR_UP2TC,
  357. DCB_CAP_ATTR_PG_TCS,
  358. DCB_CAP_ATTR_PFC_TCS,
  359. DCB_CAP_ATTR_GSP,
  360. DCB_CAP_ATTR_BCN,
  361. DCB_CAP_ATTR_DCBX,
  362. __DCB_CAP_ATTR_ENUM_MAX,
  363. DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
  364. };
  365. /**
  366. * DCBX capability flags
  367. *
  368. * @DCB_CAP_DCBX_HOST: DCBX negotiation is performed by the host LLDP agent.
  369. * 'set' routines are used to configure the device with
  370. * the negotiated parameters
  371. *
  372. * @DCB_CAP_DCBX_LLD_MANAGED: DCBX negotiation is not performed in the host but
  373. * by another entity
  374. * 'get' routines are used to retrieve the
  375. * negotiated parameters
  376. * 'set' routines can be used to set the initial
  377. * negotiation configuration
  378. *
  379. * @DCB_CAP_DCBX_VER_CEE: for a non-host DCBX engine, indicates the engine
  380. * supports the CEE protocol flavor
  381. *
  382. * @DCB_CAP_DCBX_VER_IEEE: for a non-host DCBX engine, indicates the engine
  383. * supports the IEEE protocol flavor
  384. *
  385. * @DCB_CAP_DCBX_STATIC: for a non-host DCBX engine, indicates the engine
  386. * supports static configuration (i.e no actual
  387. * negotiation is performed negotiated parameters equal
  388. * the initial configuration)
  389. *
  390. */
  391. #define DCB_CAP_DCBX_HOST 0x01
  392. #define DCB_CAP_DCBX_LLD_MANAGED 0x02
  393. #define DCB_CAP_DCBX_VER_CEE 0x04
  394. #define DCB_CAP_DCBX_VER_IEEE 0x08
  395. #define DCB_CAP_DCBX_STATIC 0x10
  396. /**
  397. * enum dcbnl_numtcs_attrs - number of traffic classes
  398. *
  399. * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
  400. * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
  401. * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
  402. * priority groups
  403. * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
  404. * support priority flow control
  405. */
  406. enum dcbnl_numtcs_attrs {
  407. DCB_NUMTCS_ATTR_UNDEFINED,
  408. DCB_NUMTCS_ATTR_ALL,
  409. DCB_NUMTCS_ATTR_PG,
  410. DCB_NUMTCS_ATTR_PFC,
  411. __DCB_NUMTCS_ATTR_ENUM_MAX,
  412. DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
  413. };
  414. enum dcbnl_bcn_attrs{
  415. DCB_BCN_ATTR_UNDEFINED = 0,
  416. DCB_BCN_ATTR_RP_0,
  417. DCB_BCN_ATTR_RP_1,
  418. DCB_BCN_ATTR_RP_2,
  419. DCB_BCN_ATTR_RP_3,
  420. DCB_BCN_ATTR_RP_4,
  421. DCB_BCN_ATTR_RP_5,
  422. DCB_BCN_ATTR_RP_6,
  423. DCB_BCN_ATTR_RP_7,
  424. DCB_BCN_ATTR_RP_ALL,
  425. DCB_BCN_ATTR_BCNA_0,
  426. DCB_BCN_ATTR_BCNA_1,
  427. DCB_BCN_ATTR_ALPHA,
  428. DCB_BCN_ATTR_BETA,
  429. DCB_BCN_ATTR_GD,
  430. DCB_BCN_ATTR_GI,
  431. DCB_BCN_ATTR_TMAX,
  432. DCB_BCN_ATTR_TD,
  433. DCB_BCN_ATTR_RMIN,
  434. DCB_BCN_ATTR_W,
  435. DCB_BCN_ATTR_RD,
  436. DCB_BCN_ATTR_RU,
  437. DCB_BCN_ATTR_WRTT,
  438. DCB_BCN_ATTR_RI,
  439. DCB_BCN_ATTR_C,
  440. DCB_BCN_ATTR_ALL,
  441. __DCB_BCN_ATTR_ENUM_MAX,
  442. DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
  443. };
  444. /**
  445. * enum dcb_general_attr_values - general DCB attribute values
  446. *
  447. * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
  448. *
  449. */
  450. enum dcb_general_attr_values {
  451. DCB_ATTR_VALUE_UNDEFINED = 0xff
  452. };
  453. #define DCB_APP_IDTYPE_ETHTYPE 0x00
  454. #define DCB_APP_IDTYPE_PORTNUM 0x01
  455. enum dcbnl_app_attrs {
  456. DCB_APP_ATTR_UNDEFINED,
  457. DCB_APP_ATTR_IDTYPE,
  458. DCB_APP_ATTR_ID,
  459. DCB_APP_ATTR_PRIORITY,
  460. __DCB_APP_ATTR_ENUM_MAX,
  461. DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
  462. };
  463. /**
  464. * enum dcbnl_featcfg_attrs - features conifiguration flags
  465. *
  466. * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
  467. * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
  468. * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
  469. * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
  470. * flow control
  471. * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
  472. *
  473. */
  474. #define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
  475. #define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
  476. #define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
  477. #define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
  478. enum dcbnl_featcfg_attrs {
  479. DCB_FEATCFG_ATTR_UNDEFINED,
  480. DCB_FEATCFG_ATTR_ALL,
  481. DCB_FEATCFG_ATTR_PG,
  482. DCB_FEATCFG_ATTR_PFC,
  483. DCB_FEATCFG_ATTR_APP,
  484. __DCB_FEATCFG_ATTR_ENUM_MAX,
  485. DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
  486. };
  487. #endif /* __LINUX_DCBNL_H__ */