Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed0dd915 authored by Sudarsana Reddy Kalluru's avatar Sudarsana Reddy Kalluru Committed by David S. Miller
Browse files

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: default avatarSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e191827
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);