提交 86b4db3b 编写于 作者: J John Fastabend 提交者: Jeff Kirsher

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: NJohn Fastabend <john.r.fastabend@intel.com>
Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 aba70d5e
...@@ -2939,6 +2939,10 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter) ...@@ -2939,6 +2939,10 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
u32 rxcsum; u32 rxcsum;
int i, j; int i, j;
u8 tcs = netdev_get_num_tc(adapter->netdev); u8 tcs = netdev_get_num_tc(adapter->netdev);
int maxq = adapter->ring_feature[RING_F_RSS].indices;
if (tcs)
maxq = min(maxq, adapter->num_tx_queues / tcs);
/* Fill out hash function seeds */ /* Fill out hash function seeds */
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
...@@ -2946,7 +2950,7 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter) ...@@ -2946,7 +2950,7 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
/* Fill out redirection table */ /* Fill out redirection table */
for (i = 0, j = 0; i < 128; i++, j++) { for (i = 0, j = 0; i < 128; i++, j++) {
if (j == adapter->ring_feature[RING_F_RSS].indices) if (j == maxq)
j = 0; j = 0;
/* reta = 4-byte sliding window of /* reta = 4-byte sliding window of
* 0x00..(indices-1)(indices-1)00..etc. */ * 0x00..(indices-1)(indices-1)00..etc. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册