diff options
author | Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com> | 2016-10-21 04:43:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-22 17:08:07 -0400 |
commit | ed0dd91515bbe19a19cfccca366cf163ed581cac (patch) | |
tree | f1b5c8308a9d51b6949dae9f4317b9bbc732c286 /drivers/net/ethernet/qlogic | |
parent | 0e191827383a6503a3bc547e63c74ff093f450f5 (diff) | |
download | op-kernel-dev-ed0dd91515bbe19a19cfccca366cf163ed581cac.zip op-kernel-dev-ed0dd91515bbe19a19cfccca366cf163ed581cac.tar.gz |
qede: Reconfigure rss indirection direction table when rss count is updated
Rx indirection table entries are in the range [0, (rss_count - 1)]. If
user reduces the rss count, the table entries may not be in the ccorrect
range. Need to reconfigure the table with new rss_count as a basis.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 7da184c..d47bdaa 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -822,6 +822,13 @@ static int qede_set_channels(struct net_device *dev, edev->req_queues = count; edev->req_num_tx = channels->tx_count; edev->req_num_rx = channels->rx_count; + /* Reset the indirection table if rx queue count is updated */ + if ((edev->req_queues - edev->req_num_tx) != QEDE_RSS_COUNT(edev)) { + edev->rss_params_inited &= ~QEDE_RSS_INDIR_INITED; + memset(&edev->rss_params.rss_ind_table, 0, + sizeof(edev->rss_params.rss_ind_table)); + } + if (netif_running(dev)) qede_reload(edev, NULL, NULL); |