[dpdk-stable] [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
Xie, WeiX
weix.xie at intel.com
Tue Jan 12 03:25:02 CET 2021
Tested-by: Xie,WeiX < weix.xie at intel.com>
Regards,
Xie Wei
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zhang,Alvin
> Sent: Friday, January 8, 2021 3:29 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; Zhang, AlvinX <alvinx.zhang at intel.com>;
> stable at dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table
>
> From: Alvin Zhang <alvinx.zhang at 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 at dpdk.org
>
> Signed-off-by: Alvin Zhang <alvinx.zhang at 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
More information about the stable
mailing list