DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK] /lib/eal: fix failed to stop device monitor error
@ 2022-02-11  8:41 wenxuanx.wu
  2022-02-13 11:29 ` Thomas Monjalon
  2022-03-01  9:57 ` David Marchand
  0 siblings, 2 replies; 6+ messages in thread
From: wenxuanx.wu @ 2022-02-11  8:41 UTC (permalink / raw)
  To: qiming.yang, qi.z.zhang; +Cc: dev, nhorman

From: Wenxuan Wu <wenxuanx.wu@intel.com>

The ret value in rte_dev_event_monitor_stop stands for whether the
monitor has been successfully closed ,and should not bind with
rte_intr_callback_unregister,so once it goes to the right exit point of
rte_dev_event_monitor, the ret value should be set to 0.

Also ,the refmonitor count has been carefully evaluated ,the value
change from 1 to 0 ,so there is no potential memory leak failure.

Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor")
Cc:stable@intel.com

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
---
 lib/eal/linux/eal_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index bde55a3d92..4646e8a550 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
 	close(rte_intr_fd_get(intr_handle));
 	rte_intr_instance_free(intr_handle);
 	intr_handle = NULL;
+	ret = 0;
 
 	monitor_refcount--;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [DPDK] /lib/eal: fix failed to stop device monitor error
  2022-02-11  8:41 [DPDK] /lib/eal: fix failed to stop device monitor error wenxuanx.wu
@ 2022-02-13 11:29 ` Thomas Monjalon
  2022-03-01  9:38   ` Wu, WenxuanX
  2022-03-01  9:57 ` David Marchand
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2022-02-13 11:29 UTC (permalink / raw)
  To: wenxuanx.wu; +Cc: qiming.yang, qi.z.zhang, dev, david.marchand, Harman Kalra

+Cc Harman, maintainer of interrupt subsystem.

11/02/2022 09:41, wenxuanx.wu@intel.com:
> From: Wenxuan Wu <wenxuanx.wu@intel.com>
> 
> The ret value in rte_dev_event_monitor_stop stands for whether the
> monitor has been successfully closed ,and should not bind with
> rte_intr_callback_unregister,so once it goes to the right exit point of
> rte_dev_event_monitor, the ret value should be set to 0.
> 
> Also ,the refmonitor count has been carefully evaluated ,the value
> change from 1 to 0 ,so there is no potential memory leak failure.
> 
> Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor")
> Cc:stable@intel.com
> 
> Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> ---
>  lib/eal/linux/eal_dev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
> index bde55a3d92..4646e8a550 100644
> --- a/lib/eal/linux/eal_dev.c
> +++ b/lib/eal/linux/eal_dev.c
> @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
>  	close(rte_intr_fd_get(intr_handle));
>  	rte_intr_instance_free(intr_handle);
>  	intr_handle = NULL;
> +	ret = 0;
>  
>  	monitor_refcount--;
>  
> 






^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [DPDK] /lib/eal: fix failed to stop device monitor error
  2022-02-13 11:29 ` Thomas Monjalon
@ 2022-03-01  9:38   ` Wu, WenxuanX
  0 siblings, 0 replies; 6+ messages in thread
From: Wu, WenxuanX @ 2022-03-01  9:38 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Yang, Qiming, Zhang, Qi Z, dev, david.marchand, Harman Kalra

Let's start a talk about this patch.

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 2022年2月13日 19:30
> To: Wu, WenxuanX <wenxuanx.wu@intel.com>
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; dev@dpdk.org; david.marchand@redhat.com;
> Harman Kalra <hkalra@marvell.com>
> Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error
> 
> +Cc Harman, maintainer of interrupt subsystem.
> 
> 11/02/2022 09:41, wenxuanx.wu@intel.com:
> > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> >
> > The ret value in rte_dev_event_monitor_stop stands for whether the
> > monitor has been successfully closed ,and should not bind with
> > rte_intr_callback_unregister,so once it goes to the right exit point
> > of rte_dev_event_monitor, the ret value should be set to 0.
> >
> > Also ,the refmonitor count has been carefully evaluated ,the value
> > change from 1 to 0 ,so there is no potential memory leak failure.
> >
> > Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event
> > monitor") Cc:stable@intel.com
> >
> > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> > ---
> >  lib/eal/linux/eal_dev.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index
> > bde55a3d92..4646e8a550 100644
> > --- a/lib/eal/linux/eal_dev.c
> > +++ b/lib/eal/linux/eal_dev.c
> > @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
> >  	close(rte_intr_fd_get(intr_handle));
> >  	rte_intr_instance_free(intr_handle);
> >  	intr_handle = NULL;
> > +	ret = 0;
> >
> >  	monitor_refcount--;
> >
> >
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [DPDK] /lib/eal: fix failed to stop device monitor error
  2022-02-11  8:41 [DPDK] /lib/eal: fix failed to stop device monitor error wenxuanx.wu
  2022-02-13 11:29 ` Thomas Monjalon
@ 2022-03-01  9:57 ` David Marchand
  2022-03-02 10:53   ` Long Li
  1 sibling, 1 reply; 6+ messages in thread
From: David Marchand @ 2022-03-01  9:57 UTC (permalink / raw)
  To: wenxuanx.wu, Harman Kalra, Long Li; +Cc: Qiming Yang, Qi Zhang, dev

Hello,


The title should start with eal/linux:

On Fri, Feb 11, 2022 at 10:01 AM <wenxuanx.wu@intel.com> wrote:
>
> From: Wenxuan Wu <wenxuanx.wu@intel.com>
>
> The ret value in rte_dev_event_monitor_stop stands for whether the
> monitor has been successfully closed ,and should not bind with
> rte_intr_callback_unregister,so once it goes to the right exit point of
> rte_dev_event_monitor, the ret value should be set to 0.
>
> Also ,the refmonitor count has been carefully evaluated ,the value
> change from 1 to 0 ,so there is no potential memory leak failure.

Please, fix formatting around ',': a space should be after.


Is it a real issue you noticed? Or a theoretical issue based on code
review, reported by a static code analysis tool?


>
> Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor")
> Cc:stable@intel.com

stable@dpdk.org

>
> Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>



> ---
>  lib/eal/linux/eal_dev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
> index bde55a3d92..4646e8a550 100644
> --- a/lib/eal/linux/eal_dev.c
> +++ b/lib/eal/linux/eal_dev.c
> @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
>         close(rte_intr_fd_get(intr_handle));
>         rte_intr_instance_free(intr_handle);
>         intr_handle = NULL;
> +       ret = 0;
>
>         monitor_refcount--;
>

This change looks ok to me.
Harman, Long, wdyt?


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [DPDK] /lib/eal: fix failed to stop device monitor error
  2022-03-01  9:57 ` David Marchand
@ 2022-03-02 10:53   ` Long Li
  2022-03-07 17:04     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Long Li @ 2022-03-02 10:53 UTC (permalink / raw)
  To: David Marchand, wenxuanx.wu, Harman Kalra; +Cc: Qiming Yang, Qi Zhang, dev

> Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error
> 
> Hello,
> 
> 
> The title should start with eal/linux:
> 
> On Fri, Feb 11, 2022 at 10:01 AM <wenxuanx.wu@intel.com> wrote:
> >
> > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> >
> > The ret value in rte_dev_event_monitor_stop stands for whether the
> > monitor has been successfully closed ,and should not bind with
> > rte_intr_callback_unregister,so once it goes to the right exit point
> > of rte_dev_event_monitor, the ret value should be set to 0.
> >
> > Also ,the refmonitor count has been carefully evaluated ,the value
> > change from 1 to 0 ,so there is no potential memory leak failure.
> 
> Please, fix formatting around ',': a space should be after.
> 
> 
> Is it a real issue you noticed? Or a theoretical issue based on code review,
> reported by a static code analysis tool?
> 
> 
> >
> > Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event
> > monitor") Cc:stable@intel.com
> 
> stable@dpdk.org
> 
> >
> > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> 
> 
> 
> > ---
> >  lib/eal/linux/eal_dev.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index
> > bde55a3d92..4646e8a550 100644
> > --- a/lib/eal/linux/eal_dev.c
> > +++ b/lib/eal/linux/eal_dev.c
> > @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
> >         close(rte_intr_fd_get(intr_handle));
> >         rte_intr_instance_free(intr_handle);
> >         intr_handle = NULL;
> > +       ret = 0;
> >
> >         monitor_refcount--;
> >
> 
> This change looks ok to me.
> Harman, Long, wdyt?

The change looks good to me.

Long

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [DPDK] /lib/eal: fix failed to stop device monitor error
  2022-03-02 10:53   ` Long Li
@ 2022-03-07 17:04     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2022-03-07 17:04 UTC (permalink / raw)
  To: wenxuanx.wu, dev
  Cc: David Marchand, Harman Kalra, Qiming Yang, Qi Zhang, dev, Long Li

02/03/2022 11:53, Long Li:
> > Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error
> > 
> > Hello,
> > 
> > 
> > The title should start with eal/linux:
> > 
> > On Fri, Feb 11, 2022 at 10:01 AM <wenxuanx.wu@intel.com> wrote:
> > >
> > > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> > >
> > > The ret value in rte_dev_event_monitor_stop stands for whether the
> > > monitor has been successfully closed ,and should not bind with
> > > rte_intr_callback_unregister,so once it goes to the right exit point
> > > of rte_dev_event_monitor, the ret value should be set to 0.
> > >
> > > Also ,the refmonitor count has been carefully evaluated ,the value
> > > change from 1 to 0 ,so there is no potential memory leak failure.
> > 
> > Please, fix formatting around ',': a space should be after.
> > 
> > 
> > Is it a real issue you noticed? Or a theoretical issue based on code review,
> > reported by a static code analysis tool?
> > 
> > 
> > >
> > > Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event
> > > monitor") Cc:stable@intel.com
> > 
> > stable@dpdk.org
> > 
> > >
> > > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> > 
> > 
> > 
> > > ---
> > >  lib/eal/linux/eal_dev.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index
> > > bde55a3d92..4646e8a550 100644
> > > --- a/lib/eal/linux/eal_dev.c
> > > +++ b/lib/eal/linux/eal_dev.c
> > > @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
> > >         close(rte_intr_fd_get(intr_handle));
> > >         rte_intr_instance_free(intr_handle);
> > >         intr_handle = NULL;
> > > +       ret = 0;
> > >
> > >         monitor_refcount--;
> > >
> > 
> > This change looks ok to me.
> > Harman, Long, wdyt?
> 
> The change looks good to me.

Applied, thanks.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-07 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11  8:41 [DPDK] /lib/eal: fix failed to stop device monitor error wenxuanx.wu
2022-02-13 11:29 ` Thomas Monjalon
2022-03-01  9:38   ` Wu, WenxuanX
2022-03-01  9:57 ` David Marchand
2022-03-02 10:53   ` Long Li
2022-03-07 17:04     ` Thomas Monjalon

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