Skip to contentSkip to conversation

net/cpfl: fix fail to re-configure RSS

PATCH Applied [email protected] 3 participants 3 messages Jun 16, 2023 – Jun 19, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/cpfl: fix fail to re-configure RSS

From: Beilei Xing <[email protected]>

Currently, if launch testpmd with multiple queues and re-configure rxq with 'port config all rxq 1', Rx queue 0 may not receive packets. that's because RSS lookup tale is not re-configured when Rxq number is 1.
Although Rxq number is 1 and multi queue mode is RTE_ETH_MQ_RX_NONE, cpfl PMD should init RSS to allow RSS re-configuration.

Fixes cfbc66551a14 ("net/cpfl: support RSS")
---
 drivers/net/cpfl/cpfl_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/cpfl/cpfl_ethdev.c +3 -5
index e96bf0a82e..9755ffe508 100644
@@ -712,17 +712,15 @@ cpfl_dev_configure(struct rte_eth_dev *dev)
 		return -EINVAL;
 	}
 
-	if (base->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0 &&
-		conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) {
+	if (base->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0) {
 		ret = cpfl_init_rss(vport);
 		if (ret != 0) {
 			PMD_INIT_LOG(ERR, "Failed to init rss");
 			return ret;
 		}
-	} else {
+	} else if (conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) {
 		PMD_INIT_LOG(ERR, "RSS is not supported.");
-		if (conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS)
-			return -ENOTSUP;
+		return -ENOTSUP;
 	}
 
 	vport->max_pkt_len =
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Friday, June 16, 2023 8:00 PM
To: Wu, Jingjing <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>
Subject: [PATCH] net/cpfl: fix fail to re-configure RSS

From: Beilei Xing <[email protected]>

Currently, if launch testpmd with multiple queues and re-configure rxq with 'port config all rxq 1', Rx queue 0 may not receive packets. that's because RSS lookup tale is not re-configured when Rxq number is 1.
Although Rxq number is 1 and multi queue mode is RTE_ETH_MQ_RX_NONE, cpfl PMD should init RSS to allow RSS re-configuration.

Quoted 3 lines
Fixes cfbc66551a14 ("net/cpfl: support RSS")
Applied
#2 lore raw
Quoted 27 lines

-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Friday, June 16, 2023 4:41 PM
To: Xing, Beilei <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] net/cpfl: fix fail to re-configure RSS

Quoted 8 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Friday, June 16, 2023 8:00 PM
To: Wu, Jingjing <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>
Subject: [PATCH] net/cpfl: fix fail to re-configure RSS

Quoted 7 lines

From: Beilei Xing <[email protected]>

Currently, if launch testpmd with multiple queues and re-configure rxq with 'port config all rxq 1', Rx queue 0 may not receive packets. that's because RSS lookup tale is not re-configured when Rxq number is 1.
Although Rxq number is 1 and multi queue mode is

Quoted 8 lines

RTE_ETH_MQ_RX_NONE,

Quoted 5 lines

cpfl PMD should init RSS to allow RSS re-configuration.

Fixes cfbc66551a14 ("net/cpfl: support RSS")

Applied to dpdk-next-net-intel.

Thanks
Qi