* [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 20:33 ` Thomas Monjalon
2017-07-14 17:07 ` [dpdk-dev] [PATCH] devtools: add script to find duplicated includes Thomas Monjalon
2017-07-11 18:55 ` [dpdk-dev] [PATCH 02/19] eal: remove duplicate includes Stephen Hemminger
` (18 subsequent siblings)
19 siblings, 2 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
This is just a simple check script to find obvious duplications.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/dup_include.pl | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100755 devtools/dup_include.pl
diff --git a/devtools/dup_include.pl b/devtools/dup_include.pl
new file mode 100755
index 000000000000..2946b6cc2ff3
--- /dev/null
+++ b/devtools/dup_include.pl
@@ -0,0 +1,64 @@
+#! /usr/bin/env perl
+
+# BSD LICENSE
+#
+# Copyright 2016 Stephen Hemminger <stephen@networkplumber.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of 6WIND S.A. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Examine files looking for duplicate references to the
+# same include file.
+#
+# Usage: dup_include.pl foo.c bar.c
+#
+
+use strict;
+use warnings;
+
+die "no input files'n"
+ if ($#ARGV < 0);
+
+foreach my $filename (@ARGV) {
+ open my $f, '<', $filename
+ or die "$filename: $!\n";
+
+ my %included;
+ my $lineno = 0;
+
+ while (<$f>) {
+ ++$lineno;
+ next unless /^#include\s+<(.+)>$/;
+
+ my $h = $1;
+ warn "$filename:$lineno duplicate include $h\n"
+ if $included{$h};
+
+ $included{$h} = 1;
+ }
+
+ close $f;
+}
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-11 18:55 ` [dpdk-dev] [PATCH 01/19] devtools: add simple script to find " Stephen Hemminger
@ 2017-07-11 20:33 ` Thomas Monjalon
2017-07-11 23:05 ` Stephen Hemminger
2017-07-12 21:59 ` Stephen Hemminger
2017-07-14 17:07 ` [dpdk-dev] [PATCH] devtools: add script to find duplicated includes Thomas Monjalon
1 sibling, 2 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-11 20:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
Hi Stephen,
11/07/2017 20:55, Stephen Hemminger:
> This is just a simple check script to find obvious duplications.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> devtools/dup_include.pl | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
> create mode 100755 devtools/dup_include.pl
Thank you for this script, but... it is written in Perl!
I don't think it is a good idea to add yet another language to DPDK.
We already have shell and python scripts.
And I am not sure a lot of (young) people are able to parse it ;)
I would like to propose this shell script:
dirs='app buildtools drivers examples lib test'
pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
for file in $(git ls $dirs) ; do
dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
[ -n "$dups" ] || continue
echo "$file"
echo "$dups" | sed 's,^,\t,'
done
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-11 20:33 ` Thomas Monjalon
@ 2017-07-11 23:05 ` Stephen Hemminger
2017-07-12 6:41 ` Thomas Monjalon
2017-07-12 21:59 ` Stephen Hemminger
1 sibling, 1 reply; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 23:05 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Tue, 11 Jul 2017 22:33:55 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> Hi Stephen,
>
> 11/07/2017 20:55, Stephen Hemminger:
> > This is just a simple check script to find obvious duplications.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> > devtools/dup_include.pl | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 64 insertions(+)
> > create mode 100755 devtools/dup_include.pl
>
> Thank you for this script, but... it is written in Perl!
> I don't think it is a good idea to add yet another language to DPDK.
> We already have shell and python scripts.
> And I am not sure a lot of (young) people are able to parse it ;)
>
> I would like to propose this shell script:
>
> dirs='app buildtools drivers examples lib test'
> pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
>
> for file in $(git ls $dirs) ; do
> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> [ -n "$dups" ] || continue
> echo "$file"
> echo "$dups" | sed 's,^,\t,'
> done
Sorry, it is quick and easy. After all it is optional, just like
coccinelle and not part of the build. Plus checkpatch is in Perl.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-11 23:05 ` Stephen Hemminger
@ 2017-07-12 6:41 ` Thomas Monjalon
0 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-12 6:41 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
12/07/2017 01:05, Stephen Hemminger:
> On Tue, 11 Jul 2017 22:33:55 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > Hi Stephen,
> >
> > 11/07/2017 20:55, Stephen Hemminger:
> > > This is just a simple check script to find obvious duplications.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > > ---
> > > devtools/dup_include.pl | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 64 insertions(+)
> > > create mode 100755 devtools/dup_include.pl
> >
> > Thank you for this script, but... it is written in Perl!
> > I don't think it is a good idea to add yet another language to DPDK.
> > We already have shell and python scripts.
> > And I am not sure a lot of (young) people are able to parse it ;)
> >
> > I would like to propose this shell script:
> >
> > dirs='app buildtools drivers examples lib test'
> > pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
> >
> > for file in $(git ls $dirs) ; do
> > dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> > [ -n "$dups" ] || continue
> > echo "$file"
> > echo "$dups" | sed 's,^,\t,'
> > done
>
> Sorry, it is quick and easy. After all it is optional, just like
> coccinelle and not part of the build. Plus checkpatch is in Perl.
checkpatch is not in the repository ;)
I prefer my shell script because
- I am able to maintain it
- the regexp is more tolerant with #include line
- it checks the whole repository
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-11 20:33 ` Thomas Monjalon
2017-07-11 23:05 ` Stephen Hemminger
@ 2017-07-12 21:59 ` Stephen Hemminger
2017-07-13 6:56 ` Thomas Monjalon
1 sibling, 1 reply; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-12 21:59 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Tue, 11 Jul 2017 22:33:55 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> Thank you for this script, but... it is written in Perl!
> I don't think it is a good idea to add yet another language to DPDK.
> We already have shell and python scripts.
> And I am not sure a lot of (young) people are able to parse it ;)
>
> I would like to propose this shell script:
>
> dirs='app buildtools drivers examples lib test'
> pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
>
> for file in $(git ls $dirs) ; do
> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> [ -n "$dups" ] || continue
> echo "$file"
> echo "$dups" | sed 's,^,\t,'
> done
There is no "git ls" command in current version,
Using find instead works.
plus shell is 7x slower.
$ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
real 0m0.765s
user 0m1.220s
sys 0m0.155s
$time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
real 0m0.131s
user 0m0.118s
sys 0m0.014s
How about some python code.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-12 21:59 ` Stephen Hemminger
@ 2017-07-13 6:56 ` Thomas Monjalon
2017-07-13 12:19 ` Wiles, Keith
2017-07-14 15:39 ` Thomas Monjalon
0 siblings, 2 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-13 6:56 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
12/07/2017 23:59, Stephen Hemminger:
> On Tue, 11 Jul 2017 22:33:55 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > Thank you for this script, but... it is written in Perl!
> > I don't think it is a good idea to add yet another language to DPDK.
> > We already have shell and python scripts.
> > And I am not sure a lot of (young) people are able to parse it ;)
> >
> > I would like to propose this shell script:
> >
> > dirs='app buildtools drivers examples lib test'
> > pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
> >
> > for file in $(git ls $dirs) ; do
> > dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> > [ -n "$dups" ] || continue
> > echo "$file"
> > echo "$dups" | sed 's,^,\t,'
> > done
>
> There is no "git ls" command in current version,
>
> Using find instead works.
Yes, both work if specifying source code directories as above.
> plus shell is 7x slower.
>
> $ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
> real 0m0.765s
> user 0m1.220s
> sys 0m0.155s
> $time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
> real 0m0.131s
> user 0m0.118s
> sys 0m0.014s
I don't think speed is really relevant here :)
> How about some python code.
I don't really care between shell or python.
I thought a shell script would be really concise
and without Python 2/3 compat issues.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-13 6:56 ` Thomas Monjalon
@ 2017-07-13 12:19 ` Wiles, Keith
2017-07-13 12:36 ` Thomas Monjalon
2017-07-14 15:39 ` Thomas Monjalon
1 sibling, 1 reply; 41+ messages in thread
From: Wiles, Keith @ 2017-07-13 12:19 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Stephen Hemminger, dev
> On Jul 13, 2017, at 1:56 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 12/07/2017 23:59, Stephen Hemminger:
>> On Tue, 11 Jul 2017 22:33:55 +0200
>> Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>>> Thank you for this script, but... it is written in Perl!
>>> I don't think it is a good idea to add yet another language to DPDK.
>>> We already have shell and python scripts.
>>> And I am not sure a lot of (young) people are able to parse it ;)
>>>
>>> I would like to propose this shell script:
>>>
>>> dirs='app buildtools drivers examples lib test'
>>> pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
>>>
>>> for file in $(git ls $dirs) ; do
>>> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
>>> [ -n "$dups" ] || continue
>>> echo "$file"
>>> echo "$dups" | sed 's,^,\t,'
>>> done
>>
>> There is no "git ls" command in current version,
>>
>> Using find instead works.
>
> Yes, both work if specifying source code directories as above.
‘git ls’ I had to change it to ‘git ls-files’ to make it work. I think you have a git alias setup for ls-files.
Can this be added to the patch testing?
>
>> plus shell is 7x slower.
>>
>> $ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
>> real 0m0.765s
>> user 0m1.220s
>> sys 0m0.155s
>> $time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
>> real 0m0.131s
>> user 0m0.118s
>> sys 0m0.014s
>
> I don't think speed is really relevant here :)
>
>> How about some python code.
>
> I don't really care between shell or python.
> I thought a shell script would be really concise
> and without Python 2/3 compat issues.
Regards,
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-13 12:19 ` Wiles, Keith
@ 2017-07-13 12:36 ` Thomas Monjalon
0 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-13 12:36 UTC (permalink / raw)
To: Wiles, Keith; +Cc: Stephen Hemminger, dev
13/07/2017 14:19, Wiles, Keith:
>
> > On Jul 13, 2017, at 1:56 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 12/07/2017 23:59, Stephen Hemminger:
> >> On Tue, 11 Jul 2017 22:33:55 +0200
> >> Thomas Monjalon <thomas@monjalon.net> wrote:
> >>
> >>> Thank you for this script, but... it is written in Perl!
> >>> I don't think it is a good idea to add yet another language to DPDK.
> >>> We already have shell and python scripts.
> >>> And I am not sure a lot of (young) people are able to parse it ;)
> >>>
> >>> I would like to propose this shell script:
> >>>
> >>> dirs='app buildtools drivers examples lib test'
> >>> pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*'
> >>>
> >>> for file in $(git ls $dirs) ; do
> >>> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> >>> [ -n "$dups" ] || continue
> >>> echo "$file"
> >>> echo "$dups" | sed 's,^,\t,'
> >>> done
> >>
> >> There is no "git ls" command in current version,
> >>
> >> Using find instead works.
> >
> > Yes, both work if specifying source code directories as above.
>
> ‘git ls’ I had to change it to ‘git ls-files’ to make it work. I think you have a git alias setup for ls-files.
Ah yes, you're right!
Thanks, I has not well understood the original comment :)
> Can this be added to the patch testing?
Yes sure, I will do.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-13 6:56 ` Thomas Monjalon
2017-07-13 12:19 ` Wiles, Keith
@ 2017-07-14 15:39 ` Thomas Monjalon
2017-07-14 15:54 ` Thomas Monjalon
1 sibling, 1 reply; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-14 15:39 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
13/07/2017 08:56, Thomas Monjalon:
> 12/07/2017 23:59, Stephen Hemminger:
> > On Tue, 11 Jul 2017 22:33:55 +0200
> > Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > > Thank you for this script, but... it is written in Perl!
> > > I don't think it is a good idea to add yet another language to DPDK.
> > > We already have shell and python scripts.
> > > And I am not sure a lot of (young) people are able to parse it ;)
> > >
> > > I would like to propose this shell script:
[...]
>
> > plus shell is 7x slower.
> >
> > $ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
> > real 0m0.765s
> > user 0m1.220s
> > sys 0m0.155s
> > $time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
> > real 0m0.131s
> > user 0m0.118s
> > sys 0m0.014s
>
> I don't think speed is really relevant here :)
I did my own benchmark (recreation time):
# time sh -c 'for file in $(git ls-files app buildtools drivers examples lib test) ; do devtools/dup_include.pl $file ; done'
4,41s user 1,32s system 101% cpu 5,667 total
# time devtools/check-duplicate-includes.sh
5,48s user 1,00s system 153% cpu 4,222 total
The shell version is reported as faster on my computer!
It is faster when filtering only .c and .h files:
for file in $(git ls-files '*.[ch]') ; do
dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
[ -z "$dups" ] || echo "$dups" | sed "s,^,$file: duplicated include: ,"
done
# time sh -c 'for file in $(git ls-files "*.[ch]") ; do devtools/dup_include.pl $file ; done'
3,65s user 1,05s system 100% cpu 4,668 total
# time devtools/check-duplicate-includes.sh
4,72s user 0,80s system 153% cpu 3,603 total
I prefer this version using only pipes, which is well parallelized:
for file in $(git ls-files '*.[ch]') ; do
sed -rn "s,$pattern,\1,p" $file | sort | uniq -d |
sed "s,^,$file: duplicated include: ,"
done
7,40s user 1,49s system 231% cpu 3,847 total
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-14 15:39 ` Thomas Monjalon
@ 2017-07-14 15:54 ` Thomas Monjalon
2017-07-14 16:17 ` Wiles, Keith
0 siblings, 1 reply; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-14 15:54 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
14/07/2017 17:39, Thomas Monjalon:
> 13/07/2017 08:56, Thomas Monjalon:
> > 12/07/2017 23:59, Stephen Hemminger:
> > > On Tue, 11 Jul 2017 22:33:55 +0200
> > > Thomas Monjalon <thomas@monjalon.net> wrote:
> > >
> > > > Thank you for this script, but... it is written in Perl!
> > > > I don't think it is a good idea to add yet another language to DPDK.
> > > > We already have shell and python scripts.
> > > > And I am not sure a lot of (young) people are able to parse it ;)
> > > >
> > > > I would like to propose this shell script:
> [...]
> >
> > > plus shell is 7x slower.
> > >
> > > $ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
> > > real 0m0.765s
> > > user 0m1.220s
> > > sys 0m0.155s
> > > $time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
> > > real 0m0.131s
> > > user 0m0.118s
> > > sys 0m0.014s
> >
> > I don't think speed is really relevant here :)
>
> I did my own benchmark (recreation time):
>
> # time sh -c 'for file in $(git ls-files app buildtools drivers examples lib test) ; do devtools/dup_include.pl $file ; done'
> 4,41s user 1,32s system 101% cpu 5,667 total
> # time devtools/check-duplicate-includes.sh
> 5,48s user 1,00s system 153% cpu 4,222 total
>
> The shell version is reported as faster on my computer!
>
> It is faster when filtering only .c and .h files:
>
> for file in $(git ls-files '*.[ch]') ; do
> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
> [ -z "$dups" ] || echo "$dups" | sed "s,^,$file: duplicated include: ,"
> done
>
> # time sh -c 'for file in $(git ls-files "*.[ch]") ; do devtools/dup_include.pl $file ; done'
> 3,65s user 1,05s system 100% cpu 4,668 total
> # time devtools/check-duplicate-includes.sh
> 4,72s user 0,80s system 153% cpu 3,603 total
>
> I prefer this version using only pipes, which is well parallelized:
>
> for file in $(git ls-files '*.[ch]') ; do
> sed -rn "s,$pattern,\1,p" $file | sort | uniq -d |
> sed "s,^,$file: duplicated include: ,"
> done
>
> 7,40s user 1,49s system 231% cpu 3,847 total
And now, the big shell optimization:
export LC_ALL=C
Result is impressive:
2,99s user 0,72s system 258% cpu 1,436 total
I'm sure you will agree to integrate my version now :)
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes
2017-07-14 15:54 ` Thomas Monjalon
@ 2017-07-14 16:17 ` Wiles, Keith
0 siblings, 0 replies; 41+ messages in thread
From: Wiles, Keith @ 2017-07-14 16:17 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Stephen Hemminger, dev
> On Jul 14, 2017, at 10:54 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 14/07/2017 17:39, Thomas Monjalon:
>> 13/07/2017 08:56, Thomas Monjalon:
>>> 12/07/2017 23:59, Stephen Hemminger:
>>>> On Tue, 11 Jul 2017 22:33:55 +0200
>>>> Thomas Monjalon <thomas@monjalon.net> wrote:
>>>>
>>>>> Thank you for this script, but... it is written in Perl!
>>>>> I don't think it is a good idea to add yet another language to DPDK.
>>>>> We already have shell and python scripts.
>>>>> And I am not sure a lot of (young) people are able to parse it ;)
>>>>>
>>>>> I would like to propose this shell script:
>> [...]
>>>
>>>> plus shell is 7x slower.
>>>>
>>>> $ time bash -c "find . -name '*.c' | xargs /tmp/dupinc.sh"
>>>> real 0m0.765s
>>>> user 0m1.220s
>>>> sys 0m0.155s
>>>> $time bash -c "find . -name '*.c' | xargs ~/bin/dup_inc.pl"
>>>> real 0m0.131s
>>>> user 0m0.118s
>>>> sys 0m0.014s
>>>
>>> I don't think speed is really relevant here :)
>>
>> I did my own benchmark (recreation time):
>>
>> # time sh -c 'for file in $(git ls-files app buildtools drivers examples lib test) ; do devtools/dup_include.pl $file ; done'
>> 4,41s user 1,32s system 101% cpu 5,667 total
>> # time devtools/check-duplicate-includes.sh
>> 5,48s user 1,00s system 153% cpu 4,222 total
>>
>> The shell version is reported as faster on my computer!
>>
>> It is faster when filtering only .c and .h files:
>>
>> for file in $(git ls-files '*.[ch]') ; do
>> dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d)
>> [ -z "$dups" ] || echo "$dups" | sed "s,^,$file: duplicated include: ,"
>> done
>>
>> # time sh -c 'for file in $(git ls-files "*.[ch]") ; do devtools/dup_include.pl $file ; done'
>> 3,65s user 1,05s system 100% cpu 4,668 total
>> # time devtools/check-duplicate-includes.sh
>> 4,72s user 0,80s system 153% cpu 3,603 total
>>
>> I prefer this version using only pipes, which is well parallelized:
>>
>> for file in $(git ls-files '*.[ch]') ; do
>> sed -rn "s,$pattern,\1,p" $file | sort | uniq -d |
>> sed "s,^,$file: duplicated include: ,"
>> done
>>
>> 7,40s user 1,49s system 231% cpu 3,847 total
>
> And now, the big shell optimization:
> export LC_ALL=C
> Result is impressive:
> 2,99s user 0,72s system 258% cpu 1,436 total
>
> I'm sure you will agree to integrate my version now :)
>
hands down winner, where is the patch? :-)
>
Regards,
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-11 18:55 ` [dpdk-dev] [PATCH 01/19] devtools: add simple script to find " Stephen Hemminger
2017-07-11 20:33 ` Thomas Monjalon
@ 2017-07-14 17:07 ` Thomas Monjalon
2017-07-14 18:39 ` Wiles, Keith
` (2 more replies)
1 sibling, 3 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-14 17:07 UTC (permalink / raw)
To: stephen; +Cc: dev, keith.wiles
Based on Stephen's idea (originally implemented in a Perl script),
this is a shell script to find duplicated includes in a file.
It looks for all the .c and .h files of the git repository.
It is fast enough because automatically well parallelized.
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100755 devtools/check-dup-includes.sh
diff --git a/devtools/check-dup-includes.sh b/devtools/check-dup-includes.sh
new file mode 100755
index 000000000..ba9871255
--- /dev/null
+++ b/devtools/check-dup-includes.sh
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+
+# Copyright 2017 Mellanox Technologies, Ltd. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# Check C files in the git repository for duplicated includes.
+
+cd $(dirname $(readlink -m $0))/..
+
+# speed up by ignoring Unicode details
+export LC_ALL=C
+
+for file in $(git ls-files '*.[ch]') ; do
+ sed -rn 's,^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*,\1,p' $file |
+ sort | uniq -d |
+ sed "s,^,$file: duplicated include: ,"
+done
--
2.13.2
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-14 17:07 ` [dpdk-dev] [PATCH] devtools: add script to find duplicated includes Thomas Monjalon
@ 2017-07-14 18:39 ` Wiles, Keith
2017-07-14 18:43 ` Wiles, Keith
2017-07-15 10:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2017-07-17 11:50 ` [dpdk-dev] [PATCH] " Neil Horman
2 siblings, 1 reply; 41+ messages in thread
From: Wiles, Keith @ 2017-07-14 18:39 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: stephen, dev
> On Jul 14, 2017, at 12:07 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> Based on Stephen's idea (originally implemented in a Perl script),
> this is a shell script to find duplicated includes in a file.
> It looks for all the .c and .h files of the git repository.
>
> It is fast enough because automatically well parallelized.
>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
> create mode 100755 devtools/check-dup-includes.sh
>
> diff --git a/devtools/check-dup-includes.sh b/devtools/check-dup-includes.sh
> new file mode 100755
> index 000000000..ba9871255
> --- /dev/null
> +++ b/devtools/check-dup-includes.sh
> @@ -0,0 +1,35 @@
> +#! /bin/sh -e
> +
> +# Copyright 2017 Mellanox Technologies, Ltd. All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +#
> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> +
> +# Check C files in the git repository for duplicated includes.
> +
> +cd $(dirname $(readlink -m $0))/..
I tried the script it works, but I am concerned about the ‘cd’ above as it does all of the the repo. I would like to see it do just the directory and sub-directories if a path is given. If I am testing a specific PMD or library then I would not want to do all of the repo.
> +
> +# speed up by ignoring Unicode details
> +export LC_ALL=C
> +
> +for file in $(git ls-files '*.[ch]') ; do
> + sed -rn 's,^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*,\1,p' $file |
> + sort | uniq -d |
> + sed "s,^,$file: duplicated include: ,"
> +done
> --
> 2.13.2
>
Regards,
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-14 18:39 ` Wiles, Keith
@ 2017-07-14 18:43 ` Wiles, Keith
2017-07-15 9:44 ` Thomas Monjalon
0 siblings, 1 reply; 41+ messages in thread
From: Wiles, Keith @ 2017-07-14 18:43 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: stephen, dev
> On Jul 14, 2017, at 1:39 PM, Wiles, Keith <keith.wiles@intel.com> wrote:
>
>
>> On Jul 14, 2017, at 12:07 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>> Based on Stephen's idea (originally implemented in a Perl script),
>> this is a shell script to find duplicated includes in a file.
>> It looks for all the .c and .h files of the git repository.
>>
>> It is fast enough because automatically well parallelized.
>>
>> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>> ---
>> devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++
>> 1 file changed, 35 insertions(+)
>> create mode 100755 devtools/check-dup-includes.sh
>>
>> diff --git a/devtools/check-dup-includes.sh b/devtools/check-dup-includes.sh
>> new file mode 100755
>> index 000000000..ba9871255
>> --- /dev/null
>> +++ b/devtools/check-dup-includes.sh
>> @@ -0,0 +1,35 @@
>> +#! /bin/sh -e
>> +
>> +# Copyright 2017 Mellanox Technologies, Ltd. All rights reserved.
>> +#
>> +# Redistribution and use in source and binary forms, with or without
>> +# modification, are permitted provided that the following conditions
>> +# are met:
>> +#
>> +# * Redistributions of source code must retain the above copyright
>> +# notice, this list of conditions and the following disclaimer.
>> +# * Redistributions in binary form must reproduce the above copyright
>> +# notice, this list of conditions and the following disclaimer in
>> +# the documentation and/or other materials provided with the
>> +# distribution.
>> +#
>> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>> +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
>> +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
>> +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
>> +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
>> +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>> +
>> +# Check C files in the git repository for duplicated includes.
>> +
>> +cd $(dirname $(readlink -m $0))/..
>
> I tried the script it works, but I am concerned about the ‘cd’ above as it does all of the the repo. I would like to see it do just the directory and sub-directories if a path is given. If I am testing a specific PMD or library then I would not want to do all of the repo.
>
I was thinking about something like the following:
if [ "$1x" = "x" ]; then
cd $(dirname $(readlink -m $0))/..
fi
>> +
>> +# speed up by ignoring Unicode details
>> +export LC_ALL=C
>> +
>> +for file in $(git ls-files '*.[ch]') ; do
>> + sed -rn 's,^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*,\1,p' $file |
>> + sort | uniq -d |
>> + sed "s,^,$file: duplicated include: ,"
>> +done
>> --
>> 2.13.2
>>
>
> Regards,
> Keith
>
Regards,
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-14 18:43 ` Wiles, Keith
@ 2017-07-15 9:44 ` Thomas Monjalon
0 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-15 9:44 UTC (permalink / raw)
To: Wiles, Keith; +Cc: stephen, dev
14/07/2017 20:43, Wiles, Keith:
> > On Jul 14, 2017, at 1:39 PM, Wiles, Keith <keith.wiles@intel.com> wrote:
> >> On Jul 14, 2017, at 12:07 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> >> +cd $(dirname $(readlink -m $0))/..
> >
> > I tried the script it works, but I am concerned about the ‘cd’ above as it does all of the the repo. I would like to see it do just the directory and sub-directories if a path is given. If I am testing a specific PMD or library then I would not want to do all of the repo.
> >
>
> I was thinking about something like the following:
>
> if [ "$1x" = "x" ]; then
> cd $(dirname $(readlink -m $0))/..
> fi
Yes we can add a parameter to the script.
The parameter would be the path to check, and the default value
is the whole repo.
So the script could be used also for another repo - like pktgen ;)
I'll send a v2
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH v2] devtools: add script to find duplicated includes
2017-07-14 17:07 ` [dpdk-dev] [PATCH] devtools: add script to find duplicated includes Thomas Monjalon
2017-07-14 18:39 ` Wiles, Keith
@ 2017-07-15 10:00 ` Thomas Monjalon
2017-08-03 10:06 ` Thomas Monjalon
2017-07-17 11:50 ` [dpdk-dev] [PATCH] " Neil Horman
2 siblings, 1 reply; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-15 10:00 UTC (permalink / raw)
To: stephen; +Cc: dev, keith.wiles
Based on Stephen's idea (originally implemented in a Perl script),
this is a shell script to find duplicated includes in a file.
It looks for all the .c and .h files of the git repository.
It is fast enough because automatically well parallelized.
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Keith Wiles <keith.wiles@intel.com>
---
v2: add optional parameter for directory as suggested by Keith
---
devtools/check-dup-includes.sh | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100755 devtools/check-dup-includes.sh
diff --git a/devtools/check-dup-includes.sh b/devtools/check-dup-includes.sh
new file mode 100755
index 000000000..10365e4a1
--- /dev/null
+++ b/devtools/check-dup-includes.sh
@@ -0,0 +1,37 @@
+#! /bin/sh -e
+
+# Copyright 2017 Mellanox Technologies, Ltd. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# Check C files in git repository for duplicated includes.
+# Usage: devtools/check-dup-includes.sh [directory]
+
+dir=${1:-$(dirname $(readlink -m $0))/..}
+cd $dir
+
+# speed up by ignoring Unicode details
+export LC_ALL=C
+
+for file in $(git ls-files '*.[ch]') ; do
+ sed -rn 's,^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*,\1,p' $file |
+ sort | uniq -d |
+ sed "s,^,$file: duplicated include: ,"
+done
--
2.13.2
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: add script to find duplicated includes
2017-07-15 10:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2017-08-03 10:06 ` Thomas Monjalon
0 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-08-03 10:06 UTC (permalink / raw)
To: stephen, keith.wiles; +Cc: dev
15/07/2017 12:00, Thomas Monjalon:
> Based on Stephen's idea (originally implemented in a Perl script),
> this is a shell script to find duplicated includes in a file.
> It looks for all the .c and .h files of the git repository.
>
> It is fast enough because automatically well parallelized.
>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Keith Wiles <keith.wiles@intel.com>
> ---
> v2: add optional parameter for directory as suggested by Keith
> ---
Applied
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-14 17:07 ` [dpdk-dev] [PATCH] devtools: add script to find duplicated includes Thomas Monjalon
2017-07-14 18:39 ` Wiles, Keith
2017-07-15 10:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2017-07-17 11:50 ` Neil Horman
2017-07-17 13:01 ` Thomas Monjalon
2 siblings, 1 reply; 41+ messages in thread
From: Neil Horman @ 2017-07-17 11:50 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: stephen, dev, keith.wiles
On Fri, Jul 14, 2017 at 07:07:07PM +0200, Thomas Monjalon wrote:
> Based on Stephen's idea (originally implemented in a Perl script),
> this is a shell script to find duplicated includes in a file.
> It looks for all the .c and .h files of the git repository.
>
> It is fast enough because automatically well parallelized.
>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
> create mode 100755 devtools/check-dup-includes.sh
>
How many times has this been a problem? Find the same file included twice in
any single file seems like a pretty rudimentary thing to catch by visual
inspection during development. At the very least I recall coverity having a
header file analyer which would indicate that a header file was unused, and I
think that offered detection of duplicate includes.
Neil
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated includes
2017-07-17 11:50 ` [dpdk-dev] [PATCH] " Neil Horman
@ 2017-07-17 13:01 ` Thomas Monjalon
0 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-17 13:01 UTC (permalink / raw)
To: Neil Horman; +Cc: stephen, dev, keith.wiles
17/07/2017 14:50, Neil Horman:
> On Fri, Jul 14, 2017 at 07:07:07PM +0200, Thomas Monjalon wrote:
> > Based on Stephen's idea (originally implemented in a Perl script),
> > this is a shell script to find duplicated includes in a file.
> > It looks for all the .c and .h files of the git repository.
> >
> > It is fast enough because automatically well parallelized.
> >
> > Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++
> > 1 file changed, 35 insertions(+)
> > create mode 100755 devtools/check-dup-includes.sh
> >
> How many times has this been a problem?
It is not a problem, just a trivial clean-up.
> Find the same file included twice in
> any single file seems like a pretty rudimentary thing to catch by visual
> inspection during development. At the very least I recall coverity having a
> header file analyer which would indicate that a header file was unused, and I
> think that offered detection of duplicate includes.
Good for Coverity. This simple script is Open Source ;)
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 02/19] eal: remove duplicate includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 01/19] devtools: add simple script to find " Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 03/19] cmdline: remove duplicate include of errno.h Stephen Hemminger
` (17 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Include files only need to be refrenced once per file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/bsdapp/eal/eal.c | 2 --
lib/librte_eal/bsdapp/eal/eal_pci.c | 2 --
lib/librte_eal/bsdapp/eal/eal_thread.c | 1 -
lib/librte_eal/common/eal_common_dev.c | 1 -
lib/librte_eal/common/eal_common_tailqs.c | 1 -
lib/librte_eal/common/rte_keepalive.c | 1 -
lib/librte_eal/linuxapp/eal/eal.c | 2 --
lib/librte_eal/linuxapp/eal/eal_memory.c | 2 --
lib/librte_eal/linuxapp/eal/eal_thread.c | 1 -
lib/librte_eal/linuxapp/eal/eal_xen_memory.c | 2 --
10 files changed, 15 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 05f0c1f90d62..83801d5ba940 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -45,7 +45,6 @@
#include <stddef.h>
#include <errno.h>
#include <limits.h>
-#include <errno.h>
#include <sys/mman.h>
#include <sys/queue.h>
@@ -69,7 +68,6 @@
#include <rte_pci.h>
#include <rte_dev.h>
#include <rte_devargs.h>
-#include <rte_common.h>
#include <rte_version.h>
#include <rte_atomic.h>
#include <malloc_heap.h>
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index e321461d82e6..dcb3b51ad035 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -41,7 +41,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <stdarg.h>
#include <errno.h>
#include <dirent.h>
#include <limits.h>
@@ -52,7 +51,6 @@
#include <dev/pci/pcireg.h>
#if defined(RTE_ARCH_X86)
-#include <sys/types.h>
#include <machine/cpufunc.h>
#endif
diff --git a/lib/librte_eal/bsdapp/eal/eal_thread.c b/lib/librte_eal/bsdapp/eal/eal_thread.c
index 1b8cd8a65794..783d68c5c622 100644
--- a/lib/librte_eal/bsdapp/eal/eal_thread.c
+++ b/lib/librte_eal/bsdapp/eal/eal_thread.c
@@ -49,7 +49,6 @@
#include <rte_memzone.h>
#include <rte_per_lcore.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include "eal_private.h"
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 32e12b5b9f3f..78b6fc058351 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -41,7 +41,6 @@
#include <rte_dev.h>
#include <rte_devargs.h>
#include <rte_debug.h>
-#include <rte_devargs.h>
#include <rte_log.h>
#include "eal_private.h"
diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c
index 4f6982883ce7..55955f9eb5c9 100644
--- a/lib/librte_eal/common/eal_common_tailqs.c
+++ b/lib/librte_eal/common/eal_common_tailqs.c
@@ -46,7 +46,6 @@
#include <rte_eal_memconfig.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
-#include <rte_memory.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_log.h>
diff --git a/lib/librte_eal/common/rte_keepalive.c b/lib/librte_eal/common/rte_keepalive.c
index 9765d1bd91a1..cdd6956054d0 100644
--- a/lib/librte_eal/common/rte_keepalive.c
+++ b/lib/librte_eal/common/rte_keepalive.c
@@ -38,7 +38,6 @@
#include <rte_log.h>
#include <rte_keepalive.h>
#include <rte_malloc.h>
-#include <rte_cycles.h>
struct rte_keepalive {
/** Core Liveness. */
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 7c78f2dc248e..d03d8e3fa19e 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -46,7 +46,6 @@
#include <stddef.h>
#include <errno.h>
#include <limits.h>
-#include <errno.h>
#include <sys/mman.h>
#include <sys/queue.h>
#include <sys/stat.h>
@@ -74,7 +73,6 @@
#include <rte_pci.h>
#include <rte_dev.h>
#include <rte_devargs.h>
-#include <rte_common.h>
#include <rte_version.h>
#include <rte_atomic.h>
#include <malloc_heap.h>
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 040f24a43ca0..daead31c27d2 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -41,7 +41,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
-#include <stdarg.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -49,7 +48,6 @@
#include <sys/file.h>
#include <unistd.h>
#include <limits.h>
-#include <errno.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <signal.h>
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index 9f88530ea131..fba1a0070e6f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -49,7 +49,6 @@
#include <rte_memzone.h>
#include <rte_per_lcore.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include "eal_private.h"
diff --git a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
index bddbdb072c19..19db1cb5fde5 100644
--- a/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_xen_memory.c
@@ -38,7 +38,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
-#include <stdarg.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -46,7 +45,6 @@
#include <sys/file.h>
#include <unistd.h>
#include <limits.h>
-#include <errno.h>
#include <sys/ioctl.h>
#include <sys/time.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 03/19] cmdline: remove duplicate include of errno.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 01/19] devtools: add simple script to find " Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 02/19] eal: remove duplicate includes Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 04/19] distributor: remove duplicate include of rte_compat.h Stephen Hemminger
` (16 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Stephen Hemminger
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
lib/librte_cmdline/cmdline_parse_etheraddr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c
index dbfe4a613413..da02d2c9f8cb 100644
--- a/lib/librte_cmdline/cmdline_parse_etheraddr.c
+++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c
@@ -65,7 +65,6 @@
#include <inttypes.h>
#include <ctype.h>
#include <string.h>
-#include <errno.h>
#include <sys/types.h>
#include <net/ethernet.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 04/19] distributor: remove duplicate include of rte_compat.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (2 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 03/19] cmdline: remove duplicate include of errno.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 05/19] lpm: remove duplicate include of errno.h Stephen Hemminger
` (15 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_distributor/rte_distributor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index c4e31b8c4245..20ba9ffbc84c 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -41,7 +41,6 @@
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_eal_memconfig.h>
-#include <rte_compat.h>
#include <rte_pause.h>
#include "rte_distributor_private.h"
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 05/19] lpm: remove duplicate include of errno.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (3 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 04/19] distributor: remove duplicate include of rte_compat.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 06/19] cuckoo_hash: remove duplicate include of rte_log.h Stephen Hemminger
` (14 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_lpm/rte_lpm.c | 1 -
lib/librte_lpm/rte_lpm6.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 978ac6013ecf..64c074e987e9 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -36,7 +36,6 @@
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
-#include <errno.h>
#include <sys/queue.h>
#include <rte_log.h>
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 9cc7be77dd78..b4a7df348806 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -35,7 +35,6 @@
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
-#include <errno.h>
#include <sys/queue.h>
#include <rte_log.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 06/19] cuckoo_hash: remove duplicate include of rte_log.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (4 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 05/19] lpm: remove duplicate include of errno.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 07/19] timer: remove duplicate include of rte_per_lcore.h Stephen Hemminger
` (13 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_hash/rte_cuckoo_hash.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 5b2b8ddeb098..87b25c016a71 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -52,7 +52,6 @@
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_cpuflags.h>
-#include <rte_log.h>
#include <rte_rwlock.h>
#include <rte_spinlock.h>
#include <rte_ring.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 07/19] timer: remove duplicate include of rte_per_lcore.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (5 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 06/19] cuckoo_hash: remove duplicate include of rte_log.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 08/19] bnxt: remove duplicate include of unistd.h Stephen Hemminger
` (12 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_timer/rte_timer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index dda9baf5506d..5ee084080060 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -46,7 +46,6 @@
#include <rte_memzone.h>
#include <rte_launch.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_branch_prediction.h>
#include <rte_spinlock.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 08/19] bnxt: remove duplicate include of unistd.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (6 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 07/19] timer: remove duplicate include of rte_per_lcore.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 09/19] ixgbe: remove duplicate include of rte_atomic.h Stephen Hemminger
` (11 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bnxt/bnxt_hwrm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index da078f9edfa8..3583ec732ded 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -33,8 +33,6 @@
#include <unistd.h>
-#include <unistd.h>
-
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_cycles.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 09/19] ixgbe: remove duplicate include of rte_atomic.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (7 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 08/19] bnxt: remove duplicate include of unistd.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 10/19] i40e: " Stephen Hemminger
` (10 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 -
drivers/net/ixgbe/ixgbe_flow.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a0ae089c5118..6bc9146d8f4d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -57,7 +57,6 @@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_dev.h>
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 6885abd3517d..f70bdb0c9f4d 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -56,7 +56,6 @@
#include <rte_alarm.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_dev.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 10/19] i40e: remove duplicate include of rte_atomic.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (8 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 09/19] ixgbe: remove duplicate include of rte_atomic.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 11/19] virtio: remove duplicated includes Stephen Hemminger
` (9 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index bab09f814215..dc6c79449d14 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -56,7 +56,6 @@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_dev.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 11/19] virtio: remove duplicated includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (9 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 10/19] i40e: " Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 12/19] cxgbe: " Stephen Hemminger
` (8 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 1 -
drivers/net/virtio/virtio_user_ethdev.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 450404ba6975..79412714a30c 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -41,7 +41,6 @@
#include <sys/eventfd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include "vhost.h"
#include "virtio_user_dev.h"
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index b56a6d4657f8..c96144434adf 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -35,7 +35,6 @@
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <rte_malloc.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 12/19] cxgbe: remove duplicated includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (10 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 11/19] virtio: remove duplicated includes Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 13/19] vmxnet3: remove duplicated include of rte_atomic.h Stephen Hemminger
` (7 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cxgbe/cxgbe_ethdev.c | 1 -
drivers/net/cxgbe/cxgbe_main.c | 1 -
drivers/net/cxgbe/sge.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 981dd478e5a8..7bca45614b02 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -58,7 +58,6 @@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_dev.h>
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 0edac2b189b2..b709fe2b8210 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -58,7 +58,6 @@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_dev.h>
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index e281020017dd..5376fc50078c 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -57,7 +57,6 @@
#include <rte_alarm.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_atomic.h>
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_dev.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 13/19] vmxnet3: remove duplicated include of rte_atomic.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (11 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 12/19] cxgbe: " Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 14/19] dpaa2: remove duplicated includes Stephen Hemminger
` (6 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 72ec67c01cdd..ab5a824c8b91 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -57,7 +57,6 @@
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ethdev_pci.h>
-#include <rte_atomic.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_dev.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 14/19] dpaa2: remove duplicated includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (12 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 13/19] vmxnet3: remove duplicated include of rte_atomic.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-13 9:38 ` Hemant Agrawal
2017-07-11 18:55 ` [dpdk-dev] [PATCH 15/19] fsmlc: " Stephen Hemminger
` (5 subsequent siblings)
19 siblings, 1 reply; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/event/dpaa2/dpaa2_eventdev.c | 1 -
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 1 -
drivers/net/dpaa2/dpaa2_ethdev.c | 1 -
drivers/net/dpaa2/dpaa2_rxtx.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 412cee11a95b..5c272705e064 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -36,7 +36,6 @@
#include <errno.h>
#include <stdint.h>
#include <string.h>
-#include <stdint.h>
#include <sys/epoll.h>
#include <rte_atomic.h>
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index d578c2f8444a..4253e897eb9a 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -47,7 +47,6 @@
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <fslmc_logs.h>
#include <mc/fsl_dpbp.h>
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index c19f7261d2b0..26c2a079709d 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -42,7 +42,6 @@
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <rte_fslmc.h>
#include <fslmc_logs.h>
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 9e7de441b1ac..3db91d8b1522 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -40,7 +40,6 @@
#include <rte_memcpy.h>
#include <rte_string_fns.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 14/19] dpaa2: remove duplicated includes
2017-07-11 18:55 ` [dpdk-dev] [PATCH 14/19] dpaa2: remove duplicated includes Stephen Hemminger
@ 2017-07-13 9:38 ` Hemant Agrawal
0 siblings, 0 replies; 41+ messages in thread
From: Hemant Agrawal @ 2017-07-13 9:38 UTC (permalink / raw)
To: Stephen Hemminger, dev
On 7/12/2017 12:25 AM, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/event/dpaa2/dpaa2_eventdev.c | 1 -
> drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 1 -
> drivers/net/dpaa2/dpaa2_ethdev.c | 1 -
> drivers/net/dpaa2/dpaa2_rxtx.c | 1 -
> 4 files changed, 4 deletions(-)
>
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
> index 412cee11a95b..5c272705e064 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -36,7 +36,6 @@
> #include <errno.h>
> #include <stdint.h>
> #include <string.h>
> -#include <stdint.h>
> #include <sys/epoll.h>
>
> #include <rte_atomic.h>
> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> index d578c2f8444a..4253e897eb9a 100644
> --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> @@ -47,7 +47,6 @@
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> #include <rte_dev.h>
> -#include <rte_ethdev.h>
>
> #include <fslmc_logs.h>
> #include <mc/fsl_dpbp.h>
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index c19f7261d2b0..26c2a079709d 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -42,7 +42,6 @@
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> #include <rte_dev.h>
> -#include <rte_ethdev.h>
> #include <rte_fslmc.h>
>
> #include <fslmc_logs.h>
> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
> index 9e7de441b1ac..3db91d8b1522 100644
> --- a/drivers/net/dpaa2/dpaa2_rxtx.c
> +++ b/drivers/net/dpaa2/dpaa2_rxtx.c
> @@ -40,7 +40,6 @@
> #include <rte_memcpy.h>
> #include <rte_string_fns.h>
> #include <rte_dev.h>
> -#include <rte_ethdev.h>
>
> #include <fslmc_logs.h>
> #include <fslmc_vfio.h>
>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 15/19] fsmlc: remove duplicated includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (13 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 14/19] dpaa2: remove duplicated includes Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-13 9:39 ` Hemant Agrawal
2017-07-11 18:55 ` [dpdk-dev] [PATCH 16/19] app/proc-info: remove duplicate include Stephen Hemminger
` (4 subsequent siblings)
19 siblings, 1 reply; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/fslmc/fslmc_vfio.c | 2 --
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 725faabab312..e10443c5bc05 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -40,7 +40,6 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/mman.h>
#include <sys/vfs.h>
#include <libgen.h>
@@ -55,7 +54,6 @@
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <rte_bus.h>
#include "rte_fslmc.h"
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 88dd2e901916..c195f9f23b01 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -57,7 +57,6 @@
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
-#include <rte_ethdev.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 15/19] fsmlc: remove duplicated includes
2017-07-11 18:55 ` [dpdk-dev] [PATCH 15/19] fsmlc: " Stephen Hemminger
@ 2017-07-13 9:39 ` Hemant Agrawal
0 siblings, 0 replies; 41+ messages in thread
From: Hemant Agrawal @ 2017-07-13 9:39 UTC (permalink / raw)
To: Stephen Hemminger, dev
On 7/12/2017 12:25 AM, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/bus/fslmc/fslmc_vfio.c | 2 --
> drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 1 -
> 2 files changed, 3 deletions(-)
>
> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
> index 725faabab312..e10443c5bc05 100644
> --- a/drivers/bus/fslmc/fslmc_vfio.c
> +++ b/drivers/bus/fslmc/fslmc_vfio.c
> @@ -40,7 +40,6 @@
> #include <errno.h>
> #include <sys/ioctl.h>
> #include <sys/stat.h>
> -#include <sys/types.h>
> #include <sys/mman.h>
> #include <sys/vfs.h>
> #include <libgen.h>
> @@ -55,7 +54,6 @@
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> #include <rte_dev.h>
> -#include <rte_ethdev.h>
> #include <rte_bus.h>
>
> #include "rte_fslmc.h"
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> index 88dd2e901916..c195f9f23b01 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> @@ -57,7 +57,6 @@
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> #include <rte_dev.h>
> -#include <rte_ethdev.h>
>
> #include <fslmc_logs.h>
> #include <fslmc_vfio.h>
>
minor typo in patch header %s/fsmlc/fslmc/g
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 16/19] app/proc-info: remove duplicate include
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (14 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 15/19] fsmlc: " Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 17/19] app/test-pmd: remove duplicate includes Stephen Hemminger
` (3 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/proc_info/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index d4f6a8236e3f..8b753a2ee01b 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -53,7 +53,6 @@
#include <rte_tailq.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
-#include <rte_debug.h>
#include <rte_log.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 17/19] app/test-pmd: remove duplicate includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (15 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 16/19] app/proc-info: remove duplicate include Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 18/19] test/test-pipeline: remove duplicate include of rte_per_lcore.h Stephen Hemminger
` (2 subsequent siblings)
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/cmdline.c | 1 -
app/test-pmd/config.c | 1 -
app/test-pmd/csumonly.c | 2 --
app/test-pmd/flowgen.c | 1 -
app/test-pmd/iofwd.c | 1 -
app/test-pmd/macfwd.c | 1 -
app/test-pmd/macswap.c | 1 -
app/test-pmd/parameters.c | 1 -
app/test-pmd/rxonly.c | 1 -
app/test-pmd/txonly.c | 2 --
10 files changed, 12 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d4ff6089ad01..7decb96c8f1c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -36,7 +36,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
-#include <stdarg.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e0f08257f97d..ee6644d106ed 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -36,7 +36,6 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
-#include <stdarg.h>
#include <stdint.h>
#include <inttypes.h>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 178ad7581b8a..90c811983cf7 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -56,10 +56,8 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
-#include <rte_memcpy.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
#include <rte_ether.h>
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 13b4f900fb59..54e56f60ee79 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -57,7 +57,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_interrupts.h>
diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c
index 15cb4a209fd2..9b54f6549b39 100644
--- a/app/test-pmd/iofwd.c
+++ b/app/test-pmd/iofwd.c
@@ -55,7 +55,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c
index cf7eab12eafb..06dbc73a3623 100644
--- a/app/test-pmd/macfwd.c
+++ b/app/test-pmd/macfwd.c
@@ -56,7 +56,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_interrupts.h>
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index 3a09351245ca..19cda0eac474 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -56,7 +56,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_interrupts.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 958b3d048509..e8e58ceaf519 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -41,7 +41,6 @@
#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <errno.h>
#include <sys/queue.h>
#include <sys/stat.h>
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index dcd1d85c992f..5ef021905ce2 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -56,7 +56,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_interrupts.h>
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 8b1a2afcd9d5..7070ddc3b085 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -56,10 +56,8 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
-#include <rte_memcpy.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
#include <rte_ether.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 18/19] test/test-pipeline: remove duplicate include of rte_per_lcore.h
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (16 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 17/19] app/test-pmd: remove duplicate includes Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-11 18:55 ` [dpdk-dev] [PATCH 19/19] test/test: remove duplicate includes Stephen Hemminger
2017-07-16 15:34 ` [dpdk-dev] [PATCH 00/19] cleanup " Thomas Monjalon
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
test/test-pipeline/config.c | 1 -
test/test-pipeline/init.c | 1 -
test/test-pipeline/main.c | 1 -
test/test-pipeline/runtime.c | 2 --
4 files changed, 5 deletions(-)
diff --git a/test/test-pipeline/config.c b/test/test-pipeline/config.c
index 1b397c039132..eebb8102406d 100644
--- a/test/test-pipeline/config.c
+++ b/test/test-pipeline/config.c
@@ -55,7 +55,6 @@
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
-#include <rte_per_lcore.h>
#include <rte_branch_prediction.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
diff --git a/test/test-pipeline/init.c b/test/test-pipeline/init.c
index 00dbc2795656..1457c7890b10 100644
--- a/test/test-pipeline/init.c
+++ b/test/test-pipeline/init.c
@@ -55,7 +55,6 @@
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
-#include <rte_per_lcore.h>
#include <rte_branch_prediction.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
diff --git a/test/test-pipeline/main.c b/test/test-pipeline/main.c
index 71ab6ad98580..795b1aeb6ae9 100644
--- a/test/test-pipeline/main.c
+++ b/test/test-pipeline/main.c
@@ -56,7 +56,6 @@
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
-#include <rte_per_lcore.h>
#include <rte_branch_prediction.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
diff --git a/test/test-pipeline/runtime.c b/test/test-pipeline/runtime.c
index 8970e1c30a15..cb02fff0f84b 100644
--- a/test/test-pipeline/runtime.c
+++ b/test/test-pipeline/runtime.c
@@ -54,8 +54,6 @@
#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
-#include <rte_lcore.h>
-#include <rte_per_lcore.h>
#include <rte_branch_prediction.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [dpdk-dev] [PATCH 19/19] test/test: remove duplicate includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (17 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 18/19] test/test-pipeline: remove duplicate include of rte_per_lcore.h Stephen Hemminger
@ 2017-07-11 18:55 ` Stephen Hemminger
2017-07-16 15:34 ` [dpdk-dev] [PATCH 00/19] cleanup " Thomas Monjalon
19 siblings, 0 replies; 41+ messages in thread
From: Stephen Hemminger @ 2017-07-11 18:55 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
test/test/test_alarm.c | 1 -
test/test/test_atomic.c | 1 -
test/test/test_eal_flags.c | 1 -
test/test/test_malloc.c | 1 -
test/test/test_mbuf.c | 1 -
test/test/test_mp_secondary.c | 4 ----
test/test/test_per_lcore.c | 1 -
test/test/test_ring.c | 1 -
test/test/test_rwlock.c | 1 -
test/test/test_spinlock.c | 1 -
10 files changed, 13 deletions(-)
diff --git a/test/test/test_alarm.c b/test/test/test_alarm.c
index ecb2f6d45770..7da0efa395d9 100644
--- a/test/test/test_alarm.c
+++ b/test/test/test_alarm.c
@@ -37,7 +37,6 @@
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_interrupts.h>
-#include <rte_common.h>
#include <rte_atomic.h>
#include <rte_alarm.h>
diff --git a/test/test/test_atomic.c b/test/test/test_atomic.c
index b5e7e1b78f53..c68723ae0d87 100644
--- a/test/test/test_atomic.c
+++ b/test/test/test_atomic.c
@@ -42,7 +42,6 @@
#include <rte_launch.h>
#include <rte_atomic.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include "test.h"
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index 4afb36432cb3..594d79d7e870 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -38,7 +38,6 @@
#include <string.h>
#include <stdarg.h>
#include <libgen.h>
-#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
diff --git a/test/test/test_malloc.c b/test/test/test_malloc.c
index fcd8b8639086..013fd4407954 100644
--- a/test/test/test_malloc.c
+++ b/test/test/test_malloc.c
@@ -45,7 +45,6 @@
#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_malloc.h>
#include <rte_cycles.h>
diff --git a/test/test/test_mbuf.c b/test/test/test_mbuf.c
index 2057a518205a..3396b4a93211 100644
--- a/test/test/test_mbuf.c
+++ b/test/test/test_mbuf.c
@@ -43,7 +43,6 @@
#include <rte_common.h>
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_common.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
diff --git a/test/test/test_mp_secondary.c b/test/test/test_mp_secondary.c
index 94042e57c0b4..0b93a2de1556 100644
--- a/test/test/test_mp_secondary.c
+++ b/test/test/test_mp_secondary.c
@@ -41,11 +41,7 @@
#include <inttypes.h>
#include <sys/queue.h>
#include <errno.h>
-#include <stdarg.h>
-#include <inttypes.h>
#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
#include <unistd.h>
#include <sys/wait.h>
#include <libgen.h>
diff --git a/test/test/test_per_lcore.c b/test/test/test_per_lcore.c
index 747513d47ba0..247e171439c8 100644
--- a/test/test/test_per_lcore.c
+++ b/test/test/test_per_lcore.c
@@ -41,7 +41,6 @@
#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_cycles.h>
diff --git a/test/test/test_ring.c b/test/test/test_ring.c
index d68654eb802a..d664b04b714a 100644
--- a/test/test/test_ring.c
+++ b/test/test/test_ring.c
@@ -54,7 +54,6 @@
#include <rte_malloc.h>
#include <rte_ring.h>
#include <rte_random.h>
-#include <rte_common.h>
#include <rte_errno.h>
#include <rte_hexdump.h>
diff --git a/test/test/test_rwlock.c b/test/test/test_rwlock.c
index 50f58adec284..3dd2ed4c4dd6 100644
--- a/test/test/test_rwlock.c
+++ b/test/test/test_rwlock.c
@@ -44,7 +44,6 @@
#include <rte_atomic.h>
#include <rte_rwlock.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_cycles.h>
diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c
index b86cd887c74b..a93f1baa8add 100644
--- a/test/test/test_spinlock.c
+++ b/test/test/test_spinlock.c
@@ -44,7 +44,6 @@
#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_eal.h>
-#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_cycles.h>
#include <rte_spinlock.h>
--
2.11.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [dpdk-dev] [PATCH 00/19] cleanup duplicate includes
2017-07-11 18:55 [dpdk-dev] [PATCH 00/19] cleanup duplicate includes Stephen Hemminger
` (18 preceding siblings ...)
2017-07-11 18:55 ` [dpdk-dev] [PATCH 19/19] test/test: remove duplicate includes Stephen Hemminger
@ 2017-07-16 15:34 ` Thomas Monjalon
19 siblings, 0 replies; 41+ messages in thread
From: Thomas Monjalon @ 2017-07-16 15:34 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
11/07/2017 20:55, Stephen Hemminger:
> Using a simple script (in first patch), discovered that there was
> lots of #include file sloppiness in DPDK. This patch series
> fixes everything but base drivers and examples.
>
> Stephen Hemminger (19):
> devtools: add simple script to find duplicate includes
> eal: remove duplicate includes
> cmdline: remove duplicate include of errno.h
> distributor: remove duplicate include of rte_compat.h
> lpm: remove duplicate include of errno.h
> cuckoo_hash: remove duplicate include of rte_log.h
> timer: remove duplicate include of rte_per_lcore.h
> bnxt: remove duplicate include of unistd.h
> ixgbe: remove duplicate include of rte_atomic.h
> i40e: remove duplicate include of rte_atomic.h
> virtio: remove duplicated includes
> cxgbe: remove duplicated includes
> vmxnet3: remove duplicated include of rte_atomic.h
> dpaa2: remove duplicated includes
> fsmlc: remove duplicated includes
> app/proc-info: remove duplicate include
> app/test-pmd: remove duplicate includes
> test/test-pipeline: remove duplicate include of rte_per_lcore.h
> test/test: remove duplicate includes
Squashed a bit and applied with an additional patch for examples,
some more duplicates in .h files removed, and without the perl script.
Note: my shell script is pending for approval :)
Thanks
^ permalink raw reply [flat|nested] 41+ messages in thread