netfilter: xtables: symmetric COMPAT_XT_ALIGN definition
[safe/jmp/linux-2.6] / include / linux / dcbnl.h
index 32d32c1..b7cdbb4 100644 (file)
 #ifndef __LINUX_DCBNL_H__
 #define __LINUX_DCBNL_H__
 
+#include <linux/types.h>
+
 #define DCB_PROTO_VERSION 1
 
 struct dcbmsg {
-       unsigned char      dcb_family;
+       __u8               dcb_family;
        __u8               cmd;
        __u16              dcb_pad;
 };
@@ -43,6 +45,13 @@ struct dcbmsg {
  * @DCB_CMD_SET_ALL: apply all changes to the underlying device
  * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
  *                        device.  Only useful when using bonding.
+ * @DCB_CMD_GCAP: request the DCB capabilities of the device
+ * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
+ * @DCB_CMD_SNUMTCS: set the number of traffic classes
+ * @DCB_CMD_GBCN: set backward congestion notification configuration
+ * @DCB_CMD_SBCN: get backward congestion notification configration.
+ * @DCB_CMD_GAPP: get application protocol configuration
+ * @DCB_CMD_SAPP: set application protocol configuration
  */
 enum dcbnl_commands {
        DCB_CMD_UNDEFINED,
@@ -59,13 +68,27 @@ enum dcbnl_commands {
        DCB_CMD_PFC_SCFG,
 
        DCB_CMD_SET_ALL,
+
        DCB_CMD_GPERM_HWADDR,
 
+       DCB_CMD_GCAP,
+
+       DCB_CMD_GNUMTCS,
+       DCB_CMD_SNUMTCS,
+
+       DCB_CMD_PFC_GSTATE,
+       DCB_CMD_PFC_SSTATE,
+
+       DCB_CMD_BCN_GCFG,
+       DCB_CMD_BCN_SCFG,
+
+       DCB_CMD_GAPP,
+       DCB_CMD_SAPP,
+
        __DCB_CMD_ENUM_MAX,
        DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
 };
 
-
 /**
  * enum dcbnl_attrs - DCB top-level netlink attributes
  *
@@ -78,6 +101,9 @@ enum dcbnl_commands {
  * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
  * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
  * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
+ * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
+ * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
+ * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
  */
 enum dcbnl_attrs {
        DCB_ATTR_UNDEFINED,
@@ -90,6 +116,10 @@ enum dcbnl_attrs {
        DCB_ATTR_PG_CFG,
        DCB_ATTR_SET_ALL,
        DCB_ATTR_PERM_HWADDR,
+       DCB_ATTR_CAP,
+       DCB_ATTR_NUMTCS,
+       DCB_ATTR_BCN,
+       DCB_ATTR_APP,
 
        __DCB_ATTR_ENUM_MAX,
        DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
@@ -217,6 +247,94 @@ enum dcbnl_tc_attrs {
 };
 
 /**
+ * enum dcbnl_cap_attrs - DCB Capability attributes
+ *
+ * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
+ * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
+ * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
+ * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
+ * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
+ *                               traffic class mapping
+ * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
+ *                                number of traffic classes the device
+ *                                can be configured to use for Priority Groups
+ * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
+ *                                 number of traffic classes the device can be
+ *                                 configured to use for Priority Flow Control
+ * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
+ * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
+ *                             Notification
+ */
+enum dcbnl_cap_attrs {
+       DCB_CAP_ATTR_UNDEFINED,
+       DCB_CAP_ATTR_ALL,
+       DCB_CAP_ATTR_PG,
+       DCB_CAP_ATTR_PFC,
+       DCB_CAP_ATTR_UP2TC,
+       DCB_CAP_ATTR_PG_TCS,
+       DCB_CAP_ATTR_PFC_TCS,
+       DCB_CAP_ATTR_GSP,
+       DCB_CAP_ATTR_BCN,
+
+       __DCB_CAP_ATTR_ENUM_MAX,
+       DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
+};
+
+/**
+ * enum dcbnl_numtcs_attrs - number of traffic classes
+ *
+ * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
+ * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
+ * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
+ *                               priority groups
+ * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
+ *                                support priority flow control
+ */
+enum dcbnl_numtcs_attrs {
+       DCB_NUMTCS_ATTR_UNDEFINED,
+       DCB_NUMTCS_ATTR_ALL,
+       DCB_NUMTCS_ATTR_PG,
+       DCB_NUMTCS_ATTR_PFC,
+
+       __DCB_NUMTCS_ATTR_ENUM_MAX,
+       DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
+};
+
+enum dcbnl_bcn_attrs{
+       DCB_BCN_ATTR_UNDEFINED = 0,
+
+       DCB_BCN_ATTR_RP_0,
+       DCB_BCN_ATTR_RP_1,
+       DCB_BCN_ATTR_RP_2,
+       DCB_BCN_ATTR_RP_3,
+       DCB_BCN_ATTR_RP_4,
+       DCB_BCN_ATTR_RP_5,
+       DCB_BCN_ATTR_RP_6,
+       DCB_BCN_ATTR_RP_7,
+       DCB_BCN_ATTR_RP_ALL,
+
+       DCB_BCN_ATTR_BCNA_0,
+       DCB_BCN_ATTR_BCNA_1,
+       DCB_BCN_ATTR_ALPHA,
+       DCB_BCN_ATTR_BETA,
+       DCB_BCN_ATTR_GD,
+       DCB_BCN_ATTR_GI,
+       DCB_BCN_ATTR_TMAX,
+       DCB_BCN_ATTR_TD,
+       DCB_BCN_ATTR_RMIN,
+       DCB_BCN_ATTR_W,
+       DCB_BCN_ATTR_RD,
+       DCB_BCN_ATTR_RU,
+       DCB_BCN_ATTR_WRTT,
+       DCB_BCN_ATTR_RI,
+       DCB_BCN_ATTR_C,
+       DCB_BCN_ATTR_ALL,
+
+       __DCB_BCN_ATTR_ENUM_MAX,
+       DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
+};
+
+/**
  * enum dcb_general_attr_values - general DCB attribute values
  *
  * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
@@ -226,5 +344,17 @@ enum dcb_general_attr_values {
        DCB_ATTR_VALUE_UNDEFINED = 0xff
 };
 
+#define DCB_APP_IDTYPE_ETHTYPE 0x00
+#define DCB_APP_IDTYPE_PORTNUM 0x01
+enum dcbnl_app_attrs {
+       DCB_APP_ATTR_UNDEFINED,
+
+       DCB_APP_ATTR_IDTYPE,
+       DCB_APP_ATTR_ID,
+       DCB_APP_ATTR_PRIORITY,
+
+       __DCB_APP_ATTR_ENUM_MAX,
+       DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
+};
 
 #endif /* __LINUX_DCBNL_H__ */