net/cpfl: fix fail to re-configure RSS

Message ID 20230616120003.41187-1-beilei.xing@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/cpfl: fix fail to re-configure RSS |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Xing, Beilei June 16, 2023, noon UTC
  From: Beilei Xing <beilei.xing@intel.com>

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")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/cpfl/cpfl_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
  

Comments

Jingjing Wu June 16, 2023, 8:40 a.m. UTC | #1
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Friday, June 16, 2023 8:00 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH] net/cpfl: fix fail to re-configure RSS
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> 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")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Jingjing Wu <jingjing.wu@intel.com>
  
Qi Zhang June 19, 2023, 12:44 a.m. UTC | #2
> -----Original Message-----
> From: Wu, Jingjing <jingjing.wu@intel.com>
> Sent: Friday, June 16, 2023 4:41 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/cpfl: fix fail to re-configure RSS
> 
> 
> 
> > -----Original Message-----
> > From: Xing, Beilei <beilei.xing@intel.com>
> > Sent: Friday, June 16, 2023 8:00 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Yuying
> > <yuying.zhang@intel.com>
> > Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> > Subject: [PATCH] net/cpfl: fix fail to re-configure RSS
> >
> > From: Beilei Xing <beilei.xing@intel.com>
> >
> > 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")
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> 
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index e96bf0a82e..9755ffe508 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -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 =