* [dpdk-dev] [PATCH] testpmd: call cleanup on exit
@ 2020-01-07 17:40 Stephen Hemminger
2020-01-07 17:58 ` Jerin Jacob
2020-01-07 18:59 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Hemminger @ 2020-01-07 17:40 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The rte_eal_cleanup code is not exercised by testpmd which
is the most used DPDK test tool. Add a call at end of program.
This helps exercise free and close paths which can
be checked with tools like valgrind.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/testpmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b3746822366f..a94ad19c8f5a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3570,5 +3570,6 @@ main(int argc, char** argv)
return 1;
}
+ rte_eal_cleanup();
return 0;
}
--
2.20.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] testpmd: call cleanup on exit
2020-01-07 17:40 [dpdk-dev] [PATCH] testpmd: call cleanup on exit Stephen Hemminger
@ 2020-01-07 17:58 ` Jerin Jacob
2020-01-07 18:59 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
1 sibling, 0 replies; 9+ messages in thread
From: Jerin Jacob @ 2020-01-07 17:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk-dev
On Tue, Jan 7, 2020 at 11:11 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The rte_eal_cleanup code is not exercised by testpmd which
> is the most used DPDK test tool. Add a call at end of program.
>
> This helps exercise free and close paths which can
> be checked with tools like valgrind.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> app/test-pmd/testpmd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index b3746822366f..a94ad19c8f5a 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3570,5 +3570,6 @@ main(int argc, char** argv)
> return 1;
> }
>
> + rte_eal_cleanup();
> return 0;
# How about changing to "return rte_eal_cleanup()" to provide OS the
correct stats?
# IMO, we need the same in other applications main() and signal handler too.
> }
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-07 17:40 [dpdk-dev] [PATCH] testpmd: call cleanup on exit Stephen Hemminger
2020-01-07 17:58 ` Jerin Jacob
@ 2020-01-07 18:59 ` Stephen Hemminger
2020-01-08 9:45 ` Iremonger, Bernard
1 sibling, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2020-01-07 18:59 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The rte_eal_cleanup code is not exercised by testpmd which
is the most used DPDK test tool. Add a call at end of program.
This helps exercise free and close paths which can
be checked with tools like valgrind.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v2 - report errors
app/test-pmd/testpmd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b3746822366f..2eec8afda1ec 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3570,5 +3570,10 @@ main(int argc, char** argv)
return 1;
}
- return 0;
+ ret = rte_eal_cleanup();
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "EAL cleanup failed: %s\n", strerror(-ret));
+
+ return EXIT_SUCCESS;
}
--
2.20.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-07 18:59 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
@ 2020-01-08 9:45 ` Iremonger, Bernard
2020-01-08 15:28 ` Stephen Hemminger
0 siblings, 1 reply; 9+ messages in thread
From: Iremonger, Bernard @ 2020-01-08 9:45 UTC (permalink / raw)
To: Stephen Hemminger, dev
Hi Stephen,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Tuesday, January 7, 2020 7:00 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
>
> The rte_eal_cleanup code is not exercised by testpmd which is the most
> used DPDK test tool. Add a call at end of program.
>
> This helps exercise free and close paths which can be checked with tools like
> valgrind.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> v2 - report errors
>
> app/test-pmd/testpmd.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> b3746822366f..2eec8afda1ec 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
> return 1;
> }
>
> - return 0;
> + ret = rte_eal_cleanup();
> + if (ret != 0)
> + rte_exit(EXIT_FAILURE,
> + "EAL cleanup failed: %s\n", strerror(-ret));
> +
> + return EXIT_SUCCESS;
> }
> --
> 2.20.1
This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
Regards,
Bernard.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-08 9:45 ` Iremonger, Bernard
@ 2020-01-08 15:28 ` Stephen Hemminger
2020-01-09 11:16 ` Ferruh Yigit
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2020-01-08 15:28 UTC (permalink / raw)
To: Iremonger, Bernard; +Cc: dev
On Wed, 8 Jan 2020 09:45:54 +0000
"Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:
> Hi Stephen,
>
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> > Sent: Tuesday, January 7, 2020 7:00 PM
> > To: dev@dpdk.org
> > Cc: Stephen Hemminger <stephen@networkplumber.org>
> > Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
> >
> > The rte_eal_cleanup code is not exercised by testpmd which is the most
> > used DPDK test tool. Add a call at end of program.
> >
> > This helps exercise free and close paths which can be checked with tools like
> > valgrind.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> > v2 - report errors
> >
> > app/test-pmd/testpmd.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> > b3746822366f..2eec8afda1ec 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
> > return 1;
> > }
> >
> > - return 0;
> > + ret = rte_eal_cleanup();
> > + if (ret != 0)
> > + rte_exit(EXIT_FAILURE,
> > + "EAL cleanup failed: %s\n", strerror(-ret));
> > +
> > + return EXIT_SUCCESS;
> > }
> > --
> > 2.20.1
>
> This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
>
> Regards,
>
> Bernard.
>
Not sure if it needs to be backported. It depends on the definition
of a fix. The original definition of stable was fixes only.
Linux has moved on to fixes and backports of missing features
like this; but DPDK has mostly stuck to the original definition
of stable.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-08 15:28 ` Stephen Hemminger
@ 2020-01-09 11:16 ` Ferruh Yigit
2020-01-09 11:31 ` Ferruh Yigit
0 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2020-01-09 11:16 UTC (permalink / raw)
To: Stephen Hemminger, Iremonger, Bernard; +Cc: dev
On 1/8/2020 3:28 PM, Stephen Hemminger wrote:
> On Wed, 8 Jan 2020 09:45:54 +0000
> "Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:
>
>> Hi Stephen,
>>
>>> -----Original Message-----
>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
>>> Sent: Tuesday, January 7, 2020 7:00 PM
>>> To: dev@dpdk.org
>>> Cc: Stephen Hemminger <stephen@networkplumber.org>
>>> Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
>>>
>>> The rte_eal_cleanup code is not exercised by testpmd which is the most
>>> used DPDK test tool. Add a call at end of program.
>>>
>>> This helps exercise free and close paths which can be checked with tools like
>>> valgrind.
>>>
>>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>>> ---
>>> v2 - report errors
>>>
>>> app/test-pmd/testpmd.c | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
>>> b3746822366f..2eec8afda1ec 100644
>>> --- a/app/test-pmd/testpmd.c
>>> +++ b/app/test-pmd/testpmd.c
>>> @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
>>> return 1;
>>> }
>>>
>>> - return 0;
>>> + ret = rte_eal_cleanup();
>>> + if (ret != 0)
>>> + rte_exit(EXIT_FAILURE,
>>> + "EAL cleanup failed: %s\n", strerror(-ret));
>>> +
>>> + return EXIT_SUCCESS;
>>> }
>>> --
>>> 2.20.1
>>
>> This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
>>
>> Regards,
>>
>> Bernard.
>>
>
> Not sure if it needs to be backported. It depends on the definition
> of a fix. The original definition of stable was fixes only.
> Linux has moved on to fixes and backports of missing features
> like this; but DPDK has mostly stuck to the original definition
> of stable.
>
I also tend to think this a fix more then a feature, and although it is a minor
fix it is good to get it to reduce the change of the conflict on other stuff in
LTS. I will add fix/stable tag while merging.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-09 11:16 ` Ferruh Yigit
@ 2020-01-09 11:31 ` Ferruh Yigit
2020-01-09 16:13 ` Stephen Hemminger
0 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2020-01-09 11:31 UTC (permalink / raw)
To: Stephen Hemminger, Iremonger, Bernard; +Cc: dev
On 1/9/2020 11:16 AM, Ferruh Yigit wrote:
> On 1/8/2020 3:28 PM, Stephen Hemminger wrote:
>> On Wed, 8 Jan 2020 09:45:54 +0000
>> "Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:
>>
>>> Hi Stephen,
>>>
>>>> -----Original Message-----
>>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
>>>> Sent: Tuesday, January 7, 2020 7:00 PM
>>>> To: dev@dpdk.org
>>>> Cc: Stephen Hemminger <stephen@networkplumber.org>
>>>> Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
>>>>
>>>> The rte_eal_cleanup code is not exercised by testpmd which is the most
>>>> used DPDK test tool. Add a call at end of program.
>>>>
>>>> This helps exercise free and close paths which can be checked with tools like
>>>> valgrind.
>>>>
>>>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>>>> ---
>>>> v2 - report errors
>>>>
>>>> app/test-pmd/testpmd.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
>>>> b3746822366f..2eec8afda1ec 100644
>>>> --- a/app/test-pmd/testpmd.c
>>>> +++ b/app/test-pmd/testpmd.c
>>>> @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
>>>> return 1;
>>>> }
>>>>
>>>> - return 0;
>>>> + ret = rte_eal_cleanup();
>>>> + if (ret != 0)
>>>> + rte_exit(EXIT_FAILURE,
>>>> + "EAL cleanup failed: %s\n", strerror(-ret));
>>>> +
>>>> + return EXIT_SUCCESS;
>>>> }
>>>> --
>>>> 2.20.1
>>>
>>> This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
>>>
>>> Regards,
>>>
>>> Bernard.
>>>
>>
>> Not sure if it needs to be backported. It depends on the definition
>> of a fix. The original definition of stable was fixes only.
>> Linux has moved on to fixes and backports of missing features
>> like this; but DPDK has mostly stuck to the original definition
>> of stable.
>>
>
> I also tend to think this a fix more then a feature, and although it is a minor
> fix it is good to get it to reduce the change of the conflict on other stuff in
> LTS. I will add fix/stable tag while merging.
>
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-09 11:31 ` Ferruh Yigit
@ 2020-01-09 16:13 ` Stephen Hemminger
2020-01-10 8:59 ` Ferruh Yigit
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2020-01-09 16:13 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Iremonger, Bernard, dev
On Thu, 9 Jan 2020 11:31:30 +0000
Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> On 1/9/2020 11:16 AM, Ferruh Yigit wrote:
> > On 1/8/2020 3:28 PM, Stephen Hemminger wrote:
> >> On Wed, 8 Jan 2020 09:45:54 +0000
> >> "Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:
> >>
> >>> Hi Stephen,
> >>>
> >>>> -----Original Message-----
> >>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> >>>> Sent: Tuesday, January 7, 2020 7:00 PM
> >>>> To: dev@dpdk.org
> >>>> Cc: Stephen Hemminger <stephen@networkplumber.org>
> >>>> Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
> >>>>
> >>>> The rte_eal_cleanup code is not exercised by testpmd which is the most
> >>>> used DPDK test tool. Add a call at end of program.
> >>>>
> >>>> This helps exercise free and close paths which can be checked with tools like
> >>>> valgrind.
> >>>>
> >>>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >>>> ---
> >>>> v2 - report errors
> >>>>
> >>>> app/test-pmd/testpmd.c | 7 ++++++-
> >>>> 1 file changed, 6 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> >>>> b3746822366f..2eec8afda1ec 100644
> >>>> --- a/app/test-pmd/testpmd.c
> >>>> +++ b/app/test-pmd/testpmd.c
> >>>> @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
> >>>> return 1;
> >>>> }
> >>>>
> >>>> - return 0;
> >>>> + ret = rte_eal_cleanup();
> >>>> + if (ret != 0)
> >>>> + rte_exit(EXIT_FAILURE,
> >>>> + "EAL cleanup failed: %s\n", strerror(-ret));
> >>>> +
> >>>> + return EXIT_SUCCESS;
> >>>> }
> >>>> --
> >>>> 2.20.1
> >>>
> >>> This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
> >>>
> >>> Regards,
> >>>
> >>> Bernard.
> >>>
> >>
> >> Not sure if it needs to be backported. It depends on the definition
> >> of a fix. The original definition of stable was fixes only.
> >> Linux has moved on to fixes and backports of missing features
> >> like this; but DPDK has mostly stuck to the original definition
> >> of stable.
> >>
> >
> > I also tend to think this a fix more then a feature, and although it is a minor
> > fix it is good to get it to reduce the change of the conflict on other stuff in
> > LTS. I will add fix/stable tag while merging.
> >
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>
> Applied to dpdk-next-net/master, thanks.
Thanks, my concern about adding it to stable is that it might expose
bugs in other places (like drivers). That is good for current release
but not something stable users want to see.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
2020-01-09 16:13 ` Stephen Hemminger
@ 2020-01-10 8:59 ` Ferruh Yigit
0 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2020-01-10 8:59 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Iremonger, Bernard, dev
On 1/9/2020 4:13 PM, Stephen Hemminger wrote:
> On Thu, 9 Jan 2020 11:31:30 +0000
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
>> On 1/9/2020 11:16 AM, Ferruh Yigit wrote:
>>> On 1/8/2020 3:28 PM, Stephen Hemminger wrote:
>>>> On Wed, 8 Jan 2020 09:45:54 +0000
>>>> "Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:
>>>>
>>>>> Hi Stephen,
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
>>>>>> Sent: Tuesday, January 7, 2020 7:00 PM
>>>>>> To: dev@dpdk.org
>>>>>> Cc: Stephen Hemminger <stephen@networkplumber.org>
>>>>>> Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit
>>>>>>
>>>>>> The rte_eal_cleanup code is not exercised by testpmd which is the most
>>>>>> used DPDK test tool. Add a call at end of program.
>>>>>>
>>>>>> This helps exercise free and close paths which can be checked with tools like
>>>>>> valgrind.
>>>>>>
>>>>>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>>>>>> ---
>>>>>> v2 - report errors
>>>>>>
>>>>>> app/test-pmd/testpmd.c | 7 ++++++-
>>>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
>>>>>> b3746822366f..2eec8afda1ec 100644
>>>>>> --- a/app/test-pmd/testpmd.c
>>>>>> +++ b/app/test-pmd/testpmd.c
>>>>>> @@ -3570,5 +3570,10 @@ main(int argc, char** argv)
>>>>>> return 1;
>>>>>> }
>>>>>>
>>>>>> - return 0;
>>>>>> + ret = rte_eal_cleanup();
>>>>>> + if (ret != 0)
>>>>>> + rte_exit(EXIT_FAILURE,
>>>>>> + "EAL cleanup failed: %s\n", strerror(-ret));
>>>>>> +
>>>>>> + return EXIT_SUCCESS;
>>>>>> }
>>>>>> --
>>>>>> 2.20.1
>>>>>
>>>>> This looks like a fix to me and is probably worth backporting, it should probably have a fixes line.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bernard.
>>>>>
>>>>
>>>> Not sure if it needs to be backported. It depends on the definition
>>>> of a fix. The original definition of stable was fixes only.
>>>> Linux has moved on to fixes and backports of missing features
>>>> like this; but DPDK has mostly stuck to the original definition
>>>> of stable.
>>>>
>>>
>>> I also tend to think this a fix more then a feature, and although it is a minor
>>> fix it is good to get it to reduce the change of the conflict on other stuff in
>>> LTS. I will add fix/stable tag while merging.
>>>
>>
>> Fixes: af75078fece3 ("first public release")
>> Cc: stable@dpdk.org
>>
>> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>
>> Applied to dpdk-next-net/master, thanks.
>
> Thanks, my concern about adding it to stable is that it might expose
> bugs in other places (like drivers). That is good for current release
> but not something stable users want to see.
>
Overall I agree, but the 'rte_eal_cleanup()' is pretty simple as of now, only
doing a few simple cleanups not full cleanup, that is why I believe it can be OK
to add it.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-01-10 8:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 17:40 [dpdk-dev] [PATCH] testpmd: call cleanup on exit Stephen Hemminger
2020-01-07 17:58 ` Jerin Jacob
2020-01-07 18:59 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2020-01-08 9:45 ` Iremonger, Bernard
2020-01-08 15:28 ` Stephen Hemminger
2020-01-09 11:16 ` Ferruh Yigit
2020-01-09 11:31 ` Ferruh Yigit
2020-01-09 16:13 ` Stephen Hemminger
2020-01-10 8:59 ` Ferruh Yigit
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).