diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 |
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. */ |