aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-04-26 03:26:19 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-06-21 04:21:10 -0400
commit86b4db3bcce714d6bdd8c056158821301624bf00 (patch)
treeda5f701a4e960b8384167b862b7dcc4e1d669c12
parentaba70d5e6c1c188fe45c1a782060440b6c2ea759 (diff)
ixgbe: setup redirection table for multiple packet buffers
Setup RSS redirection table to be compatible with multiple packet buffers. Currently, this works on 82599 devices because the RSS redirection index is masked by the number of queues per packet buffer. This sets the cap on the RSS table to maxq. 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>
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f829d361452..e81dc853922 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2939,6 +2939,10 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
2939 u32 rxcsum; 2939 u32 rxcsum;
2940 int i, j; 2940 int i, j;
2941 u8 tcs = netdev_get_num_tc(adapter->netdev); 2941 u8 tcs = netdev_get_num_tc(adapter->netdev);
2942 int maxq = adapter->ring_feature[RING_F_RSS].indices;
2943
2944 if (tcs)
2945 maxq = min(maxq, adapter->num_tx_queues / tcs);
2942 2946
2943 /* Fill out hash function seeds */ 2947 /* Fill out hash function seeds */
2944 for (i = 0; i < 10; i++) 2948 for (i = 0; i < 10; i++)
@@ -2946,7 +2950,7 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
2946 2950
2947 /* Fill out redirection table */ 2951 /* Fill out redirection table */
2948 for (i = 0, j = 0; i < 128; i++, j++) { 2952 for (i = 0, j = 0; i < 128; i++, j++) {
2949 if (j == adapter->ring_feature[RING_F_RSS].indices) 2953 if (j == maxq)
2950 j = 0; 2954 j = 0;
2951 /* reta = 4-byte sliding window of 2955 /* reta = 4-byte sliding window of
2952 * 0x00..(indices-1)(indices-1)00..etc. */ 2956 * 0x00..(indices-1)(indices-1)00..etc. */