DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal/linux: fix fail to stop device monitor error
@ 2022-02-11  6:53 wenxuanx.wu
  2022-02-16  8:10 ` Long Li
  0 siblings, 1 reply; 3+ messages in thread
From: wenxuanx.wu @ 2022-02-11  6:53 UTC (permalink / raw)
  To: qiming.yang, qi.z.zhang, nhorman; +Cc: dev, longli

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

The ret value stands for whether the device monitor has been
successfully closed, and has nothing to do with
rte_intr_callback_unregister funcs once it return a value greater than 0
.So if the closure procedure has gone to the right exit point ,we should
set this value to 0.

Also ,the refmonitor has been carefully evaluted .at the beginning of
ret_dev_event_monitor_stop ,the value is 1, at the end of this func ,the
value is 0, it reveals that the monitor has been succefully closed.

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

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index babd444d9d..8cf7ea5520 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -366,7 +366,7 @@ rte_dev_event_monitor_stop(void)
 
 	if (!monitor_refcount) {
 		RTE_LOG(ERR, EAL, "device event monitor already stopped\n");
-		
+
 		goto exit;
 	}
 
@@ -381,7 +381,7 @@ rte_dev_event_monitor_stop(void)
 		RTE_LOG(ERR, EAL, "fail to unregister uevent callback.\n");
 		goto exit;
 	}
-	
+
 	close(rte_intr_fd_get(intr_handle));
 	rte_intr_instance_free(intr_handle);
 	intr_handle = NULL;
-- 
2.25.1


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

* RE: [PATCH] eal/linux: fix fail to stop device monitor error
  2022-02-11  6:53 [PATCH] eal/linux: fix fail to stop device monitor error wenxuanx.wu
@ 2022-02-16  8:10 ` Long Li
  2022-02-16 10:01   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Long Li @ 2022-02-16  8:10 UTC (permalink / raw)
  To: wenxuanx.wu, qiming.yang, qi.z.zhang, nhorman; +Cc: dev

> Subject: [PATCH] eal/linux: fix fail to stop device monitor error
> 
> [You don't often get email from wenxuanx.wu@intel.com. Learn why this is
> important at http://aka.ms/LearnAboutSenderIdentification.]
> 
> From: Wenxuan Wu <wenxuanx.wu@intel.com>
> 
> The ret value stands for whether the device monitor has been successfully
> closed, and has nothing to do with rte_intr_callback_unregister funcs once it
> return a value greater than 0 .So if the closure procedure has gone to the
> right exit point ,we should set this value to 0.

It seems to be a display problem with the patch in this email.

But the patch at https://patchwork.dpdk.org/project/dpdk/patch/20220211084131.72606-1-wenxuanx.wu@intel.com/ looks good to me.


> 
> Also ,the refmonitor has been carefully evaluted .at the beginning of
> ret_dev_event_monitor_stop ,the value is 1, at the end of this func ,the
> value is 0, it reveals that the monitor has been succefully closed.
> 
> Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> ---
>  lib/eal/linux/eal_dev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index
> babd444d9d..8cf7ea5520 100644
> --- a/lib/eal/linux/eal_dev.c
> +++ b/lib/eal/linux/eal_dev.c
> @@ -366,7 +366,7 @@ rte_dev_event_monitor_stop(void)
> 
>         if (!monitor_refcount) {
>                 RTE_LOG(ERR, EAL, "device event monitor already stopped\n");
> -
> +
>                 goto exit;
>         }
> 
> @@ -381,7 +381,7 @@ rte_dev_event_monitor_stop(void)
>                 RTE_LOG(ERR, EAL, "fail to unregister uevent callback.\n");
>                 goto exit;
>         }
> -
> +
>         close(rte_intr_fd_get(intr_handle));
>         rte_intr_instance_free(intr_handle);
>         intr_handle = NULL;
> --
> 2.25.1


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

* Re: [PATCH] eal/linux: fix fail to stop device monitor error
  2022-02-16  8:10 ` Long Li
@ 2022-02-16 10:01   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2022-02-16 10:01 UTC (permalink / raw)
  To: Long Li; +Cc: wenxuanx.wu, qiming.yang, qi.z.zhang, nhorman, dev

On Wed, Feb 16, 2022 at 9:10 AM Long Li <longli@microsoft.com> wrote:
>
> > Subject: [PATCH] eal/linux: fix fail to stop device monitor error
> >
> > [You don't often get email from wenxuanx.wu@intel.com. Learn why this is
> > important at http://aka.ms/LearnAboutSenderIdentification.]
> >
> > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> >
> > The ret value stands for whether the device monitor has been successfully
> > closed, and has nothing to do with rte_intr_callback_unregister funcs once it
> > return a value greater than 0 .So if the closure procedure has gone to the
> > right exit point ,we should set this value to 0.
>
> It seems to be a display problem with the patch in this email.

There is no issue with displaying.
The proposed patch can be found in patchwork under:
https://patchwork.dpdk.org/project/dpdk/patch/20220211065315.66814-1-wenxuanx.wu@intel.com/


>
> But the patch at https://patchwork.dpdk.org/project/dpdk/patch/20220211084131.72606-1-wenxuanx.wu@intel.com/ looks good to me.

The patch you reference is in another mail thread you can find from
patchwork (see "mailing list archive" link in patch):
https://inbox.dpdk.org/dev/20220211084131.72606-1-wenxuanx.wu@intel.com/


-- 
David Marchand


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

end of thread, other threads:[~2022-02-16 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11  6:53 [PATCH] eal/linux: fix fail to stop device monitor error wenxuanx.wu
2022-02-16  8:10 ` Long Li
2022-02-16 10:01   ` David Marchand

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