[v1] net/ipn3ke: fix thread exit issue
Checks
Commit Message
Thread does not exit after driver is removed. When there is no
more representor exist, the variable 'num' will be 0 and thread
can exit safely at this time.
Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
---
drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi,
> -----Original Message-----
> From: Huang, Wei <wei.huang@intel.com>
> Sent: Friday, March 17, 2023 4:45 AM
> To: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com
> Cc: stable@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Tianfei
> <tianfei.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Huang, Wei
> <wei.huang@intel.com>
> Subject: [PATCH v1] net/ipn3ke: fix thread exit issue
>
> Thread does not exit after driver is removed. When there is no more
> representor exist, the variable 'num' will be 0 and thread can exit safely at
> this time.
>
> Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wei Huang <wei.huang@intel.com>
> ---
> drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index 2ef96a9..e50fc73 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
> }
> rte_delay_us(50 * MS);
>
> - if (num == 0xffffff)
> + if (num == 0 || num == 0xffffff)
> return NULL;
> }
>
> --
> 1.8.3.1
Acked-by: Rosen Xu <rosen.xu@intel.com>
> -----Original Message-----
> From: Xu, Rosen <rosen.xu@intel.com>
> Sent: Monday, March 20, 2023 2:54 PM
> To: Huang, Wei <wei.huang@intel.com>; dev@dpdk.org;
> thomas@monjalon.net; david.marchand@redhat.com
> Cc: stable@dpdk.org; Zhang, Tianfei <tianfei.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v1] net/ipn3ke: fix thread exit issue
>
> Hi,
>
> > -----Original Message-----
> > From: Huang, Wei <wei.huang@intel.com>
> > Sent: Friday, March 17, 2023 4:45 AM
> > To: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com
> > Cc: stable@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Tianfei
> > <tianfei.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Huang,
> > Wei <wei.huang@intel.com>
> > Subject: [PATCH v1] net/ipn3ke: fix thread exit issue
> >
> > Thread does not exit after driver is removed. When there is no more
> > representor exist, the variable 'num' will be 0 and thread can exit
> > safely at this time.
> >
> > Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Wei Huang <wei.huang@intel.com>
> > ---
> > drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> > b/drivers/net/ipn3ke/ipn3ke_representor.c
> > index 2ef96a9..e50fc73 100644
> > --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> > @@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
> > }
> > rte_delay_us(50 * MS);
> >
> > - if (num == 0xffffff)
> > + if (num == 0 || num == 0xffffff)
> > return NULL;
> > }
> >
> > --
> > 1.8.3.1
>
> Acked-by: Rosen Xu <rosen.xu@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
@@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
}
rte_delay_us(50 * MS);
- if (num == 0xffffff)
+ if (num == 0 || num == 0xffffff)
return NULL;
}