aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dcbnl.h
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-08-31 08:32:34 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:24:30 -0400
commit0f6f290259896afdca30e1ff4a28aff8edd79a14 (patch)
tree6580c4443af4ce42f3a0df0ed1927c62acb8991c /include/linux/dcbnl.h
parent8450ff8cd7fba6e78c07d7c14bf4dc582f8a6c3d (diff)
dcbnl: Add support for setapp/getapp commands to dcbnl
This patch adds dcbnl command definitions to support setapp/getapp functionality from the IEEE 802.1Qaz Data Center Bridging Capability Exchange protocol (DCBX) specification. Section 3.3 defines the application protocol and its 802.1p user priority in DCBX, which is implemented here as a pair of setapp/getapp commands in the kernel dcbnl for setting and retrieving the user priority for an given application protocol. The protocol is identified by the combination of an id and an idtype. Currently, when idtype is 0, the corresponding id gives the ether type of this protocol, e.g., for FCoE, it will be 0x8906; when idtype is 1, then the corresponding id gives the TCP or UDP port number. For more information regarding DCBX spec., please refer to the following: http://www.ieee802.org/1/files/public/docs2008/ az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf Signed-off-by: Yi Zou <yi.zou@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dcbnl.h')
-rw-r--r--include/linux/dcbnl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index 7d2e10006188..b7cdbb4373df 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -50,6 +50,8 @@ struct dcbmsg {
50 * @DCB_CMD_SNUMTCS: set the number of traffic classes 50 * @DCB_CMD_SNUMTCS: set the number of traffic classes
51 * @DCB_CMD_GBCN: set backward congestion notification configuration 51 * @DCB_CMD_GBCN: set backward congestion notification configuration
52 * @DCB_CMD_SBCN: get backward congestion notification configration. 52 * @DCB_CMD_SBCN: get backward congestion notification configration.
53 * @DCB_CMD_GAPP: get application protocol configuration
54 * @DCB_CMD_SAPP: set application protocol configuration
53 */ 55 */
54enum dcbnl_commands { 56enum dcbnl_commands {
55 DCB_CMD_UNDEFINED, 57 DCB_CMD_UNDEFINED,
@@ -80,6 +82,9 @@ enum dcbnl_commands {
80 DCB_CMD_BCN_GCFG, 82 DCB_CMD_BCN_GCFG,
81 DCB_CMD_BCN_SCFG, 83 DCB_CMD_BCN_SCFG,
82 84
85 DCB_CMD_GAPP,
86 DCB_CMD_SAPP,
87
83 __DCB_CMD_ENUM_MAX, 88 __DCB_CMD_ENUM_MAX,
84 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, 89 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
85}; 90};
@@ -114,6 +119,7 @@ enum dcbnl_attrs {
114 DCB_ATTR_CAP, 119 DCB_ATTR_CAP,
115 DCB_ATTR_NUMTCS, 120 DCB_ATTR_NUMTCS,
116 DCB_ATTR_BCN, 121 DCB_ATTR_BCN,
122 DCB_ATTR_APP,
117 123
118 __DCB_ATTR_ENUM_MAX, 124 __DCB_ATTR_ENUM_MAX,
119 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, 125 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
@@ -338,5 +344,17 @@ enum dcb_general_attr_values {
338 DCB_ATTR_VALUE_UNDEFINED = 0xff 344 DCB_ATTR_VALUE_UNDEFINED = 0xff
339}; 345};
340 346
347#define DCB_APP_IDTYPE_ETHTYPE 0x00
348#define DCB_APP_IDTYPE_PORTNUM 0x01
349enum dcbnl_app_attrs {
350 DCB_APP_ATTR_UNDEFINED,
351
352 DCB_APP_ATTR_IDTYPE,
353 DCB_APP_ATTR_ID,
354 DCB_APP_ATTR_PRIORITY,
355
356 __DCB_APP_ATTR_ENUM_MAX,
357 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
358};
341 359
342#endif /* __LINUX_DCBNL_H__ */ 360#endif /* __LINUX_DCBNL_H__ */