aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_dcb.h
diff options
context:
space:
mode:
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>2009-02-27 10:44:48 -0500
committerDavid S. Miller <davem@davemloft.net>2009-03-01 03:24:35 -0500
commit235ea828a1640ed493562a5fe08aa666ff84fbc4 (patch)
tree11a5420b59fc14caca14d5100262adb34331cba9 /drivers/net/ixgbe/ixgbe_dcb.h
parent11afc1b1fd802c11dc0fa986c210602c177f1e21 (diff)
ixgbe: Add DCB for 82599, remove BCN support
This patch adds the DCB (Data Center Bridging) support for 82599 hardware. This is similar to how the 82598 DCB code works. This patch also removes the BCN (Backwards Congestion Notification) netlink configuration code from the driver. BCN was a pre-standard congestion notification framework, and was not what the IEEE body decided upon for standard congestion management. QCN (802.1Qau), Quantized Congestion Notification is the accepted standard, which is not supported by 82599, hence we remove the support altogether. Signed-off-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 'drivers/net/ixgbe/ixgbe_dcb.h')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb.h b/drivers/net/ixgbe/ixgbe_dcb.h
index 0da5c6d5bcaf..64a9fa15c059 100644
--- a/drivers/net/ixgbe/ixgbe_dcb.h
+++ b/drivers/net/ixgbe/ixgbe_dcb.h
@@ -75,6 +75,26 @@ enum strict_prio_type {
75 prio_link 75 prio_link
76}; 76};
77 77
78/* DCB capability definitions */
79#define IXGBE_DCB_PG_SUPPORT 0x00000001
80#define IXGBE_DCB_PFC_SUPPORT 0x00000002
81#define IXGBE_DCB_BCN_SUPPORT 0x00000004
82#define IXGBE_DCB_UP2TC_SUPPORT 0x00000008
83#define IXGBE_DCB_GSP_SUPPORT 0x00000010
84
85#define IXGBE_DCB_8_TC_SUPPORT 0x80
86
87struct dcb_support {
88 /* DCB capabilities */
89 u32 capabilities;
90
91 /* Each bit represents a number of TCs configurable in the hw.
92 * If 8 traffic classes can be configured, the value is 0x80.
93 */
94 u8 traffic_classes;
95 u8 pfc_traffic_classes;
96};
97
78/* Traffic class bandwidth allocation per direction */ 98/* Traffic class bandwidth allocation per direction */
79struct tc_bw_alloc { 99struct tc_bw_alloc {
80 u8 bwg_id; /* Bandwidth Group (BWG) ID */ 100 u8 bwg_id; /* Bandwidth Group (BWG) ID */
@@ -108,38 +128,18 @@ enum dcb_rx_pba_cfg {
108 pba_80_48 /* PBA[0-3] each use 80KB, PBA[4-7] each use 48KB */ 128 pba_80_48 /* PBA[0-3] each use 80KB, PBA[4-7] each use 48KB */
109}; 129};
110 130
111/* 131struct dcb_num_tcs {
112 * This structure contains many values encoded as fixed-point 132 u8 pg_tcs;
113 * numbers, meaning that some of bits are dedicated to the 133 u8 pfc_tcs;
114 * magnitude and others to the fraction part. In the comments
115 * this is shown as f=n, where n is the number of fraction bits.
116 * These fraction bits are always the low-order bits. The size
117 * of the magnitude is not specified.
118 */
119struct bcn_config {
120 u32 rp_admin_mode[MAX_TRAFFIC_CLASS]; /* BCN enabled, per TC */
121 u32 bcna_option[2]; /* BCNA Port + MAC Addr */
122 u32 rp_w; /* Derivative Weight, f=3 */
123 u32 rp_gi; /* Increase Gain, f=12 */
124 u32 rp_gd; /* Decrease Gain, f=12 */
125 u32 rp_ru; /* Rate Unit */
126 u32 rp_alpha; /* Max Decrease Factor, f=12 */
127 u32 rp_beta; /* Max Increase Factor, f=12 */
128 u32 rp_ri; /* Initial Rate */
129 u32 rp_td; /* Drift Interval Timer */
130 u32 rp_rd; /* Drift Increase */
131 u32 rp_tmax; /* Severe Congestion Backoff Timer Range */
132 u32 rp_rmin; /* Severe Congestion Restart Rate */
133 u32 rp_wrtt; /* RTT Moving Average Weight */
134}; 134};
135 135
136struct ixgbe_dcb_config { 136struct ixgbe_dcb_config {
137 struct bcn_config bcn; 137 struct dcb_support support;
138 138 struct dcb_num_tcs num_tcs;
139 struct tc_configuration tc_config[MAX_TRAFFIC_CLASS]; 139 struct tc_configuration tc_config[MAX_TRAFFIC_CLASS];
140 u8 bw_percentage[2][MAX_BW_GROUP]; /* One each for Tx/Rx */ 140 u8 bw_percentage[2][MAX_BW_GROUP]; /* One each for Tx/Rx */
141 141 bool pfc_mode_enable;
142 bool round_robin_enable; 142 bool round_robin_enable;
143 143
144 enum dcb_rx_pba_cfg rx_pba_cfg; 144 enum dcb_rx_pba_cfg rx_pba_cfg;
145 145