mm, PM/Freezer: Disable OOM killer when tasks are frozen
[linux-2.6.git] / include / linux / dcbnl.h
index 32d32c1..7d2e100 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,11 @@ 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.
  */
 enum dcbnl_commands {
        DCB_CMD_UNDEFINED,
@@ -59,13 +66,24 @@ 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_ENUM_MAX,
        DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
 };
 
-
 /**
  * enum dcbnl_attrs - DCB top-level netlink attributes
  *
@@ -78,6 +96,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 +111,9 @@ 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_ENUM_MAX,
        DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
@@ -217,6 +241,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