From: Sudarsana Reddy Kalluru Date: Fri, 21 Oct 2016 08:43:43 +0000 (-0400) Subject: qede: Reconfigure rss indirection direction table when rss count is updated X-Git-Tag: v4.1.12-93~2^2~217 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d9a1ac19ca7779d221ec801041efeb643ff668ce;p=users%2Fjedix%2Flinux-maple.git qede: Reconfigure rss indirection direction table when rss count is updated Orabug: 25477939 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 Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller (cherry picked from commit ed0dd91515bbe19a19cfccca366cf163ed581cac) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 0dc76d2c0699c..5b08aef618e51 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -750,6 +750,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);