aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-02-23 00:58:08 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-03-12 07:12:14 -0500
commit8187cd485b1a74b6ae258786b9ade3ecaafec318 (patch)
treeb5d78ae3c66968b72a94ee6765e6ec886e764445 /drivers/net/ixgbe
parent24095aa347a32673cf220fc0bd0b78d28ba0a69e (diff)
ixgbe: DCB: enable RSS to be used with DCB
RSS had previously been disabled when DCB was enabled because DCB was single queued per traffic class. Now that DCB implements multiple Tx/Rx rings per traffic class enable RSS. Here RSS hashes across the queues in the traffic class. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain.@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c32
2 files changed, 25 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index b7b6db3bbd59..91ff51c53b04 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -129,7 +129,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
129 netdev->netdev_ops->ndo_stop(netdev); 129 netdev->netdev_ops->ndo_stop(netdev);
130 ixgbe_clear_interrupt_scheme(adapter); 130 ixgbe_clear_interrupt_scheme(adapter);
131 131
132 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
133 switch (adapter->hw.mac.type) { 132 switch (adapter->hw.mac.type) {
134 case ixgbe_mac_82598EB: 133 case ixgbe_mac_82598EB:
135 adapter->last_lfc_mode = adapter->hw.fc.current_mode; 134 adapter->last_lfc_mode = adapter->hw.fc.current_mode;
@@ -162,7 +161,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
162 adapter->temp_dcb_cfg.pfc_mode_enable = false; 161 adapter->temp_dcb_cfg.pfc_mode_enable = false;
163 adapter->dcb_cfg.pfc_mode_enable = false; 162 adapter->dcb_cfg.pfc_mode_enable = false;
164 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; 163 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
165 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
166 switch (adapter->hw.mac.type) { 164 switch (adapter->hw.mac.type) {
167 case ixgbe_mac_82599EB: 165 case ixgbe_mac_82599EB:
168 case ixgbe_mac_X540: 166 case ixgbe_mac_X540:
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 3ce0f4f956df..be2e145646bf 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2892,17 +2892,20 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
2892 ); 2892 );
2893 2893
2894 switch (mask) { 2894 switch (mask) {
2895#ifdef CONFIG_IXGBE_DCB
2896 case (IXGBE_FLAG_DCB_ENABLED | IXGBE_FLAG_RSS_ENABLED):
2897 mrqc = IXGBE_MRQC_RTRSS8TCEN;
2898 break;
2899 case (IXGBE_FLAG_DCB_ENABLED):
2900 mrqc = IXGBE_MRQC_RT8TCEN;
2901 break;
2902#endif /* CONFIG_IXGBE_DCB */
2895 case (IXGBE_FLAG_RSS_ENABLED): 2903 case (IXGBE_FLAG_RSS_ENABLED):
2896 mrqc = IXGBE_MRQC_RSSEN; 2904 mrqc = IXGBE_MRQC_RSSEN;
2897 break; 2905 break;
2898 case (IXGBE_FLAG_SRIOV_ENABLED): 2906 case (IXGBE_FLAG_SRIOV_ENABLED):
2899 mrqc = IXGBE_MRQC_VMDQEN; 2907 mrqc = IXGBE_MRQC_VMDQEN;
2900 break; 2908 break;
2901#ifdef CONFIG_IXGBE_DCB
2902 case (IXGBE_FLAG_DCB_ENABLED):
2903 mrqc = IXGBE_MRQC_RT8TCEN;
2904 break;
2905#endif /* CONFIG_IXGBE_DCB */
2906 default: 2909 default:
2907 break; 2910 break;
2908 } 2911 }
@@ -3672,6 +3675,23 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
3672 3675
3673 /* reconfigure the hardware */ 3676 /* reconfigure the hardware */
3674 ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg); 3677 ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg);
3678
3679 /* Enable RSS Hash per TC */
3680 if (hw->mac.type != ixgbe_mac_82598EB) {
3681 int i;
3682 u32 reg = 0;
3683
3684 for (i = 0; i < MAX_TRAFFIC_CLASS; i++) {
3685 u8 msb = 0;
3686 u8 cnt = adapter->netdev->tc_to_txq[i].count;
3687
3688 while (cnt >>= 1)
3689 msb++;
3690
3691 reg |= msb << IXGBE_RQTC_SHIFT_TC(i);
3692 }
3693 IXGBE_WRITE_REG(hw, IXGBE_RQTC, reg);
3694 }
3675} 3695}
3676 3696
3677#endif 3697#endif
@@ -7343,8 +7363,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
7343 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) 7363 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
7344 adapter->flags &= ~(IXGBE_FLAG_RSS_ENABLED | 7364 adapter->flags &= ~(IXGBE_FLAG_RSS_ENABLED |
7345 IXGBE_FLAG_DCB_ENABLED); 7365 IXGBE_FLAG_DCB_ENABLED);
7346 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
7347 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
7348 7366
7349#ifdef CONFIG_IXGBE_DCB 7367#ifdef CONFIG_IXGBE_DCB
7350 netdev->dcbnl_ops = &dcbnl_ops; 7368 netdev->dcbnl_ops = &dcbnl_ops;