[DPDK] /lib/eal: fix failed to stop device monitor error

Wu, WenxuanX wenxuanx.wu at intel.com
Tue Mar 1 10:38:29 CET 2022


Let's start a talk about this patch.

> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: 2022年2月13日 19:30
> To: Wu, WenxuanX <wenxuanx.wu at intel.com>
> Cc: Yang, Qiming <qiming.yang at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; dev at dpdk.org; david.marchand at redhat.com;
> Harman Kalra <hkalra at 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 at intel.com:
> > From: Wenxuan Wu <wenxuanx.wu at 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 at intel.com
> >
> > Signed-off-by: Wenxuan Wu <wenxuanx.wu at 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--;
> >
> >
> 
> 
> 
> 



More information about the dev mailing list