[dpdk-stable] [PATCH 17.11 4/6] net/sfc: do not skip RSS configuration step on reconfigure

Andrew Rybchenko arybchenko at solarflare.com
Mon Dec 10 16:10:54 CET 2018


From: Ivan Malov <ivan.malov at oktetlabs.ru>

[ backported from upstream commit 5205c436a33e060d06f7f230e051b94be31d6d91 ]

Earlier a patch was made to support change of Rx queue
number. That patch added goto label in wrong place
because reconfiguration with the same number of queues
results in skipping not only queue init but also RSS
settings. If a user configures device with RSS multiqueue
mode and then wants to stop it and reconfigure without RSS,
this change will be ignored and RSS will continue working.

Move the label in the right place and rename it to describe it.

Fixes: 55a539003f1a ("net/sfc: support changing the number of receive queues")

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 4497d5f..238aa5e 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1341,7 +1341,7 @@ struct sfc_dp_rx sfc_efx_rx = {
 		goto fail_check_mode;
 
 	if (nb_rx_queues == sa->rxq_count)
-		goto done;
+		goto configure_rss;
 
 	if (sa->rxq_info == NULL) {
 		rc = ENOMEM;
@@ -1378,6 +1378,7 @@ struct sfc_dp_rx sfc_efx_rx = {
 		sa->rxq_count++;
 	}
 
+configure_rss:
 #if EFSYS_OPT_RX_SCALE
 	sa->rss_channels = (dev_conf->rxmode.mq_mode == ETH_MQ_RX_RSS) ?
 			   MIN(sa->rxq_count, EFX_MAXRSS) : 0;
@@ -1396,7 +1397,6 @@ struct sfc_dp_rx sfc_efx_rx = {
 	}
 #endif
 
-done:
 	return 0;
 
 fail_rx_process_adv_conf_rss:
-- 
1.8.3.1



More information about the stable mailing list