* [dpdk-stable] [PATCH] net/ice: fix initialization of RSS look-up table
@ 2021-01-08 7:29 Zhang,Alvin
2021-01-12 2:25 ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
0 siblings, 1 reply; 3+ messages in thread
From: Zhang,Alvin @ 2021-01-08 7:29 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev, Alvin Zhang, stable
From: Alvin Zhang <alvinx.zhang@intel.com>
RSS look-up table initialization is done incorrectly due to divide-by-zero
error.
Add a check to rx-queue count.
Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9a5d6a5..9cef73e 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3268,10 +3268,12 @@ static int ice_init_rss(struct ice_pf *pf)
if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
- ret = ice_init_rss(pf);
- if (ret) {
- PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
- return ret;
+ if (dev->data->nb_rx_queues) {
+ ret = ice_init_rss(pf);
+ if (ret) {
+ PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
+ return ret;
+ }
}
return 0;
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
2021-01-08 7:29 [dpdk-stable] [PATCH] net/ice: fix initialization of RSS look-up table Zhang,Alvin
@ 2021-01-12 2:25 ` Xie, WeiX
2021-01-12 4:56 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Xie, WeiX @ 2021-01-12 2:25 UTC (permalink / raw)
To: Zhang, AlvinX, Zhang, Qi Z; +Cc: dev, Zhang, AlvinX, stable
Tested-by: Xie,WeiX < weix.xie@intel.com>
Regards,
Xie Wei
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang,Alvin
> Sent: Friday, January 8, 2021 3:29 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
>
> From: Alvin Zhang <alvinx.zhang@intel.com>
>
> RSS look-up table initialization is done incorrectly due to divide-by-zero error.
> Add a check to rx-queue count.
>
> Fixes: 50370662b727 ("net/ice: support device and queue ops")
> Cc: stable@dpdk.org
>
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
> drivers/net/ice/ice_ethdev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index 9a5d6a5..9cef73e 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -3268,10 +3268,12 @@ static int ice_init_rss(struct ice_pf *pf)
> if (dev->data->dev_conf.rxmode.mq_mode &
> ETH_MQ_RX_RSS_FLAG)
> dev->data->dev_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_RSS_HASH;
>
> - ret = ice_init_rss(pf);
> - if (ret) {
> - PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
> - return ret;
> + if (dev->data->nb_rx_queues) {
> + ret = ice_init_rss(pf);
> + if (ret) {
> + PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
> + return ret;
> + }
> }
>
> return 0;
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
2021-01-12 2:25 ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
@ 2021-01-12 4:56 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-01-12 4:56 UTC (permalink / raw)
To: Xie, WeiX, Zhang, AlvinX; +Cc: dev, Zhang, AlvinX, stable
> -----Original Message-----
> From: Xie, WeiX <weix.xie@intel.com>
> Sent: Tuesday, January 12, 2021 10:25 AM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
>
> Tested-by: Xie,WeiX < weix.xie@intel.com>
>
> Regards,
> Xie Wei
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang,Alvin
> > Sent: Friday, January 8, 2021 3:29 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up
> > table
> >
> > From: Alvin Zhang <alvinx.zhang@intel.com>
> >
> > RSS look-up table initialization is done incorrectly due to divide-by-zero error.
> > Add a check to rx-queue count.
> >
> > Fixes: 50370662b727 ("net/ice: support device and queue ops")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-12 4:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 7:29 [dpdk-stable] [PATCH] net/ice: fix initialization of RSS look-up table Zhang,Alvin
2021-01-12 2:25 ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
2021-01-12 4:56 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).