introduce IWYU
cover introduce IWYU
This patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
Sean Morrissey (5):
devtools: script to remove unused headers includes lib/telemetry: remove unneeded header includes lib/ring: remove unneeded header includes lib/kvargs: remove unneeded header includes lib/eal: remove unneeded header includes
devtools/process_iwyu.py | 109 +++++++++++++++++++++++++ lib/eal/common/eal_common_dev.c | 5 -- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 6 -- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 -- lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 --- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 -- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 6 -- lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 --- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 -- lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 8 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +-- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 5 -- lib/eal/linux/eal_timer.c | 15 ---- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/kvargs/rte_kvargs.c | 1 - lib/ring/rte_ring.c | 7 -- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 49 files changed, 110 insertions(+), 213 deletions(-) create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
PATCH 1/5 devtools: script to remove unused headers includes
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
--- devtools/process_iwyu.py | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 devtools/process_iwyu.py
devtools/process_iwyu.py new file +109 -0
@@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys +from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + +def args_parse(): + parser = argparse.ArgumentParser(description='This script can be used to remove includes which are not in use\n') + parser.add_argument('-b', '--build_dir', type=str, help='Name of the build directory in which the IWYU tool was used in.', default="build") + parser.add_argument('-d', '--sub_dir', type=str, help='The sub-directory to remove headers from.', default="") + parser.add_argument('file', type=Path, help='The path to the IWYU log file or output from stdin.') + + args = parser.parse_args() + + return args + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filename, include, dpdk_dir, build_dir): + # Load in file - readlines() + # loop through list once in mem -> make cpy of list with line removed + # write cpy -> stored in memory so write cpy to file then check + # run test build -> call ninja on the build folder, ninja -C build, subprocess + # if fails -> write original back to file otherwise continue on + # newlist = [ln for ln in lines if not ln.startswith(...)] filters out one element + filepath = filename + + with open(filepath, 'r+') as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if ln.strip("\n") != include: + f.write(ln) + + ret = run_meson(['compile', '-C', join(dpdk_dir, build_dir)]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + filename = None + build_dir = args.build_dir + dpdk_dir = abspath(__file__).split('/devtools')[0] + directory = args.sub_dir + # Use stdin if no iwyu_tool out file given + logfile = abspath(args.file) if str(args.file) != '-' else args.file + + keep_str_fns = uses_libbsd(join(dpdk_dir, build_dir)) # check for libbsd + if keep_str_fns: + print('Warning: libbsd is present, build will fail to detect incorrect removal of rte_string_fns.h', + file=sys.stderr) + run_meson(['configure', dpdk_dir + "/" + build_dir, '-Dwerror=true']) # turn on werror + + for line in fileinput.input(logfile): + if 'should remove' in line: + # If the file path in the iwyu_tool output is an absolute path + # it means the file is outside of the dpdk directory, therefore ignore it + # Also check to see if the file is within the specified sub directory + if line.split()[0] != abspath(line.split()[0]) and directory in line.split()[0]: + filename = relpath(join(build_dir, line.split()[0])) + elif line.startswith('-') and filename: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filename} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filename, include, dpdk_dir, build_dir) + else: + filename = None + + +def main(): + args = args_parse() + process(args) + + +if __name__ == '__main__': + main()
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v1 1/5] devtools: script to remove unused headers includes
Quoted 4 lines · Sean Morrissey
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
Since it also is importing meson and calling "meson compile" it appears to be testing the build after each removal too. I think this should be called out, to make it clear it's not a "blind" removal of headers.
Further review comments inline below.
/Bruce
Quoted 32 lines
example usages:
Remove headers flagged by
iwyu_tooloutput file$ ./devtools/process_iwyu.py iwyu.out -b buildRemove headers flagged by
iwyu_tooloutput file from sub-directory$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargsRemove headers directly piped from the
iwyu_tool$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b buildSigned-off-by Sean Morrissey <[email protected]>Signed-off-by Conor Fogarty <[email protected]>--- devtools/process_iwyu.py | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 devtools/process_iwyu.pydevtools/process_iwyu.py new file +8
-0@@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys
devtools/process_iwyu.py line 18
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + +def args_parse(): + parser = argparse.ArgumentParser(description='This script can be used to remove includes which are not in use\n') + parser.add_argument('-b', '--build_dir', type=str, help='Name of the build directory in which the IWYU tool was used in.', default="build") + parser.add_argument('-d', '--sub_dir', type=str, help='The sub-directory to remove headers from.', default="") + parser.add_argument('file', type=Path, help='The path to the IWYU log file or output from stdin.') +
These lines are all very long. While the text strings shouldn't be split across lines, you can break the line across multiple ones between parameters. I suggest checking this whole script using "flake8" to check for style errors.
devtools/process_iwyu.py line 22
Quoted 4 lines
devtools/process_iwyu.py new file +4
-0+ args = parser.parse_args() + + return args +
"args" is unneeded here. "return parse.parse_args()" is shorter. :-)
devtools/process_iwyu.py line 30
Quoted 8 lines
devtools/process_iwyu.py new file +8
-0+ +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret +
I think process.log should be renamed to "process_iwyu.log" to match the script name.
Also, it's nice to see a few functions like this with a docstring at the start. It would be good to have a one-line summary at the start of every fn in this file.
devtools/process_iwyu.py line 36
Quoted 6 lines
devtools/process_iwyu.py new file +6
-0+ +def remove_includes(filename, include, dpdk_dir, build_dir): + # Load in file - readlines() + # loop through list once in mem -> make cpy of list with line removed + # write cpy -> stored in memory so write cpy to file then check + # run test build -> call ninja on the build folder, ninja -C build, subprocess
You actually call "meson compile" rather than ninja -C build. Please make sure the comments match the code as the code is reworked.
If you take the approach of adding a one-line string at the start of each function, I'd suggest splitting up this comment into smaller comments spread throughout the code, explaining each short block as it appears. [Though I see it's reasonably well commented below as-is]
devtools/process_iwyu.py line 46
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+ # if fails -> write original back to file otherwise continue on + # newlist = [ln for ln in lines if not ln.startswith(...)] filters out one element + filepath = filename + + with open(filepath, 'r+') as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if ln.strip("\n") != include:
Strip without any parameters removes all whitespace, which is probably ok here, so drop the explicit "\n".
Quoted 18 lines
devtools/process_iwyu.py new file +18
-0+ f.write(ln) + + ret = run_meson(['compile', '-C', join(dpdk_dir, build_dir)]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] +
devtools/process_iwyu.py line 74
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+ +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + filename = None + build_dir = args.build_dir + dpdk_dir = abspath(__file__).split('/devtools')[0]
This assumes that we are using the script from the devtools dir of the copy of DPDK we want to edit. That's probably a fair enough assumption and good enough, though I'd like more input on it.
The other alternative is to work of the build dir, which will have the paths to the DPDK source code directory in it. Running "meson configure" in the build dir will print out the source directory location at the start:
$ meson configure | head Core properties: Source dir /home/bruce/dpdk.org Build dir /home/bruce/dpdk.org/build
devtools/process_iwyu.py line 77
Quoted 3 lines
devtools/process_iwyu.py new file +3
-0+ directory = args.sub_dir + # Use stdin if no iwyu_tool out file given + logfile = abspath(args.file) if str(args.file) != '-' else args.file
Not sure this line is necessary. Assuming that we don't chdir anywhere, using args.file directly below in call to "fileinput.input" should work perfectly.
Quoted 19 lines
devtools/process_iwyu.py new file +19
-0+ + keep_str_fns = uses_libbsd(join(dpdk_dir, build_dir)) # check for libbsd + if keep_str_fns: + print('Warning: libbsd is present, build will fail to detect incorrect removal of rte_string_fns.h', + file=sys.stderr) + run_meson(['configure', dpdk_dir + "/" + build_dir, '-Dwerror=true']) # turn on werror + + for line in fileinput.input(logfile): + if 'should remove' in line: + # If the file path in the iwyu_tool output is an absolute path + # it means the file is outside of the dpdk directory, therefore ignore it + # Also check to see if the file is within the specified sub directory + if line.split()[0] != abspath(line.split()[0]) and directory in line.split()[0]: + filename = relpath(join(build_dir, line.split()[0])) + elif line.startswith('-') and filename: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filename} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped')
devtools/process_iwyu.py line 106
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+ continue + remove_includes(filename, include, dpdk_dir, build_dir) + else: + filename = None + + +def main(): + args = args_parse() + process(args) +
Nit: again, args variable is unnecessary, and you can shorten to single line if you like "process(args_parse())"
Quoted 6 lines
devtools/process_iwyu.py new file +3
-0+ +if __name__ == '__main__': + main()Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v1 1/5] devtools: script to remove unused headers includes
In reply to Sean Morrissey04/10/2021 12:10, Sean Morrissey:
Quoted 3 lines
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
My fear is that it could flag an include as useless, while it is required for a different system (BSD, Windows).
Re: [dpdk-dev] [PATCH v1 1/5] devtools: script to remove unused headers includes
Quoted 8 lines · Thomas Monjalon
04/10/2021 12:10, Sean Morrissey:
Quoted 3 lines
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
My fear is that it could flag an include as useless, while it is required for a different system (BSD, Windows).
Hi Thomas,
Stephen raised a similar concern. Please see Bruce's reply here: https://patches.dpdk.org/project/dpdk/cover/[email protected]/
Thanks,
Sean.
Re: [dpdk-dev] [PATCH v1 1/5] devtools: script to remove unused headers includes
Quoted 6 lines · Sean
Quoted 4 lines · Thomas Monjalon
04/10/2021 12:10, Sean Morrissey:
Quoted 3 lines
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
Quoted 8 lines
Quoted 4 lines
My fear is that it could flag an include as useless, while it is required for a different system (BSD, Windows).
Hi Thomas,
Stephen raised a similar concern. Please see Bruce's reply here: https://patches.dpdk.org/project/dpdk/cover/[email protected]/
One additional data point. Checking the output of a run I did of IWYU a month or two ago, shows 2254 header includes that IWYU thinks should be removed. With that sort of scale of an issue, I think automation will be needed.
/Bruce
Re: [dpdk-dev] [PATCH v1 1/5] devtools: script to remove unused headers includes
06/10/2021 18:28, Bruce Richardson:
Quoted 11 lines · Sean
Quoted 10 lines · Thomas Monjalon
Quoted 8 lines
04/10/2021 12:10, Sean Morrissey:
Quoted 3 lines
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole.
My fear is that it could flag an include as useless, while it is required for a different system (BSD, Windows).
Quoted 8 lines
Quoted 4 lines
Hi Thomas,
Stephen raised a similar concern. Please see Bruce's reply here: https://patches.dpdk.org/project/dpdk/cover/[email protected]/
One additional data point. Checking the output of a run I did of IWYU a month or two ago, shows 2254 header includes that IWYU thinks should be removed. With that sort of scale of an issue, I think automation will be needed.
I agree to integrate this tool, but we must make clear there are false positives. Please add a warning when running it.
PATCH 2/5 lib/telemetry: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 2 files changed, 2 deletions(-)
lib/telemetry/telemetry.c +0 -1
@@ -8,7 +8,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> -#include <dlfcn.h> #endif /* !RTE_EXEC_ENV_WINDOWS */ /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
lib/telemetry/telemetry_data.h +0 -1
@@ -5,7 +5,6 @@#ifndef _TELEMETRY_DATA_H_#define _TELEMETRY_DATA_H_ -#include <inttypes.h> #include "rte_telemetry.h" enum tel_container_types {
Signature · 1 line
2.25.1
PATCH 3/5 lib/ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 7 ------- 1 file changed, 7 deletions(-)
lib/ring/rte_ring.c +0 -7
@@ -17,16 +17,9 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_spinlock.h>
Signature · 1 line
2.25.1
PATCH 4/5 lib/kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)
lib/kvargs/rte_kvargs.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
PATCH 5/5 lib/eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 6 ------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 6 ------ lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 8 -------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 -------- lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 1 insertion(+), 203 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
@@ -5,20 +5,15 @@#include <stdio.h> #include <string.h> -#include <inttypes.h> #include <sys/queue.h> -#include <rte_compat.h> #include <rte_bus.h> #include <rte_class.h> #include <rte_dev.h> #include <rte_devargs.h> -#include <rte_debug.h> #include <rte_errno.h> -#include <rte_kvargs.h> #include <rte_log.h> #include <rte_spinlock.h> -#include <rte_malloc.h> #include <rte_string_fns.h> #include "eal_private.h"
lib/eal/common/eal_common_devargs.c +0 -1
@@ -12,7 +12,6 @@#include <rte_bus.h> #include <rte_class.h> -#include <rte_compat.h> #include <rte_dev.h> #include <rte_devargs.h> #include <rte_errno.h>
lib/eal/common/eal_common_errno.c +0 -4
@@ -5,15 +5,11 @@/* Use XSI-compliant portable version of strerror_r() */ #undef _GNU_SOURCE -#include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_per_lcore.h> #include <rte_errno.h> -#include <rte_string_fns.h> #ifdef RTE_EXEC_ENV_WINDOWS #define strerror_r (errnum, buf, buflen) strerror_s(buf, buflen, errnum)
lib/eal/common/eal_common_fbarray.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2017-2018 Intel Corporation */ -#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h>
@@ -14,9 +13,7 @@#include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include "eal_filesystem.h" #include "eal_private.h"
lib/eal/common/eal_common_hexdump.c +0 -3
@@ -1,10 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> -#include <errno.h> -#include <stdint.h> #include <rte_hexdump.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_launch.c +0 -6
@@ -3,16 +3,10 @@*/ #include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/queue.h> #include <rte_launch.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_atomic.h> #include <rte_pause.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include "eal_private.h"
lib/eal/common/eal_common_lcore.c +0 -6
@@ -2,19 +2,13 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <unistd.h> -#include <limits.h> #include <string.h> #include <rte_common.h> -#include <rte_debug.h> -#include <rte_eal.h> #include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_rwlock.h> -#include "eal_memcfg.h" #include "eal_private.h" #include "eal_thread.h"
lib/eal/common/eal_common_log.c +0 -2
@@ -11,9 +11,7 @@#include <regex.h> #include <fnmatch.h> -#include <rte_eal.h> #include <rte_log.h> -#include <rte_os_shim.h> #include <rte_per_lcore.h> #include "eal_log.h"
lib/eal/common/eal_common_memalloc.c +0 -3
@@ -5,12 +5,9 @@#include <string.h> #include <rte_errno.h> -#include <rte_lcore.h> #include <rte_fbarray.h> -#include <rte_memzone.h> #include <rte_memory.h> #include <rte_string_fns.h> -#include <rte_rwlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/eal_common_memory.c +0 -5
@@ -2,16 +2,11 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdint.h> -#include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> #include <rte_fbarray.h> #include <rte_memory.h>
lib/eal/common/eal_common_memzone.c +0 -4
@@ -2,20 +2,16 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> #include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/eal/common/eal_common_options.c +0 -2
@@ -4,7 +4,6 @@*/ #include <stdlib.h> -#include <unistd.h> #include <string.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <syslog.h>
@@ -17,7 +16,6 @@#include <dlfcn.h> #include <libgen.h> #endif -#include <sys/types.h> #include <sys/stat.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dirent.h>
lib/eal/common/eal_common_proc.c +0 -2
@@ -15,7 +15,6 @@#include <string.h> #include <sys/file.h> #include <sys/time.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h>
@@ -27,7 +26,6 @@#include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_tailq.h> #include "eal_memcfg.h" #include "eal_private.h"
lib/eal/common/eal_common_string_fns.c +0 -2
@@ -2,9 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_tailqs.c +0 -11
@@ -3,24 +3,13 @@*/ #include <sys/queue.h> -#include <stdint.h> -#include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> -#include <inttypes.h> -#include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_log.h> #include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_memcfg.h"
lib/eal/common/eal_common_thread.c +0 -3
@@ -4,10 +4,7 @@#include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <unistd.h> #include <pthread.h> -#include <signal.h> #include <sched.h> #include <assert.h> #include <string.h>
lib/eal/common/eal_common_timer.c +0 -6
@@ -2,16 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/types.h> -#include <time.h> -#include <errno.h> #include <rte_common.h> -#include <rte_compat.h> #include <rte_log.h> #include <rte_cycles.h> #include <rte_pause.h>
lib/eal/common/eal_common_trace.c +0 -1
@@ -3,7 +3,6 @@*/ #include <fnmatch.h> -#include <inttypes.h> #include <sys/queue.h> #include <regex.h>
lib/eal/common/hotplug_mp.h +0 -1
@@ -6,7 +6,6 @@#define _HOTPLUG_MP_H_#include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request"#define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response"
lib/eal/common/malloc_elem.c +0 -6
@@ -6,17 +6,11 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> #include <rte_common.h> -#include <rte_spinlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/malloc_heap.c +0 -5
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdlib.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <sys/queue.h>
@@ -13,15 +12,11 @@#include <rte_errno.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> #include <rte_string_fns.h> #include <rte_spinlock.h> -#include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_atomic.h> #include <rte_fbarray.h> #include "eal_internal_cfg.h"
lib/eal/common/malloc_mp.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <sys/time.h> -#include <rte_alarm.h> #include <rte_errno.h> #include <rte_string_fns.h>
lib/eal/common/malloc_mp.h +0 -2
@@ -10,8 +10,6 @@#include <rte_common.h> #include <rte_random.h> -#include <rte_spinlock.h> -#include <rte_tailq.h> /* forward declarations */ struct malloc_heap ;
lib/eal/common/rte_malloc.c +0 -6
@@ -6,18 +6,12 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> #include <rte_errno.h> #include <rte_memcpy.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_branch_prediction.h> -#include <rte_debug.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_common.h> #include <rte_spinlock.h>
lib/eal/common/rte_random.c +0 -3
@@ -5,14 +5,11 @@#ifdef __RDSEED__#include <x86intrin.h> #endif -#include <stdlib.h> #include <unistd.h> #include <rte_branch_prediction.h> #include <rte_cycles.h> -#include <rte_eal.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_random.h> struct rte_rand_state {
lib/eal/common/rte_service.c +0 -6
@@ -3,22 +3,16 @@*/ #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <limits.h> #include <string.h> -#include <rte_compat.h> #include <rte_service.h> #include <rte_service_component.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_debug.h> #include <rte_cycles.h> #include <rte_atomic.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/include/rte_version.h +0 -2
@@ -14,10 +14,8 @@extern "C" {#endif -#include <stdint.h> #include <string.h> #include <stdio.h> -#include <rte_common.h> #include <rte_compat.h> /**
lib/eal/linux/eal.c +0 -10
@@ -7,10 +7,8 @@#include <stdlib.h> #include <stdint.h> #include <string.h> -#include <stdarg.h> #include <unistd.h> #include <pthread.h> -#include <syslog.h> #include <getopt.h> #include <sys/file.h> #include <dirent.h>
@@ -20,32 +18,24 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #if defined(RTE_ARCH_X86 )#include <sys/io.h> #endif #include <linux/version.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_debug.h> #include <rte_memory.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_errno.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_service_component.h> #include <rte_log.h> -#include <rte_random.h> -#include <rte_cycles.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> -#include <rte_interrupts.h> #include <rte_bus.h> -#include <rte_dev.h> -#include <rte_devargs.h> #include <rte_version.h> #include <malloc_heap.h> #include <rte_vfio.h>
lib/eal/linux/eal_alarm.c +0 -7
@@ -3,21 +3,14 @@*/ #include <stdio.h> #include <stdint.h> -#include <signal.h> #include <errno.h> -#include <string.h> #include <sys/queue.h> #include <sys/time.h> #include <sys/timerfd.h> -#include <rte_memory.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_common.h> -#include <rte_per_lcore.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_cpuflags.c +0 -2
@@ -5,8 +5,6 @@#include <elf.h> #include <fcntl.h> #include <string.h> -#include <sys/stat.h> -#include <sys/types.h> #include <unistd.h> #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
lib/eal/linux/eal_debug.c +0 -5
@@ -5,16 +5,11 @@#ifdef RTE_BACKTRACE #include <execinfo.h> #endif -#include <stdarg.h> -#include <signal.h> #include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_common.h> -#include <rte_eal.h> #define BACKTRACE_SIZE 256
lib/eal/linux/eal_dev.c +0 -4
@@ -4,20 +4,16 @@#include <string.h> #include <unistd.h> -#include <fcntl.h> #include <signal.h> #include <sys/socket.h> #include <linux/netlink.h> #include <rte_string_fns.h> #include <rte_log.h> -#include <rte_compat.h> #include <rte_dev.h> -#include <rte_malloc.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_bus.h> -#include <rte_eal.h> #include <rte_spinlock.h> #include <rte_errno.h>
lib/eal/linux/eal_hugepage_info.c +0 -8
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <sys/types.h> #include <sys/file.h> #include <dirent.h> #include <fcntl.h>
@@ -12,19 +11,12 @@#include <stdio.h> #include <fnmatch.h> #include <inttypes.h> -#include <stdarg.h> #include <unistd.h> #include <errno.h> #include <sys/mman.h> -#include <sys/queue.h> -#include <sys/stat.h> #include <linux/mman.h> /* for hugetlb-related flags */ -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_debug.h> #include <rte_log.h>
lib/eal/linux/eal_interrupts.c +0 -8
@@ -7,13 +7,10 @@#include <stdlib.h> #include <pthread.h> #include <sys/queue.h> -#include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include <inttypes.h> #include <sys/epoll.h> -#include <sys/signalfd.h> #include <sys/ioctl.h> #include <sys/eventfd.h> #include <assert.h>
@@ -21,9 +18,6 @@#include <rte_common.h> #include <rte_interrupts.h> -#include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_branch_prediction.h>
@@ -36,8 +30,6 @@#include <rte_eal_trace.h> #include "eal_private.h" -#include "eal_vfio.h" -#include "eal_thread.h" #define EAL_INTR_EPOLL_WAIT_FOREVER (-1)#define NB_OTHER_INTR 1
lib/eal/linux/eal_lcore.c +0 -7
@@ -4,15 +4,8 @@#include <unistd.h> #include <limits.h> -#include <string.h> -#include <dirent.h> #include <rte_log.h> -#include <rte_eal.h> -#include <rte_lcore.h> -#include <rte_common.h> -#include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_filesystem.h"
lib/eal/linux/eal_log.c +1 -10
@@ -2,19 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdint.h> #include <sys/types.h> #include <syslog.h> -#include <sys/queue.h> - -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_spinlock.h> +#include <rte_log.h> #include "eal_log.h"
lib/eal/linux/eal_memalloc.c +0 -8
@@ -3,23 +3,17 @@*/ #include <errno.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <unistd.h> #include <limits.h> #include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
@@ -36,9 +30,7 @@#include <rte_common.h> #include <rte_log.h> #include <rte_eal.h> -#include <rte_errno.h> #include <rte_memory.h> -#include <rte_spinlock.h> #include "eal_filesystem.h" #include "eal_internal_cfg.h"
lib/eal/linux/eal_memory.c +0 -9
@@ -5,7 +5,6 @@#include <errno.h> #include <fcntl.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h>
@@ -13,19 +12,14 @@#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <sys/resource.h> #include <unistd.h> #include <limits.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ -#include <linux/memfd.h> #define MEMFD_SUPPORTED #endif #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
@@ -36,12 +30,9 @@#include <rte_errno.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_string_fns.h> #include "eal_private.h" #include "eal_memalloc.h"
lib/eal/linux/eal_thread.c +0 -5
@@ -4,20 +4,15 @@#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <pthread.h> -#include <sched.h> -#include <sys/queue.h> #include <sys/syscall.h> #include <rte_debug.h> #include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> -#include <rte_memory.h> -#include <rte_per_lcore.h> #include <rte_eal.h> #include <rte_lcore.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_timer.c +0 -15
@@ -3,28 +3,13 @@* Copyright(c) 2012-2013 6WIND S.A. */ -#include <string.h> -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <unistd.h> -#include <fcntl.h> -#include <inttypes.h> -#include <sys/mman.h> -#include <sys/queue.h> -#include <pthread.h> -#include <errno.h> #include <rte_common.h> -#include <rte_log.h> #include <rte_cycles.h> -#include <rte_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_debug.h> #include "eal_private.h" -#include "eal_internal_cfg.h" enum timer_source eal_timer_source =EAL_TIMER_HPET ;
lib/eal/linux/eal_vfio_mp_sync.c +0 -1
@@ -5,7 +5,6 @@#include <unistd.h> #include <string.h> -#include <rte_compat.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_vfio.h>
lib/eal/unix/eal_file.c +0 -1
@@ -3,7 +3,6 @@*/ #include <sys/file.h> -#include <sys/mman.h> #include <fcntl.h> #include <unistd.h>
lib/eal/unix/rte_thread.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_thread.h>
lib/eal/x86/rte_cycles.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <cpuid.h> -#include <rte_common.h> #include "eal_private.h"
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v1 5/5] lib/eal: remove unneeded header includes
Quoted 12 lines
-----Original Message-----
From: Morrissey, Sean <[email protected]>
Sent: Monday, October 4, 2021 11:11 AM
To: Burakov, Anatoly <[email protected]>; Jerin Jacob <[email protected]>; Sunil Kumar Kori <[email protected]>; mattias.ronnblom <[email protected]>; Van Haaren, Harry <[email protected]>; Harman Kalra <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; Morrissey, Sean <[email protected]>
Subject: [PATCH v1 5/5] lib/eal: remove unneeded header includes
Quoted 4 lines
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>
<snip patch>
For lib/eal/common/rte_service.c;
Mattias Rönnblom
Reviewed-byRe: [dpdk-dev] [PATCH v1 5/5] lib/eal: remove unneeded header includes
Quoted 12 lines · Harry
Quoted 12 lines
-----Original Message-----
From: Morrissey, Sean <[email protected]>
Sent: Monday, October 4, 2021 11:11 AM
To: Burakov, Anatoly <[email protected]>; Jerin Jacob <[email protected]>; Sunil Kumar Kori <[email protected]>; mattias.ronnblom <[email protected]>; Van Haaren, Harry <[email protected]>; Harman Kalra <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; Morrissey, Sean <[email protected]>
Subject: [PATCH v1 5/5] lib/eal: remove unneeded header includes
Quoted 8 lines
Quoted 4 lines
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]><snip patch>
For
lib/eal/common/rte_service.c;Reviewed-by Harry van Haaren <[email protected]>
For lib/eal/common/rte_random.c:
Re: [dpdk-dev] [PATCH v1 5/5] lib/eal: remove unneeded header includes
In reply to Sean MorrisseyQuoted 42 lines · Sean Morrissey
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 6 ------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 6 ------ lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 8 -------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 --------
Quoted 8 lines
lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 1 insertion(+), 203 deletions(-)
Build errors generated on POWER build with gcc 8.3.1-5 (RHEL 8.4):
[64/2593] Compiling C object 'lib/76b5a35@@rte_eal@sta/eal_common_eal_common_lcore.c.o'. ../lib/eal/common/eal_common_lcore.c: In function ‘rte_lcore_index’:../lib/eal/common/eal_common_lcore.c:27:6: warning: implicit declaration of function ‘unlikely’ [-Wimplicit-function-declaration]
if (unlikely(lcore_id >= RTE_MAX_LCORE))
^~~~~~~~
../lib/eal/common/eal_common_lcore.c:27:6: warning: nested extern declaration of ‘unlikely’ [-Wnested-externs] [436/2593] Linking target lib/librte_eal.so.22.0.
FAILED: lib/librte_eal.so.22.0
Failure can be fixed in one of two ways:
1) Leave #include <rte_debug.h> in lib/eal/common/eal_common_lcore.c
2) Replace #include <rte_debug.h> with <rte_branch_prediction.h> in lib/eal/common/eal_common_lcore.c
Dave
Quoted 58 lines · On Mon, 4 Oct 2021 10:10:53 +0000 Sean Morrissey <[email protected]>…
This patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
Sean Morrissey (5):
devtools: script to remove unused headers includes lib/telemetry: remove unneeded header includes lib/ring: remove unneeded header includes lib/kvargs: remove unneeded header includes lib/eal: remove unneeded header includesdevtools/process_iwyu.py | 109 +++++++++++++++++++++++++ lib/eal/common/eal_common_dev.c | 5 -- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 6 -- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 -- lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 --- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 -- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 6 -- lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 --- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 -- lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 8 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +-- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 5 -- lib/eal/linux/eal_timer.c | 15 ---- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 -
Quoted 9 lines
lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/kvargs/rte_kvargs.c | 1 - lib/ring/rte_ring.c | 7 -- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 49 files changed, 110 insertions(+), 213 deletions(-) create mode 100755 devtools/process_iwyu.py
There is a risk of breaking builds on other platforms.
How can you be sure the include files (especially auto generated list) are the same in Linux, FreeBSD and Windows as well as the special versions of libc (musl etc).
Quoted 19 lines · Stephen Hemminger
Quoted 16 lines · On Mon, 4 Oct 2021 10:10:53 +0000 Sean Morrissey <[email protected]>…
This patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
Sean Morrissey (5):
devtools: script to remove unused headers includes lib/telemetry: remove unneeded header includes lib/ring: remove unneeded header includes lib/kvargs: remove unneeded header includes lib/eal: remove unneeded header includesdevtools/process_iwyu.py | 109 +++++++++++++++++++++++++
<snip>
Quoted 8 lines
Quoted 3 lines
49 files changed, 110 insertions(+), 213 deletions(-) create mode 100755 devtools/process_iwyu.pyThere is a risk of breaking builds on other platforms.
How can you be sure the include files (especially auto generated list) are the same in Linux, FreeBSD and Windows as well as the special versions of libc (musl etc).
Yep, there is a risk of that but:
a) that's why we have automated build checks of various types in test-meson-builds and why we have automated testing of patches in a number of different labs reported out in patchwork.
b) if we say we can't risk it, we then can't gain much/any real benefit from tools like iwyu - a tool that you have encouraged use of a number of times :-).
Overall, I think this is a good thing for DPDK, and I encouraged Sean to look into it, because it just helps with code quality in DPDK. However, it's also true that there is risk in this, so I think the approach of only doing a few libraries initially - so we can see how it works out - is probably best, rather than trying to do the whole codebase in one go. I think it's also true to say that the risk is greatest with EAL, so if it can be cleaned up, cleaning the other libs and maybe then drivers should be easier. Having the whole processing automated will also help with this, as - if we want to minimize risk - the work on each driver can be done by the driver maintainers themselves, who are best placed to know the platform-specific issues for that code.
Regards,
/Bruce
v2 cover introduce IWYU
In reply to Sean MorrisseyThis patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
Sean Morrissey (5):
devtools: script to remove unused headers includes lib/telemetry: remove unneeded header includes lib/ring: remove unneeded header includes lib/kvargs: remove unneeded header includes lib/eal: remove unneeded header includes
devtools/process_iwyu.py | 114 +++++++++++++++++++++++++ lib/eal/common/eal_common_dev.c | 5 -- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 7 +- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 -- lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 --- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 -- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 6 -- lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 --- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 -- lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 8 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +-- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 5 -- lib/eal/linux/eal_timer.c | 15 ---- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/kvargs/rte_kvargs.c | 1 - lib/ring/rte_ring.c | 7 -- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 49 files changed, 116 insertions(+), 213 deletions(-) create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
PATCH v2 1/5 devtools: script to remove unused headers includes
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
--- devtools/process_iwyu.py | 114 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 devtools/process_iwyu.py
devtools/process_iwyu.py new file +114 -0
@@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys +from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + + +def args_parse(): + "parse arguments and return the argument object back to main" + parser = argparse.ArgumentParser( + description="""This script can be used to remove + includes which are not in use\n""") + parser.add_argument('-b', '--build_dir', type=str, + help="""The path to the build directory in which + the IWYU tool was used in.""", default="build") + parser.add_argument('-d', '--sub_dir', type=str, + help='The sub-directory to remove headers from.', + default="") + parser.add_argument('file', type=Path, + help="""The path to the IWYU log file or output + from stdin.""") + + return parser.parse_args() + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process_iwyu.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filename, include, build_dir): + "Attempts to remove include, if it fails then revert to original state" + filepath = filename + + with open(filepath, 'r+') as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if ln.strip() != include: + f.write(ln) + + # run test build -> call meson on the build folder, meson compile -C build + ret = run_meson(['compile', '-C', build_dir]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + "process the iwyu output on a set of files" + filename = None + build_dir = abspath(args.build_dir) + directory = args.sub_dir + + keep_str_fns = uses_libbsd(build_dir) # check for libbsd + if keep_str_fns: + print("""Warning: libbsd is present, build will fail to detect + incorrect removal of rte_string_fns.h""", file=sys.stderr) + # turn on werror + run_meson(['configure', build_dir, '-Dwerror=true']) + # Use stdin if no iwyu_tool out file given + for line in fileinput.input(args.file): + if 'should remove' in line: + # If the file path in the iwyu_tool output is + # an absolute path it means the file is outside + # of the dpdk directory, therefore ignore it. + # Also check to see if the file is within the + # specified sub directory. + if (line.split()[0] != abspath(line.split()[0]) and + directory in line.split()[0]): + filename = relpath(join(build_dir, line.split()[0])) + elif line.startswith('-') and filename: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filename} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filename, include, build_dir) + else: + filename = None + + +def main(): + process(args_parse()) + + +if __name__ == '__main__': + main()
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 1/5] devtools: script to remove unused headers includes
Quoted 11 lines · Sean Morrissey
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by
iwyu_tooloutput file$ ./devtools/process_iwyu.py iwyu.out -b buildRemove headers flagged by
iwyu_tooloutput file from sub-directory
Quoted 8 lines
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargsRemove headers directly piped from the
iwyu_tool$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b buildSigned-off-by Sean Morrissey <[email protected]>Signed-off-by Conor Fogarty <[email protected]>---
Some more comments inline.
When those are addresses you can add my reviewed-by.
Thanks,
/Bruce
Quoted 18 lines
devtools/process_iwyu.py | 114 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 devtools/process_iwyu.pydevtools/process_iwyu.py new file +8
-0@@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys
devtools/process_iwyu.py line 18
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + + +def args_parse(): + "parse arguments and return the argument object back to main" + parser = argparse.ArgumentParser( + description="""This script can be used to remove + includes which are not in use\n""")
While in general lines should be kept under 80 characters to satisfy the flake8 script checks, literal strings are always the exception and should not be split across lines without good reason, or an explicit break in them. Most checkpatch and flake8 tools are aware of this and should not omit a warning if a literal string crosses the line-length boundary.
Also, the "\n" should be unnecessary at the end of the description string.
devtools/process_iwyu.py line 21
Quoted 3 lines
devtools/process_iwyu.py new file +3
-0+ parser.add_argument('-b', '--build_dir', type=str, + help="""The path to the build directory in which + the IWYU tool was used in.""", default="build")
For these items, again don't split the string, but I suggest putting all parameters bar the help text on one line, and the help text on its own on the second line i.e. move the "default" option up a line, and put "help" value all alone on second line.
Quoted 13 lines
devtools/process_iwyu.py new file +13
-0+ parser.add_argument('-d', '--sub_dir', type=str, + help='The sub-directory to remove headers from.', + default="") + parser.add_argument('file', type=Path, + help="""The path to the IWYU log file or output + from stdin.""") + + return parser.parse_args() + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process_iwyu.log', 'a') as sys.stdout:
devtools/process_iwyu.py line 44
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+ ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filename, include, build_dir): + "Attempts to remove include, if it fails then revert to original state" + filepath = filename + + with open(filepath, 'r+') as f:
Not sure you need a mode here at all, since you are just reading the file. "open(filepath) as f:" should work fine.
devtools/process_iwyu.py line 49
Quoted 5 lines
devtools/process_iwyu.py new file +5
-0+ lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if ln.strip() != include:
I'd just point out that this will fail to remove any includes which have a comment after them. Probably "startswith" is best used here instead of a straight comparison: "if not ln.startswith(include)"
devtools/process_iwyu.py line 61
Quoted 12 lines
devtools/process_iwyu.py new file +12
-0+ f.write(ln) + + # run test build -> call meson on the build folder, meson compile -C build + ret = run_meson(['compile', '-C', build_dir]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED')
Minor nit, I'd suggest dedenting (or de-indenting) the print one level, so that it's not part of the "with" clause, but part of the "else".
[If you want to remove the else entirely, you can put a "return" after the print success.]
Quoted 23 lines
devtools/process_iwyu.py new file +23
-0+ + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + "process the iwyu output on a set of files" + filename = None + build_dir = abspath(args.build_dir) + directory = args.sub_dir + + keep_str_fns = uses_libbsd(build_dir) # check for libbsd + if keep_str_fns: + print("""Warning: libbsd is present, build will fail to detect + incorrect removal of rte_string_fns.h""", file=sys.stderr)
devtools/process_iwyu.py line 94
Quoted 10 lines
devtools/process_iwyu.py new file +10
-0+ # turn on werror + run_meson(['configure', build_dir, '-Dwerror=true']) + # Use stdin if no iwyu_tool out file given + for line in fileinput.input(args.file): + if 'should remove' in line: + # If the file path in the iwyu_tool output is + # an absolute path it means the file is outside + # of the dpdk directory, therefore ignore it. + # Also check to see if the file is within the + # specified sub directory.
You don't need to word-wrap the comment above quite so aggressively. Having lines a little longer would make it visually shorter and no harder to read.
devtools/process_iwyu.py line 97
Quoted 3 lines
devtools/process_iwyu.py new file +3
-0+ if (line.split()[0] != abspath(line.split()[0]) and + directory in line.split()[0]): + filename = relpath(join(build_dir, line.split()[0]))
The python interpreter is going to split that line a lot of times! Use of a temporary variable would be justified I think.
Quoted 20 lines
devtools/process_iwyu.py new file +17
-0+ elif line.startswith('-') and filename: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filename} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filename, include, build_dir) + else: + filename = None + + +def main(): + process(args_parse()) + + +if __name__ == '__main__': + main()Signature · 1 line
2.25.1
PATCH v2 2/5 lib/telemetry: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 2 files changed, 2 deletions(-)
lib/telemetry/telemetry.c +0 -1
@@ -8,7 +8,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> -#include <dlfcn.h> #endif /* !RTE_EXEC_ENV_WINDOWS */ /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
lib/telemetry/telemetry_data.h +0 -1
@@ -5,7 +5,6 @@#ifndef _TELEMETRY_DATA_H_#define _TELEMETRY_DATA_H_ -#include <inttypes.h> #include "rte_telemetry.h" enum tel_container_types {
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 2/5] lib/telemetry: remove unneeded header includes
Hi Sean,
Quoted 7 lines
-----Original Message-----
From: Morrissey, Sean <[email protected]>
Sent: Wednesday 6 October 2021 12:13
To: Power, Ciara <[email protected]>
Cc: [email protected]; Morrissey, Sean <[email protected]>
Subject: [PATCH v2 2/5] lib/telemetry: remove unneeded header includes
Quoted 7 lines
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>---
lib/telemetry/telemetry.c| 1 -lib/telemetry/telemetry_data.h| 1 -2 files changed, 2 deletions(-)
<snip>
Thanks for cleaning these up,
PATCH v2 3/5 lib/ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 7 ------- 1 file changed, 7 deletions(-)
lib/ring/rte_ring.c +0 -7
@@ -17,16 +17,9 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_spinlock.h>
Signature · 1 line
2.25.1
PATCH v2 4/5 lib/kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)
lib/kvargs/rte_kvargs.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
PATCH v2 5/5 lib/eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 7 +------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 6 ------ lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 8 -------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 -------- lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 2 insertions(+), 203 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
@@ -5,20 +5,15 @@#include <stdio.h> #include <string.h> -#include <inttypes.h> #include <sys/queue.h> -#include <rte_compat.h> #include <rte_bus.h> #include <rte_class.h> #include <rte_dev.h> #include <rte_devargs.h> -#include <rte_debug.h> #include <rte_errno.h> -#include <rte_kvargs.h> #include <rte_log.h> #include <rte_spinlock.h> -#include <rte_malloc.h> #include <rte_string_fns.h> #include "eal_private.h"
lib/eal/common/eal_common_devargs.c +0 -1
@@ -12,7 +12,6 @@#include <rte_bus.h> #include <rte_class.h> -#include <rte_compat.h> #include <rte_dev.h> #include <rte_devargs.h> #include <rte_errno.h>
lib/eal/common/eal_common_errno.c +0 -4
@@ -5,15 +5,11 @@/* Use XSI-compliant portable version of strerror_r() */ #undef _GNU_SOURCE -#include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_per_lcore.h> #include <rte_errno.h> -#include <rte_string_fns.h> #ifdef RTE_EXEC_ENV_WINDOWS #define strerror_r (errnum, buf, buflen) strerror_s(buf, buflen, errnum)
lib/eal/common/eal_common_fbarray.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2017-2018 Intel Corporation */ -#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h>
@@ -14,9 +13,7 @@#include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include "eal_filesystem.h" #include "eal_private.h"
lib/eal/common/eal_common_hexdump.c +0 -3
@@ -1,10 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> -#include <errno.h> -#include <stdint.h> #include <rte_hexdump.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_launch.c +0 -6
@@ -3,16 +3,10 @@*/ #include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/queue.h> #include <rte_launch.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_atomic.h> #include <rte_pause.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include "eal_private.h"
lib/eal/common/eal_common_lcore.c +1 -6
@@ -2,19 +2,14 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <unistd.h> -#include <limits.h> #include <string.h> #include <rte_common.h> -#include <rte_debug.h> -#include <rte_eal.h> +#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_rwlock.h> -#include "eal_memcfg.h" #include "eal_private.h" #include "eal_thread.h"
lib/eal/common/eal_common_log.c +0 -2
@@ -11,9 +11,7 @@#include <regex.h> #include <fnmatch.h> -#include <rte_eal.h> #include <rte_log.h> -#include <rte_os_shim.h> #include <rte_per_lcore.h> #include "eal_log.h"
lib/eal/common/eal_common_memalloc.c +0 -3
@@ -5,12 +5,9 @@#include <string.h> #include <rte_errno.h> -#include <rte_lcore.h> #include <rte_fbarray.h> -#include <rte_memzone.h> #include <rte_memory.h> #include <rte_string_fns.h> -#include <rte_rwlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/eal_common_memory.c +0 -5
@@ -2,16 +2,11 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdint.h> -#include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> #include <rte_fbarray.h> #include <rte_memory.h>
lib/eal/common/eal_common_memzone.c +0 -4
@@ -2,20 +2,16 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> #include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/eal/common/eal_common_options.c +0 -2
@@ -4,7 +4,6 @@*/ #include <stdlib.h> -#include <unistd.h> #include <string.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <syslog.h>
@@ -17,7 +16,6 @@#include <dlfcn.h> #include <libgen.h> #endif -#include <sys/types.h> #include <sys/stat.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dirent.h>
lib/eal/common/eal_common_proc.c +0 -2
@@ -15,7 +15,6 @@#include <string.h> #include <sys/file.h> #include <sys/time.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h>
@@ -27,7 +26,6 @@#include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_tailq.h> #include "eal_memcfg.h" #include "eal_private.h"
lib/eal/common/eal_common_string_fns.c +0 -2
@@ -2,9 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_tailqs.c +0 -11
@@ -3,24 +3,13 @@*/ #include <sys/queue.h> -#include <stdint.h> -#include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> -#include <inttypes.h> -#include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_log.h> #include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_memcfg.h"
lib/eal/common/eal_common_thread.c +0 -3
@@ -4,10 +4,7 @@#include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <unistd.h> #include <pthread.h> -#include <signal.h> #include <sched.h> #include <assert.h> #include <string.h>
lib/eal/common/eal_common_timer.c +0 -6
@@ -2,16 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/types.h> -#include <time.h> -#include <errno.h> #include <rte_common.h> -#include <rte_compat.h> #include <rte_log.h> #include <rte_cycles.h> #include <rte_pause.h>
lib/eal/common/eal_common_trace.c +0 -1
@@ -3,7 +3,6 @@*/ #include <fnmatch.h> -#include <inttypes.h> #include <sys/queue.h> #include <regex.h>
lib/eal/common/hotplug_mp.h +0 -1
@@ -6,7 +6,6 @@#define _HOTPLUG_MP_H_#include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request"#define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response"
lib/eal/common/malloc_elem.c +0 -6
@@ -6,17 +6,11 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> #include <rte_common.h> -#include <rte_spinlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/malloc_heap.c +0 -5
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdlib.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <sys/queue.h>
@@ -13,15 +12,11 @@#include <rte_errno.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> #include <rte_string_fns.h> #include <rte_spinlock.h> -#include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_atomic.h> #include <rte_fbarray.h> #include "eal_internal_cfg.h"
lib/eal/common/malloc_mp.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <sys/time.h> -#include <rte_alarm.h> #include <rte_errno.h> #include <rte_string_fns.h>
lib/eal/common/malloc_mp.h +0 -2
@@ -10,8 +10,6 @@#include <rte_common.h> #include <rte_random.h> -#include <rte_spinlock.h> -#include <rte_tailq.h> /* forward declarations */ struct malloc_heap ;
lib/eal/common/rte_malloc.c +0 -6
@@ -6,18 +6,12 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> #include <rte_errno.h> #include <rte_memcpy.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_branch_prediction.h> -#include <rte_debug.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_common.h> #include <rte_spinlock.h>
lib/eal/common/rte_random.c +0 -3
@@ -5,14 +5,11 @@#ifdef __RDSEED__#include <x86intrin.h> #endif -#include <stdlib.h> #include <unistd.h> #include <rte_branch_prediction.h> #include <rte_cycles.h> -#include <rte_eal.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_random.h> struct rte_rand_state {
lib/eal/common/rte_service.c +0 -6
@@ -3,22 +3,16 @@*/ #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <limits.h> #include <string.h> -#include <rte_compat.h> #include <rte_service.h> #include <rte_service_component.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_debug.h> #include <rte_cycles.h> #include <rte_atomic.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/include/rte_version.h +0 -2
@@ -14,10 +14,8 @@extern "C" {#endif -#include <stdint.h> #include <string.h> #include <stdio.h> -#include <rte_common.h> #include <rte_compat.h> /**
lib/eal/linux/eal.c +0 -10
@@ -7,10 +7,8 @@#include <stdlib.h> #include <stdint.h> #include <string.h> -#include <stdarg.h> #include <unistd.h> #include <pthread.h> -#include <syslog.h> #include <getopt.h> #include <sys/file.h> #include <dirent.h>
@@ -20,32 +18,24 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #if defined(RTE_ARCH_X86 )#include <sys/io.h> #endif #include <linux/version.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_debug.h> #include <rte_memory.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_errno.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_service_component.h> #include <rte_log.h> -#include <rte_random.h> -#include <rte_cycles.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> -#include <rte_interrupts.h> #include <rte_bus.h> -#include <rte_dev.h> -#include <rte_devargs.h> #include <rte_version.h> #include <malloc_heap.h> #include <rte_vfio.h>
lib/eal/linux/eal_alarm.c +0 -7
@@ -3,21 +3,14 @@*/ #include <stdio.h> #include <stdint.h> -#include <signal.h> #include <errno.h> -#include <string.h> #include <sys/queue.h> #include <sys/time.h> #include <sys/timerfd.h> -#include <rte_memory.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_common.h> -#include <rte_per_lcore.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_cpuflags.c +0 -2
@@ -5,8 +5,6 @@#include <elf.h> #include <fcntl.h> #include <string.h> -#include <sys/stat.h> -#include <sys/types.h> #include <unistd.h> #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
lib/eal/linux/eal_debug.c +0 -5
@@ -5,16 +5,11 @@#ifdef RTE_BACKTRACE #include <execinfo.h> #endif -#include <stdarg.h> -#include <signal.h> #include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_common.h> -#include <rte_eal.h> #define BACKTRACE_SIZE 256
lib/eal/linux/eal_dev.c +0 -4
@@ -4,20 +4,16 @@#include <string.h> #include <unistd.h> -#include <fcntl.h> #include <signal.h> #include <sys/socket.h> #include <linux/netlink.h> #include <rte_string_fns.h> #include <rte_log.h> -#include <rte_compat.h> #include <rte_dev.h> -#include <rte_malloc.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_bus.h> -#include <rte_eal.h> #include <rte_spinlock.h> #include <rte_errno.h>
lib/eal/linux/eal_hugepage_info.c +0 -8
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <sys/types.h> #include <sys/file.h> #include <dirent.h> #include <fcntl.h>
@@ -12,19 +11,12 @@#include <stdio.h> #include <fnmatch.h> #include <inttypes.h> -#include <stdarg.h> #include <unistd.h> #include <errno.h> #include <sys/mman.h> -#include <sys/queue.h> -#include <sys/stat.h> #include <linux/mman.h> /* for hugetlb-related flags */ -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_debug.h> #include <rte_log.h>
lib/eal/linux/eal_interrupts.c +0 -8
@@ -7,13 +7,10 @@#include <stdlib.h> #include <pthread.h> #include <sys/queue.h> -#include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include <inttypes.h> #include <sys/epoll.h> -#include <sys/signalfd.h> #include <sys/ioctl.h> #include <sys/eventfd.h> #include <assert.h>
@@ -21,9 +18,6 @@#include <rte_common.h> #include <rte_interrupts.h> -#include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_branch_prediction.h>
@@ -36,8 +30,6 @@#include <rte_eal_trace.h> #include "eal_private.h" -#include "eal_vfio.h" -#include "eal_thread.h" #define EAL_INTR_EPOLL_WAIT_FOREVER (-1)#define NB_OTHER_INTR 1
lib/eal/linux/eal_lcore.c +0 -7
@@ -4,15 +4,8 @@#include <unistd.h> #include <limits.h> -#include <string.h> -#include <dirent.h> #include <rte_log.h> -#include <rte_eal.h> -#include <rte_lcore.h> -#include <rte_common.h> -#include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_filesystem.h"
lib/eal/linux/eal_log.c +1 -10
@@ -2,19 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdint.h> #include <sys/types.h> #include <syslog.h> -#include <sys/queue.h> - -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_spinlock.h> +#include <rte_log.h> #include "eal_log.h"
lib/eal/linux/eal_memalloc.c +0 -8
@@ -3,23 +3,17 @@*/ #include <errno.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <unistd.h> #include <limits.h> #include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
@@ -36,9 +30,7 @@#include <rte_common.h> #include <rte_log.h> #include <rte_eal.h> -#include <rte_errno.h> #include <rte_memory.h> -#include <rte_spinlock.h> #include "eal_filesystem.h" #include "eal_internal_cfg.h"
lib/eal/linux/eal_memory.c +0 -9
@@ -5,7 +5,6 @@#include <errno.h> #include <fcntl.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h>
@@ -13,19 +12,14 @@#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <sys/resource.h> #include <unistd.h> #include <limits.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ -#include <linux/memfd.h> #define MEMFD_SUPPORTED #endif #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
@@ -36,12 +30,9 @@#include <rte_errno.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_string_fns.h> #include "eal_private.h" #include "eal_memalloc.h"
lib/eal/linux/eal_thread.c +0 -5
@@ -4,20 +4,15 @@#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <pthread.h> -#include <sched.h> -#include <sys/queue.h> #include <sys/syscall.h> #include <rte_debug.h> #include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> -#include <rte_memory.h> -#include <rte_per_lcore.h> #include <rte_eal.h> #include <rte_lcore.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_timer.c +0 -15
@@ -3,28 +3,13 @@* Copyright(c) 2012-2013 6WIND S.A. */ -#include <string.h> -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <unistd.h> -#include <fcntl.h> -#include <inttypes.h> -#include <sys/mman.h> -#include <sys/queue.h> -#include <pthread.h> -#include <errno.h> #include <rte_common.h> -#include <rte_log.h> #include <rte_cycles.h> -#include <rte_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_debug.h> #include "eal_private.h" -#include "eal_internal_cfg.h" enum timer_source eal_timer_source =EAL_TIMER_HPET ;
lib/eal/linux/eal_vfio_mp_sync.c +0 -1
@@ -5,7 +5,6 @@#include <unistd.h> #include <string.h> -#include <rte_compat.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_vfio.h>
lib/eal/unix/eal_file.c +0 -1
@@ -3,7 +3,6 @@*/ #include <sys/file.h> -#include <sys/mman.h> #include <fcntl.h> #include <unistd.h>
lib/eal/unix/rte_thread.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_thread.h>
lib/eal/x86/rte_cycles.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <cpuid.h> -#include <rte_common.h> #include "eal_private.h"
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 5/5] lib/eal: remove unneeded header includes
Quoted 46 lines · Sean Morrissey
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>Reviewed-by Harry van Haaren <[email protected]>Reviewed-by Mattias Rönnblom <[email protected]>--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 7 +------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 6 ------ lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 8 -------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 --------
Quoted 9 lines
lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 2 insertions(+), 203 deletions(-)
v3 cover introduce IWYU
In reply to Sean MorrisseyThis patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
Sean Morrissey (5):
devtools: script to remove unused headers includes lib/telemetry: remove unneeded header includes lib/ring: remove unneeded header includes lib/kvargs: remove unneeded header includes lib/eal: remove unneeded header includes
devtools/process_iwyu.py | 109 +++++++++++++++++++++++++ lib/eal/common/eal_common_dev.c | 5 -- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 7 +- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 -- lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 --- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 -- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 6 -- lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 --- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 -- lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 8 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +-- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 5 -- lib/eal/linux/eal_timer.c | 15 ---- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/kvargs/rte_kvargs.c | 1 - lib/ring/rte_ring.c | 7 -- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 49 files changed, 111 insertions(+), 213 deletions(-) create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
PATCH v3 1/5 devtools: script to remove unused headers includes
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
--- devtools/process_iwyu.py | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 devtools/process_iwyu.py
devtools/process_iwyu.py new file +109 -0
@@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys +from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + + +def args_parse(): + "parse arguments and return the argument object back to main" + parser = argparse.ArgumentParser(description="This script can be used to remove includes which are not in use\n") + parser.add_argument('-b', '--build_dir', type=str, default='build', + help="The path to the build directory in which the IWYU tool was used in.") + parser.add_argument('-d', '--sub_dir', type=str, default='', + help="The sub-directory to remove headers from.") + parser.add_argument('file', type=Path, + help="The path to the IWYU log file or output from stdin.") + + return parser.parse_args() + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process_iwyu.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filepath, include, build_dir): + "Attempts to remove include, if it fails then revert to original state" + with open(filepath) as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if not ln.startswith(include): + f.write(ln) + + # run test build -> call meson on the build folder, meson compile -C build + ret = run_meson(['compile', '-C', build_dir]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + "process the iwyu output on a set of files" + filepath = None + build_dir = abspath(args.build_dir) + directory = args.sub_dir + + print("Warning: The results of this script may include false positives which are required for different systems", + file=sys.stderr) + + keep_str_fns = uses_libbsd(build_dir) # check for libbsd + if keep_str_fns: + print("Warning: libbsd is present, build will fail to detect incorrect removal of rte_string_fns.h", + file=sys.stderr) + # turn on werror + run_meson(['configure', build_dir, '-Dwerror=true']) + # Use stdin if no iwyu_tool out file given + for line in fileinput.input(args.file): + if 'should remove' in line: + # If the file path in the iwyu_tool output is an absolute path it + # means the file is outside of the dpdk directory, therefore ignore it. + # Also check to see if the file is within the specified sub directory. + filename = line.split()[0] + if (filename != abspath(filename) and + directory in filename): + filepath = relpath(join(build_dir, filename)) + elif line.startswith('-') and filepath: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filepath} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filepath, include, build_dir) + else: + filepath = None + + +def main(): + process(args_parse()) + + +if __name__ == '__main__': + main()
Signature · 1 line
2.25.1
PATCH v3 2/5 lib/telemetry: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 2 files changed, 2 deletions(-)
lib/telemetry/telemetry.c +0 -1
@@ -8,7 +8,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> -#include <dlfcn.h> #endif /* !RTE_EXEC_ENV_WINDOWS */ /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
lib/telemetry/telemetry_data.h +0 -1
@@ -5,7 +5,6 @@#ifndef _TELEMETRY_DATA_H_#define _TELEMETRY_DATA_H_ -#include <inttypes.h> #include "rte_telemetry.h" enum tel_container_types {
Signature · 1 line
2.25.1
PATCH v3 3/5 lib/ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 7 ------- 1 file changed, 7 deletions(-)
lib/ring/rte_ring.c +0 -7
@@ -17,16 +17,9 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_spinlock.h>
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v3 3/5] lib/ring: remove unneeded header includes
Quoted 21 lines
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/ring/rte_ring.c | 7 ------- 1 file changed, 7 deletions(-)lib/ring/rte_ring.c +0
-2@@ -17,16 +17,9 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h>
lib/ring/rte_ring.c
Quoted 10 lines
lib/ring/rte_ring.c +0
-6-#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_spinlock.h> --
Quoted 1 line
2.25.1
PATCH v3 4/5 lib/kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)
lib/kvargs/rte_kvargs.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v3 4/5] lib/kvargs: remove unneeded header includes
Hi Sean,
Quoted 23 lines · Sean Morrissey
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)lib/kvargs/rte_kvargs.c +0
-1@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h" Signature · 1 line
2.25.1
Did you check that it still compiles for the Windows platform after this change?
+CC Dmitry
Re: [dpdk-dev] [PATCH v3 4/5] lib/kvargs: remove unneeded header includes
Quoted 22 lines · Olivier Matz
Hi Sean,
Quoted 19 lines · Sean Morrissey
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)lib/kvargs/rte_kvargs.c +0
-1@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h>
Quoted 8 lines
Quoted 4 lines
lib/kvargs/rte_kvargs.c +0
-0#include "rte_kvargs.h" Signature · 1 line
2.25.1Did you check that it still compiles for the Windows platform after this change?
+CC Dmitry
Hi Olivier,
I cross-compiled with MinGW-64 after this change and it still compiled.
Thanks,
Sean.
Re: [dpdk-dev] [PATCH v3 4/5] lib/kvargs: remove unneeded header includes
Quoted 29 lines · Sean
Quoted 27 lines · Olivier Matz
Hi Sean,
Quoted 21 lines · Sean Morrissey
These header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)lib/kvargs/rte_kvargs.c +0
-1@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h" Signature · 1 line
2.25.1Did you check that it still compiles for the Windows platform after this change?
Quoted 5 lines
Quoted 1 line
+CC Dmitry
Hi Olivier,
I cross-compiled with MinGW-64 after this change and it still compiled.
Thanks.
However I see that strdup() is used in rte_kvargs.c, and it is defined in lib/eal/windows/include/rte_os_shim.h. So at first glance, it seems a better option to keep the include as it is.
I don't know if strdup() is defined somewhere else on windows, or if rte_os_shim.h is included by another header. Better have an opinion from a windows maintainer if we want to remove this include.
PATCH v3 5/5 lib/eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 7 +------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 6 ------ lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 8 -------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 -------- lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 2 insertions(+), 203 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
@@ -5,20 +5,15 @@#include <stdio.h> #include <string.h> -#include <inttypes.h> #include <sys/queue.h> -#include <rte_compat.h> #include <rte_bus.h> #include <rte_class.h> #include <rte_dev.h> #include <rte_devargs.h> -#include <rte_debug.h> #include <rte_errno.h> -#include <rte_kvargs.h> #include <rte_log.h> #include <rte_spinlock.h> -#include <rte_malloc.h> #include <rte_string_fns.h> #include "eal_private.h"
lib/eal/common/eal_common_devargs.c +0 -1
@@ -12,7 +12,6 @@#include <rte_bus.h> #include <rte_class.h> -#include <rte_compat.h> #include <rte_dev.h> #include <rte_devargs.h> #include <rte_errno.h>
lib/eal/common/eal_common_errno.c +0 -4
@@ -5,15 +5,11 @@/* Use XSI-compliant portable version of strerror_r() */ #undef _GNU_SOURCE -#include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_per_lcore.h> #include <rte_errno.h> -#include <rte_string_fns.h> #ifdef RTE_EXEC_ENV_WINDOWS #define strerror_r (errnum, buf, buflen) strerror_s(buf, buflen, errnum)
lib/eal/common/eal_common_fbarray.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2017-2018 Intel Corporation */ -#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h>
@@ -14,9 +13,7 @@#include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include "eal_filesystem.h" #include "eal_private.h"
lib/eal/common/eal_common_hexdump.c +0 -3
@@ -1,10 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> -#include <errno.h> -#include <stdint.h> #include <rte_hexdump.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_launch.c +0 -6
@@ -3,16 +3,10 @@*/ #include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/queue.h> #include <rte_launch.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_atomic.h> #include <rte_pause.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include "eal_private.h"
lib/eal/common/eal_common_lcore.c +1 -6
@@ -2,19 +2,14 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <unistd.h> -#include <limits.h> #include <string.h> #include <rte_common.h> -#include <rte_debug.h> -#include <rte_eal.h> +#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_rwlock.h> -#include "eal_memcfg.h" #include "eal_private.h" #include "eal_thread.h"
lib/eal/common/eal_common_log.c +0 -2
@@ -11,9 +11,7 @@#include <regex.h> #include <fnmatch.h> -#include <rte_eal.h> #include <rte_log.h> -#include <rte_os_shim.h> #include <rte_per_lcore.h> #include "eal_log.h"
lib/eal/common/eal_common_memalloc.c +0 -3
@@ -5,12 +5,9 @@#include <string.h> #include <rte_errno.h> -#include <rte_lcore.h> #include <rte_fbarray.h> -#include <rte_memzone.h> #include <rte_memory.h> #include <rte_string_fns.h> -#include <rte_rwlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/eal_common_memory.c +0 -5
@@ -2,16 +2,11 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdint.h> -#include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> #include <rte_fbarray.h> #include <rte_memory.h>
lib/eal/common/eal_common_memzone.c +0 -4
@@ -2,20 +2,16 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> #include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/eal/common/eal_common_options.c +0 -2
@@ -4,7 +4,6 @@*/ #include <stdlib.h> -#include <unistd.h> #include <string.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <syslog.h>
@@ -17,7 +16,6 @@#include <dlfcn.h> #include <libgen.h> #endif -#include <sys/types.h> #include <sys/stat.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dirent.h>
lib/eal/common/eal_common_proc.c +0 -2
@@ -15,7 +15,6 @@#include <string.h> #include <sys/file.h> #include <sys/time.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h>
@@ -27,7 +26,6 @@#include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_tailq.h> #include "eal_memcfg.h" #include "eal_private.h"
lib/eal/common/eal_common_string_fns.c +0 -2
@@ -2,9 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_tailqs.c +0 -11
@@ -3,24 +3,13 @@*/ #include <sys/queue.h> -#include <stdint.h> -#include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> -#include <inttypes.h> -#include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_log.h> #include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_memcfg.h"
lib/eal/common/eal_common_thread.c +0 -3
@@ -4,10 +4,7 @@#include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <unistd.h> #include <pthread.h> -#include <signal.h> #include <sched.h> #include <assert.h> #include <string.h>
lib/eal/common/eal_common_timer.c +0 -6
@@ -2,16 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/types.h> -#include <time.h> -#include <errno.h> #include <rte_common.h> -#include <rte_compat.h> #include <rte_log.h> #include <rte_cycles.h> #include <rte_pause.h>
lib/eal/common/eal_common_trace.c +0 -1
@@ -3,7 +3,6 @@*/ #include <fnmatch.h> -#include <inttypes.h> #include <sys/queue.h> #include <regex.h>
lib/eal/common/hotplug_mp.h +0 -1
@@ -6,7 +6,6 @@#define _HOTPLUG_MP_H_#include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request"#define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response"
lib/eal/common/malloc_elem.c +0 -6
@@ -6,17 +6,11 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> #include <rte_common.h> -#include <rte_spinlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/malloc_heap.c +0 -5
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdlib.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <sys/queue.h>
@@ -13,15 +12,11 @@#include <rte_errno.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> #include <rte_string_fns.h> #include <rte_spinlock.h> -#include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_atomic.h> #include <rte_fbarray.h> #include "eal_internal_cfg.h"
lib/eal/common/malloc_mp.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <sys/time.h> -#include <rte_alarm.h> #include <rte_errno.h> #include <rte_string_fns.h>
lib/eal/common/malloc_mp.h +0 -2
@@ -10,8 +10,6 @@#include <rte_common.h> #include <rte_random.h> -#include <rte_spinlock.h> -#include <rte_tailq.h> /* forward declarations */ struct malloc_heap ;
lib/eal/common/rte_malloc.c +0 -6
@@ -6,18 +6,12 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <sys/queue.h> #include <rte_errno.h> #include <rte_memcpy.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_branch_prediction.h> -#include <rte_debug.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_common.h> #include <rte_spinlock.h>
lib/eal/common/rte_random.c +0 -3
@@ -5,14 +5,11 @@#ifdef __RDSEED__#include <x86intrin.h> #endif -#include <stdlib.h> #include <unistd.h> #include <rte_branch_prediction.h> #include <rte_cycles.h> -#include <rte_eal.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_random.h> struct rte_rand_state {
lib/eal/common/rte_service.c +0 -6
@@ -3,22 +3,16 @@*/ #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <limits.h> #include <string.h> -#include <rte_compat.h> #include <rte_service.h> #include <rte_service_component.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_debug.h> #include <rte_cycles.h> #include <rte_atomic.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/include/rte_version.h +0 -2
@@ -14,10 +14,8 @@extern "C" {#endif -#include <stdint.h> #include <string.h> #include <stdio.h> -#include <rte_common.h> #include <rte_compat.h> /**
lib/eal/linux/eal.c +0 -10
@@ -7,10 +7,8 @@#include <stdlib.h> #include <stdint.h> #include <string.h> -#include <stdarg.h> #include <unistd.h> #include <pthread.h> -#include <syslog.h> #include <getopt.h> #include <sys/file.h> #include <dirent.h>
@@ -20,32 +18,24 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #if defined(RTE_ARCH_X86 )#include <sys/io.h> #endif #include <linux/version.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_debug.h> #include <rte_memory.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_errno.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_service_component.h> #include <rte_log.h> -#include <rte_random.h> -#include <rte_cycles.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> -#include <rte_interrupts.h> #include <rte_bus.h> -#include <rte_dev.h> -#include <rte_devargs.h> #include <rte_version.h> #include <malloc_heap.h> #include <rte_vfio.h>
lib/eal/linux/eal_alarm.c +0 -7
@@ -3,21 +3,14 @@*/ #include <stdio.h> #include <stdint.h> -#include <signal.h> #include <errno.h> -#include <string.h> #include <sys/queue.h> #include <sys/time.h> #include <sys/timerfd.h> -#include <rte_memory.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_common.h> -#include <rte_per_lcore.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_cpuflags.c +0 -2
@@ -5,8 +5,6 @@#include <elf.h> #include <fcntl.h> #include <string.h> -#include <sys/stat.h> -#include <sys/types.h> #include <unistd.h> #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
lib/eal/linux/eal_debug.c +0 -5
@@ -5,16 +5,11 @@#ifdef RTE_BACKTRACE #include <execinfo.h> #endif -#include <stdarg.h> -#include <signal.h> #include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_common.h> -#include <rte_eal.h> #define BACKTRACE_SIZE 256
lib/eal/linux/eal_dev.c +0 -4
@@ -4,20 +4,16 @@#include <string.h> #include <unistd.h> -#include <fcntl.h> #include <signal.h> #include <sys/socket.h> #include <linux/netlink.h> #include <rte_string_fns.h> #include <rte_log.h> -#include <rte_compat.h> #include <rte_dev.h> -#include <rte_malloc.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_bus.h> -#include <rte_eal.h> #include <rte_spinlock.h> #include <rte_errno.h>
lib/eal/linux/eal_hugepage_info.c +0 -8
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <sys/types.h> #include <sys/file.h> #include <dirent.h> #include <fcntl.h>
@@ -12,19 +11,12 @@#include <stdio.h> #include <fnmatch.h> #include <inttypes.h> -#include <stdarg.h> #include <unistd.h> #include <errno.h> #include <sys/mman.h> -#include <sys/queue.h> -#include <sys/stat.h> #include <linux/mman.h> /* for hugetlb-related flags */ -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_debug.h> #include <rte_log.h>
lib/eal/linux/eal_interrupts.c +0 -8
@@ -7,13 +7,10 @@#include <stdlib.h> #include <pthread.h> #include <sys/queue.h> -#include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include <inttypes.h> #include <sys/epoll.h> -#include <sys/signalfd.h> #include <sys/ioctl.h> #include <sys/eventfd.h> #include <assert.h>
@@ -21,9 +18,6 @@#include <rte_common.h> #include <rte_interrupts.h> -#include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_branch_prediction.h>
@@ -36,8 +30,6 @@#include <rte_eal_trace.h> #include "eal_private.h" -#include "eal_vfio.h" -#include "eal_thread.h" #define EAL_INTR_EPOLL_WAIT_FOREVER (-1)#define NB_OTHER_INTR 1
lib/eal/linux/eal_lcore.c +0 -7
@@ -4,15 +4,8 @@#include <unistd.h> #include <limits.h> -#include <string.h> -#include <dirent.h> #include <rte_log.h> -#include <rte_eal.h> -#include <rte_lcore.h> -#include <rte_common.h> -#include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_filesystem.h"
lib/eal/linux/eal_log.c +1 -10
@@ -2,19 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdint.h> #include <sys/types.h> #include <syslog.h> -#include <sys/queue.h> - -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_spinlock.h> +#include <rte_log.h> #include "eal_log.h"
lib/eal/linux/eal_memalloc.c +0 -8
@@ -3,23 +3,17 @@*/ #include <errno.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <unistd.h> #include <limits.h> #include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
@@ -36,9 +30,7 @@#include <rte_common.h> #include <rte_log.h> #include <rte_eal.h> -#include <rte_errno.h> #include <rte_memory.h> -#include <rte_spinlock.h> #include "eal_filesystem.h" #include "eal_internal_cfg.h"
lib/eal/linux/eal_memory.c +0 -9
@@ -5,7 +5,6 @@#include <errno.h> #include <fcntl.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h>
@@ -13,19 +12,14 @@#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <sys/resource.h> #include <unistd.h> #include <limits.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ -#include <linux/memfd.h> #define MEMFD_SUPPORTED #endif #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
@@ -36,12 +30,9 @@#include <rte_errno.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_string_fns.h> #include "eal_private.h" #include "eal_memalloc.h"
lib/eal/linux/eal_thread.c +0 -5
@@ -4,20 +4,15 @@#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <pthread.h> -#include <sched.h> -#include <sys/queue.h> #include <sys/syscall.h> #include <rte_debug.h> #include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> -#include <rte_memory.h> -#include <rte_per_lcore.h> #include <rte_eal.h> #include <rte_lcore.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_timer.c +0 -15
@@ -3,28 +3,13 @@* Copyright(c) 2012-2013 6WIND S.A. */ -#include <string.h> -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <unistd.h> -#include <fcntl.h> -#include <inttypes.h> -#include <sys/mman.h> -#include <sys/queue.h> -#include <pthread.h> -#include <errno.h> #include <rte_common.h> -#include <rte_log.h> #include <rte_cycles.h> -#include <rte_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_debug.h> #include "eal_private.h" -#include "eal_internal_cfg.h" enum timer_source eal_timer_source =EAL_TIMER_HPET ;
lib/eal/linux/eal_vfio_mp_sync.c +0 -1
@@ -5,7 +5,6 @@#include <unistd.h> #include <string.h> -#include <rte_compat.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_vfio.h>
lib/eal/unix/eal_file.c +0 -1
@@ -3,7 +3,6 @@*/ #include <sys/file.h> -#include <sys/mman.h> #include <fcntl.h> #include <unistd.h>
lib/eal/unix/rte_thread.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_thread.h>
lib/eal/x86/rte_cycles.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <cpuid.h> -#include <rte_common.h> #include "eal_private.h"
Signature · 1 line
2.25.1
v4 cover introduce IWYU
In reply to Sean MorrisseyThis patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
V4:
* Re-added removed headers that are now needed in order to fix build issues.
* Removed other unused headers from other libraries
Sean Morrissey (53):
devtools: script to remove unused headers includes
telemetry: remove unneeded header includes
ring: remove unneeded header includes
kvargs: remove unneeded header includes
eal: remove unneeded header includes
vhost: remove unneeded header includes
timer: remove unneeded header includes
table: remove unneeded header includes
stack: remove unneeded header includes
security: remove unneeded header includes
sched: remove unneeded header includes
ring: remove unneeded header includes
rib: remove unneeded header includes
reorder: remove unneeded header includes
regexdev: remove unneeded header includes
rcu: remove unneeded header includes
rawdev: remove unneeded header includes
power: remove unneeded header includes
port: remove unneeded header includes
pipeline: remove unneeded header includes
pdump: remove unneeded header includes
pci: remove unneeded header includes
pcapng: remove unneeded header includes
node: remove unneeded header includes
net: remove unneeded header includes
metrics: remove unneeded header includes
mempool: remove unneeded header includes
member: remove unneeded header includes
mbuf: remove unneeded header includes
lpm: remove unneeded header includes
latencystats: remove unneeded header includes
kvargs: remove unneeded header includes
kni: remove unneeded header includes
jobstats: remove unneeded header includes
ipsec: remove unneeded header includes
ip_frag: remove unneeded header includes
hash: remove unneeded header includes
gro: remove unneeded header includes
graph: remove unneeded header includes
gpudev: remove unneeded header includes
flow_classify: remove unneeded header includes
fib: remove unneeded header includes
eventdev: remove unneeded header includes
efd: remove unneeded header includes
eal: remove unneeded header includes
dmadev: remove unneeded header includes
distributor: remove unneeded header includes
compressdev: remove unneeded header includes
cmdline: remove unneeded header includes
bpf: remove unneeded header includes
bbdev: remove unneeded header includes
cryptodev: remove unneeded header includes
acl: remove unneeded header includes
devtools/process_iwyu.py | 109 ++++++++++++++++++++ examples/vm_power_manager/guest_cli/main.c | 1 + lib/acl/rte_acl.c | 1 - lib/bbdev/rte_bbdev.c | 4 - lib/bbdev/rte_bbdev.h | 4 - lib/bpf/bpf.c | 4 - lib/bpf/bpf_exec.c | 6 -- lib/bpf/bpf_jit_x86.c | 5 - lib/bpf/bpf_load.c | 8 -- lib/bpf/bpf_pkt.c | 12 --- lib/bpf/bpf_validate.c | 3 - lib/cmdline/cmdline.c | 2 - lib/cmdline/cmdline_cirbuf.c | 1 - lib/cmdline/cmdline_cirbuf.h | 1 - lib/cmdline/cmdline_parse.c | 3 - lib/cmdline/cmdline_parse_num.c | 4 - lib/cmdline/cmdline_parse_portlist.c | 3 - lib/cmdline/cmdline_parse_string.c | 4 - lib/cmdline/cmdline_rdline.c | 2 - lib/cmdline/cmdline_socket.c | 5 - lib/cmdline/cmdline_socket.h | 1 - lib/cmdline/cmdline_vt100.c | 3 - lib/compressdev/rte_comp.c | 1 - lib/compressdev/rte_comp.h | 1 - lib/compressdev/rte_compressdev.c | 1 - lib/compressdev/rte_compressdev.h | 1 - lib/compressdev/rte_compressdev_pmd.h | 2 - lib/cryptodev/cryptodev_pmd.h | 4 - lib/cryptodev/rte_cryptodev.c | 11 -- lib/cryptodev/rte_cryptodev.h | 2 - lib/distributor/rte_distributor.c | 2 - lib/distributor/rte_distributor_match_sse.c | 2 - lib/distributor/rte_distributor_single.c | 2 - lib/dmadev/rte_dmadev.h | 1 - lib/eal/common/eal_common_dev.c | 5 - lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 7 +- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 - lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 -- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 - lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 5 - lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 -- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 - lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 7 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 6 -- lib/eal/linux/eal_timer.c | 15 --- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/efd/rte_efd.c | 3 - lib/eventdev/rte_event_ring.c | 6 -- lib/eventdev/rte_event_ring.h | 2 - lib/eventdev/rte_event_timer_adapter.c | 5 - lib/eventdev/rte_event_timer_adapter.h | 2 - lib/eventdev/rte_eventdev.c | 11 -- lib/eventdev/rte_eventdev.h | 2 - lib/fib/dir24_8.c | 4 - lib/fib/rte_fib.c | 2 - lib/fib/rte_fib.h | 1 - lib/fib/rte_fib6.c | 2 - lib/fib/rte_fib6.h | 1 - lib/fib/trie.c | 5 - lib/fib/trie.h | 2 - lib/flow_classify/rte_flow_classify.c | 3 - lib/flow_classify/rte_flow_classify.h | 4 - lib/flow_classify/rte_flow_classify_parse.c | 1 - lib/flow_classify/rte_flow_classify_parse.h | 1 - lib/gpudev/gpudev.c | 1 - lib/graph/graph_debug.c | 2 - lib/graph/graph_ops.c | 1 - lib/graph/graph_populate.c | 2 - lib/graph/node.c | 1 - lib/gro/gro_tcp4.c | 1 - lib/gro/gro_tcp4.h | 2 - lib/gro/gro_udp4.c | 1 - lib/gro/gro_udp4.h | 2 - lib/gro/gro_vxlan_tcp4.c | 1 - lib/gro/gro_vxlan_udp4.c | 1 - lib/gro/rte_gro.c | 1 - lib/hash/rte_cuckoo_hash.c | 4 - lib/hash/rte_fbk_hash.c | 6 -- lib/hash/rte_fbk_hash.h | 1 - lib/hash/rte_thash.c | 1 - lib/hash/rte_thash.h | 1 - lib/ip_frag/rte_ip_frag_common.c | 1 - lib/ip_frag/rte_ipv4_fragmentation.c | 2 - lib/ipsec/esp_inb.c | 1 - lib/ipsec/esp_outb.c | 1 - lib/ipsec/ipsec_sad.c | 1 - lib/ipsec/sa.c | 3 - lib/ipsec/sa.h | 1 - lib/jobstats/rte_jobstats.c | 3 - lib/kni/rte_kni.c | 2 - lib/kni/rte_kni.h | 2 - lib/kvargs/rte_kvargs.c | 2 - lib/latencystats/rte_latencystats.c | 4 - lib/lpm/rte_lpm.c | 7 -- lib/lpm/rte_lpm.h | 4 - lib/lpm/rte_lpm6.c | 7 -- lib/lpm/rte_lpm6.h | 1 - lib/mbuf/rte_mbuf.c | 11 -- lib/mbuf/rte_mbuf.h | 2 - lib/mbuf/rte_mbuf_dyn.h | 2 - lib/mbuf/rte_mbuf_pool_ops.c | 1 - lib/mbuf/rte_mbuf_pool_ops.h | 1 - lib/member/rte_member.c | 2 - lib/member/rte_member.h | 1 - lib/member/rte_member_vbf.c | 1 - lib/mempool/rte_mempool.c | 7 -- lib/mempool/rte_mempool.h | 4 - lib/metrics/rte_metrics.c | 3 - lib/net/net_crc_avx512.c | 3 - lib/net/net_crc_sse.c | 1 - lib/net/rte_arp.c | 1 - lib/net/rte_ether.h | 1 - lib/net/rte_net.h | 1 - lib/net/rte_net_crc.c | 2 - lib/node/ethdev_ctrl.c | 2 - lib/node/ethdev_rx.c | 1 - lib/node/ethdev_tx.c | 1 - lib/node/ip4_lookup.c | 5 - lib/node/ip4_rewrite.c | 4 - lib/node/pkt_cls.c | 4 - lib/node/pkt_drop.c | 1 - lib/pcapng/rte_pcapng.c | 1 - lib/pcapng/rte_pcapng.h | 2 - lib/pci/rte_pci.c | 15 +-- lib/pci/rte_pci.h | 2 - lib/pdump/rte_pdump.c | 1 - lib/pdump/rte_pdump.h | 2 - lib/pipeline/rte_pipeline.c | 4 - lib/pipeline/rte_port_in_action.c | 2 - lib/pipeline/rte_swx_ctl.h | 2 - lib/pipeline/rte_swx_pipeline.c | 1 - lib/pipeline/rte_swx_pipeline.h | 1 - lib/pipeline/rte_swx_pipeline_spec.c | 1 - lib/pipeline/rte_table_action.c | 2 - lib/port/rte_port_fd.h | 1 - lib/port/rte_port_frag.c | 2 - lib/port/rte_port_frag.h | 1 - lib/port/rte_port_kni.c | 1 - lib/port/rte_port_kni.h | 1 - lib/port/rte_port_ras.c | 1 - lib/port/rte_port_ras.h | 1 - lib/port/rte_port_ring.h | 1 - lib/port/rte_port_sched.c | 1 - lib/port/rte_port_source_sink.c | 1 - lib/port/rte_swx_port_fd.c | 1 - lib/port/rte_swx_port_fd.h | 1 - lib/port/rte_swx_port_ring.h | 1 - lib/power/guest_channel.c | 2 - lib/power/power_acpi_cpufreq.c | 7 -- lib/power/power_acpi_cpufreq.h | 4 - lib/power/power_common.h | 1 - lib/power/power_cppc_cpufreq.c | 1 - lib/power/power_cppc_cpufreq.h | 4 - lib/power/power_kvm_vm.c | 1 - lib/power/power_kvm_vm.h | 4 - lib/power/power_pstate_cpufreq.c | 7 -- lib/power/power_pstate_cpufreq.h | 4 - lib/power/rte_power.c | 1 - lib/power/rte_power.h | 2 - lib/power/rte_power_empty_poll.c | 2 - lib/rawdev/rte_rawdev.c | 14 --- lib/rcu/rte_rcu_qsbr.c | 4 - lib/rcu/rte_rcu_qsbr.h | 4 - lib/regexdev/rte_regexdev.c | 2 - lib/regexdev/rte_regexdev.h | 3 - lib/reorder/rte_reorder.c | 1 - lib/rib/rte_rib.c | 2 - lib/rib/rte_rib.h | 1 - lib/rib/rte_rib6.c | 2 - lib/rib/rte_rib6.h | 1 - lib/ring/rte_ring.c | 9 -- lib/sched/rte_pie.c | 2 - lib/sched/rte_red.h | 1 - lib/sched/rte_sched.c | 1 - lib/sched/rte_sched.h | 1 - lib/security/rte_security.c | 2 - lib/security/rte_security.h | 3 - lib/stack/rte_stack.c | 2 - lib/stack/rte_stack.h | 1 - lib/table/rte_swx_table_em.c | 1 - lib/table/rte_swx_table_em.h | 1 - lib/table/rte_swx_table_learner.c | 1 - lib/table/rte_swx_table_learner.h | 1 - lib/table/rte_swx_table_selector.c | 1 - lib/table/rte_swx_table_wm.c | 2 - lib/table/rte_swx_table_wm.h | 1 - lib/table/rte_table_acl.c | 3 - lib/table/rte_table_array.c | 2 - lib/table/rte_table_hash_cuckoo.c | 2 - lib/table/rte_table_hash_ext.c | 2 - lib/table/rte_table_hash_key16.c | 2 - lib/table/rte_table_hash_key32.c | 2 - lib/table/rte_table_hash_key8.c | 2 - lib/table/rte_table_hash_lru.c | 2 - lib/table/rte_table_lpm.c | 2 - lib/table/rte_table_lpm_ipv6.c | 3 - lib/table/rte_table_stub.c | 1 - lib/table/rte_table_stub.h | 1 - lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - lib/timer/rte_timer.c | 7 -- lib/vhost/fd_man.c | 6 -- lib/vhost/fd_man.h | 1 - lib/vhost/socket.c | 1 - lib/vhost/vdpa.c | 1 - lib/vhost/vhost.c | 4 - lib/vhost/vhost.h | 6 -- lib/vhost/vhost_user.c | 2 - lib/vhost/vhost_user.h | 1 - 241 files changed, 113 insertions(+), 706 deletions(-) create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
PATCH v4 1/53 devtools: script to remove unused headers includes
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
--- devtools/process_iwyu.py | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 devtools/process_iwyu.py
devtools/process_iwyu.py new file +109 -0
@@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys +from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + + +def args_parse(): + "parse arguments and return the argument object back to main" + parser = argparse.ArgumentParser(description="This script can be used to remove includes which are not in use\n") + parser.add_argument('-b', '--build_dir', type=str, default='build', + help="The path to the build directory in which the IWYU tool was used in.") + parser.add_argument('-d', '--sub_dir', type=str, default='', + help="The sub-directory to remove headers from.") + parser.add_argument('file', type=Path, + help="The path to the IWYU log file or output from stdin.") + + return parser.parse_args() + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process_iwyu.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filepath, include, build_dir): + "Attempts to remove include, if it fails then revert to original state" + with open(filepath) as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if not ln.startswith(include): + f.write(ln) + + # run test build -> call meson on the build folder, meson compile -C build + ret = run_meson(['compile', '-C', build_dir]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + "process the iwyu output on a set of files" + filepath = None + build_dir = abspath(args.build_dir) + directory = args.sub_dir + + print("Warning: The results of this script may include false positives which are required for different systems", + file=sys.stderr) + + keep_str_fns = uses_libbsd(build_dir) # check for libbsd + if keep_str_fns: + print("Warning: libbsd is present, build will fail to detect incorrect removal of rte_string_fns.h", + file=sys.stderr) + # turn on werror + run_meson(['configure', build_dir, '-Dwerror=true']) + # Use stdin if no iwyu_tool out file given + for line in fileinput.input(args.file): + if 'should remove' in line: + # If the file path in the iwyu_tool output is an absolute path it + # means the file is outside of the dpdk directory, therefore ignore it. + # Also check to see if the file is within the specified sub directory. + filename = line.split()[0] + if (filename != abspath(filename) and + directory in filename): + filepath = relpath(join(build_dir, filename)) + elif line.startswith('-') and filepath: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filepath} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filepath, include, build_dir) + else: + filepath = None + + +def main(): + process(args_parse()) + + +if __name__ == '__main__': + main()
Signature · 1 line
2.25.1
Re: [PATCH v4 01/53] devtools: script to remove unused headers includes
Quoted 13 lines · On Fri, 14 Jan 2022 16:23:17 +0000 Sean Morrissey <[email protected]>…
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by
iwyu_tooloutput file$ ./devtools/process_iwyu.py iwyu.out -b buildRemove headers flagged by
iwyu_tooloutput file from sub-directory$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Quoted 7 lines
Remove headers directly piped from the
iwyu_tool$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b buildSigned-off-by Sean Morrissey <[email protected]>Signed-off-by Conor Fogarty <[email protected]>Reviewed-by Bruce Richardson <[email protected]>
Could this be a shell script instead of python?
That would prevent having to pull in more python library dependencies.
Re: [PATCH v4 01/53] devtools: script to remove unused headers includes
Quoted 19 lines · Stephen Hemminger
Quoted 16 lines · On Fri, 14 Jan 2022 16:23:17 +0000 Sean Morrissey <[email protected]>…
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by
iwyu_tooloutput file$ ./devtools/process_iwyu.py iwyu.out -b buildRemove headers flagged by
iwyu_tooloutput file from sub-directory$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargsRemove headers directly piped from the
iwyu_tool$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
Quoted 7 lines
Quoted 4 lines
Signed-off-by Sean Morrissey <[email protected]>Signed-off-by Conor Fogarty <[email protected]>Reviewed-by Bruce Richardson <[email protected]>Could this be a shell script instead of python?
That would prevent having to pull in more python library dependencies.
Can you clarify what python library dependencies are you concerned about? AFAIK everything in this script is just from the standard built-in python library - Sean, perhaps you can confirm? Converting to shell would lead to something far less readable, IMHO, and it would be less portable to windows too in future.
/Bruce
PATCH v4 2/53 telemetry: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 2 files changed, 2 deletions(-)
lib/telemetry/telemetry.c +0 -1
@@ -8,7 +8,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> -#include <dlfcn.h> #endif /* !RTE_EXEC_ENV_WINDOWS */ /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
lib/telemetry/telemetry_data.h +0 -1
@@ -5,7 +5,6 @@#ifndef _TELEMETRY_DATA_H_#define _TELEMETRY_DATA_H_ -#include <inttypes.h> #include "rte_telemetry.h" enum tel_container_types {
Signature · 1 line
2.25.1
PATCH v4 3/53 ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 7 ------- 1 file changed, 7 deletions(-)
lib/ring/rte_ring.c +0 -7
@@ -17,16 +17,9 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_spinlock.h>
Signature · 1 line
2.25.1
PATCH v4 4/53 kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)
lib/kvargs/rte_kvargs.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> #include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
PATCH v4 5/53 eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 7 +------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 5 ----- lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 7 ------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 -------- lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 5 ----- lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 2 insertions(+), 201 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
@@ -5,20 +5,15 @@#include <stdio.h> #include <string.h> -#include <inttypes.h> #include <sys/queue.h> -#include <rte_compat.h> #include <rte_bus.h> #include <rte_class.h> #include <rte_dev.h> #include <rte_devargs.h> -#include <rte_debug.h> #include <rte_errno.h> -#include <rte_kvargs.h> #include <rte_log.h> #include <rte_spinlock.h> -#include <rte_malloc.h> #include <rte_string_fns.h> #include "eal_private.h"
lib/eal/common/eal_common_devargs.c +0 -1
@@ -12,7 +12,6 @@#include <rte_bus.h> #include <rte_class.h> -#include <rte_compat.h> #include <rte_dev.h> #include <rte_devargs.h> #include <rte_errno.h>
lib/eal/common/eal_common_errno.c +0 -4
@@ -5,15 +5,11 @@/* Use XSI-compliant portable version of strerror_r() */ #undef _GNU_SOURCE -#include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_per_lcore.h> #include <rte_errno.h> -#include <rte_string_fns.h> #ifdef RTE_EXEC_ENV_WINDOWS #define strerror_r (errnum, buf, buflen) strerror_s(buf, buflen, errnum)
lib/eal/common/eal_common_fbarray.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2017-2018 Intel Corporation */ -#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h>
@@ -14,9 +13,7 @@#include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include "eal_filesystem.h" #include "eal_private.h"
lib/eal/common/eal_common_hexdump.c +0 -3
@@ -1,10 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> -#include <errno.h> -#include <stdint.h> #include <rte_hexdump.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_launch.c +0 -6
@@ -3,16 +3,10 @@*/ #include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/queue.h> #include <rte_launch.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_atomic.h> #include <rte_pause.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include "eal_private.h"
lib/eal/common/eal_common_lcore.c +1 -6
@@ -2,19 +2,14 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <unistd.h> -#include <limits.h> #include <string.h> #include <rte_common.h> -#include <rte_debug.h> -#include <rte_eal.h> +#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_rwlock.h> -#include "eal_memcfg.h" #include "eal_private.h" #include "eal_thread.h"
lib/eal/common/eal_common_log.c +0 -2
@@ -12,9 +12,7 @@#include <fnmatch.h> #include <sys/queue.h> -#include <rte_eal.h> #include <rte_log.h> -#include <rte_os_shim.h> #include <rte_per_lcore.h> #include "eal_log.h"
lib/eal/common/eal_common_memalloc.c +0 -3
@@ -5,12 +5,9 @@#include <string.h> #include <rte_errno.h> -#include <rte_lcore.h> #include <rte_fbarray.h> -#include <rte_memzone.h> #include <rte_memory.h> #include <rte_string_fns.h> -#include <rte_rwlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/eal_common_memory.c +0 -5
@@ -2,16 +2,11 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdint.h> -#include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> #include <rte_fbarray.h> #include <rte_memory.h>
lib/eal/common/eal_common_memzone.c +0 -4
@@ -2,20 +2,16 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> #include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/eal/common/eal_common_options.c +0 -2
@@ -4,7 +4,6 @@*/ #include <stdlib.h> -#include <unistd.h> #include <string.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <syslog.h>
@@ -17,7 +16,6 @@#include <dlfcn.h> #include <libgen.h> #endif -#include <sys/types.h> #include <sys/stat.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dirent.h>
lib/eal/common/eal_common_proc.c +0 -2
@@ -15,7 +15,6 @@#include <string.h> #include <sys/file.h> #include <sys/time.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h>
@@ -27,7 +26,6 @@#include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_tailq.h> #include "eal_memcfg.h" #include "eal_private.h"
lib/eal/common/eal_common_string_fns.c +0 -2
@@ -2,9 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_tailqs.c +0 -11
@@ -3,24 +3,13 @@*/ #include <sys/queue.h> -#include <stdint.h> -#include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> -#include <inttypes.h> -#include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_log.h> #include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_memcfg.h"
lib/eal/common/eal_common_thread.c +0 -3
@@ -4,10 +4,7 @@#include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <unistd.h> #include <pthread.h> -#include <signal.h> #include <sched.h> #include <assert.h> #include <string.h>
lib/eal/common/eal_common_timer.c +0 -6
@@ -2,16 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/types.h> -#include <time.h> -#include <errno.h> #include <rte_common.h> -#include <rte_compat.h> #include <rte_log.h> #include <rte_cycles.h> #include <rte_pause.h>
lib/eal/common/eal_common_trace.c +0 -1
@@ -3,7 +3,6 @@*/ #include <fnmatch.h> -#include <inttypes.h> #include <sys/queue.h> #include <regex.h>
lib/eal/common/hotplug_mp.h +0 -1
@@ -6,7 +6,6 @@#define _HOTPLUG_MP_H_#include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request"#define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response"
lib/eal/common/malloc_elem.c +0 -6
@@ -6,17 +6,11 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> #include <rte_common.h> -#include <rte_spinlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/malloc_heap.c +0 -5
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdlib.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <sys/queue.h>
@@ -13,15 +12,11 @@#include <rte_errno.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> #include <rte_string_fns.h> #include <rte_spinlock.h> -#include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_atomic.h> #include <rte_fbarray.h> #include "eal_internal_cfg.h"
lib/eal/common/malloc_mp.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <sys/time.h> -#include <rte_alarm.h> #include <rte_errno.h> #include <rte_string_fns.h>
lib/eal/common/malloc_mp.h +0 -2
@@ -10,8 +10,6 @@#include <rte_common.h> #include <rte_random.h> -#include <rte_spinlock.h> -#include <rte_tailq.h> /* forward declarations */ struct malloc_heap ;
lib/eal/common/rte_malloc.c +0 -5
@@ -13,11 +13,6 @@#include <rte_memory.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_branch_prediction.h> -#include <rte_debug.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_common.h> #include <rte_spinlock.h>
lib/eal/common/rte_random.c +0 -3
@@ -5,14 +5,11 @@#ifdef __RDSEED__#include <x86intrin.h> #endif -#include <stdlib.h> #include <unistd.h> #include <rte_branch_prediction.h> #include <rte_cycles.h> -#include <rte_eal.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_random.h> struct rte_rand_state {
lib/eal/common/rte_service.c +0 -6
@@ -3,22 +3,16 @@*/ #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <limits.h> #include <string.h> -#include <rte_compat.h> #include <rte_service.h> #include <rte_service_component.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_debug.h> #include <rte_cycles.h> #include <rte_atomic.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/include/rte_version.h +0 -2
@@ -14,10 +14,8 @@extern "C" {#endif -#include <stdint.h> #include <string.h> #include <stdio.h> -#include <rte_common.h> #include <rte_compat.h> /**
lib/eal/linux/eal.c +0 -10
@@ -7,10 +7,8 @@#include <stdlib.h> #include <stdint.h> #include <string.h> -#include <stdarg.h> #include <unistd.h> #include <pthread.h> -#include <syslog.h> #include <getopt.h> #include <sys/file.h> #include <dirent.h>
@@ -20,32 +18,24 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #if defined(RTE_ARCH_X86 )#include <sys/io.h> #endif #include <linux/version.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_debug.h> #include <rte_memory.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_errno.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_service_component.h> #include <rte_log.h> -#include <rte_random.h> -#include <rte_cycles.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> -#include <rte_interrupts.h> #include <rte_bus.h> -#include <rte_dev.h> -#include <rte_devargs.h> #include <rte_version.h> #include <malloc_heap.h> #include <rte_vfio.h>
lib/eal/linux/eal_alarm.c +0 -7
@@ -3,21 +3,14 @@*/ #include <stdio.h> #include <stdint.h> -#include <signal.h> #include <errno.h> -#include <string.h> #include <sys/queue.h> #include <sys/time.h> #include <sys/timerfd.h> -#include <rte_memory.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_common.h> -#include <rte_per_lcore.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_cpuflags.c +0 -2
@@ -5,8 +5,6 @@#include <elf.h> #include <fcntl.h> #include <string.h> -#include <sys/stat.h> -#include <sys/types.h> #include <unistd.h> #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
lib/eal/linux/eal_debug.c +0 -5
@@ -5,16 +5,11 @@#ifdef RTE_BACKTRACE #include <execinfo.h> #endif -#include <stdarg.h> -#include <signal.h> #include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_common.h> -#include <rte_eal.h> #define BACKTRACE_SIZE 256
lib/eal/linux/eal_dev.c +0 -4
@@ -4,20 +4,16 @@#include <string.h> #include <unistd.h> -#include <fcntl.h> #include <signal.h> #include <sys/socket.h> #include <linux/netlink.h> #include <rte_string_fns.h> #include <rte_log.h> -#include <rte_compat.h> #include <rte_dev.h> -#include <rte_malloc.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_bus.h> -#include <rte_eal.h> #include <rte_spinlock.h> #include <rte_errno.h>
lib/eal/linux/eal_hugepage_info.c +0 -7
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <sys/types.h> #include <sys/file.h> #include <dirent.h> #include <fcntl.h>
@@ -12,19 +11,13 @@#include <stdio.h> #include <fnmatch.h> #include <inttypes.h> -#include <stdarg.h> #include <unistd.h> #include <errno.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #include <linux/mman.h> /* for hugetlb-related flags */ -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_debug.h> #include <rte_log.h>
lib/eal/linux/eal_interrupts.c +0 -8
@@ -7,13 +7,10 @@#include <stdlib.h> #include <pthread.h> #include <sys/queue.h> -#include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include <inttypes.h> #include <sys/epoll.h> -#include <sys/signalfd.h> #include <sys/ioctl.h> #include <sys/eventfd.h> #include <assert.h>
@@ -21,9 +18,6 @@#include <rte_common.h> #include <rte_interrupts.h> -#include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_branch_prediction.h>
@@ -36,8 +30,6 @@#include <rte_eal_trace.h> #include "eal_private.h" -#include "eal_vfio.h" -#include "eal_thread.h" #define EAL_INTR_EPOLL_WAIT_FOREVER (-1)#define NB_OTHER_INTR 1
lib/eal/linux/eal_lcore.c +0 -7
@@ -4,15 +4,8 @@#include <unistd.h> #include <limits.h> -#include <string.h> -#include <dirent.h> #include <rte_log.h> -#include <rte_eal.h> -#include <rte_lcore.h> -#include <rte_common.h> -#include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_filesystem.h"
lib/eal/linux/eal_log.c +1 -10
@@ -2,19 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdint.h> #include <sys/types.h> #include <syslog.h> -#include <sys/queue.h> - -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_spinlock.h> +#include <rte_log.h> #include "eal_log.h"
lib/eal/linux/eal_memalloc.c +0 -8
@@ -3,23 +3,17 @@*/ #include <errno.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <unistd.h> #include <limits.h> #include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
@@ -36,9 +30,7 @@#include <rte_common.h> #include <rte_log.h> #include <rte_eal.h> -#include <rte_errno.h> #include <rte_memory.h> -#include <rte_spinlock.h> #include "eal_filesystem.h" #include "eal_internal_cfg.h"
lib/eal/linux/eal_memory.c +0 -9
@@ -5,7 +5,6 @@#include <errno.h> #include <fcntl.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h>
@@ -13,19 +12,14 @@#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <sys/resource.h> #include <unistd.h> #include <limits.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ -#include <linux/memfd.h> #define MEMFD_SUPPORTED #endif #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
@@ -36,12 +30,9 @@#include <rte_errno.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_string_fns.h> #include "eal_private.h" #include "eal_memalloc.h"
lib/eal/linux/eal_thread.c +0 -5
@@ -4,20 +4,15 @@#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <pthread.h> -#include <sched.h> -#include <sys/queue.h> #include <sys/syscall.h> #include <rte_debug.h> #include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> -#include <rte_memory.h> -#include <rte_per_lcore.h> #include <rte_eal.h> #include <rte_lcore.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_timer.c +0 -15
@@ -3,28 +3,13 @@* Copyright(c) 2012-2013 6WIND S.A. */ -#include <string.h> -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <unistd.h> -#include <fcntl.h> -#include <inttypes.h> -#include <sys/mman.h> -#include <sys/queue.h> -#include <pthread.h> -#include <errno.h> #include <rte_common.h> -#include <rte_log.h> #include <rte_cycles.h> -#include <rte_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_debug.h> #include "eal_private.h" -#include "eal_internal_cfg.h" enum timer_source eal_timer_source =EAL_TIMER_HPET ;
lib/eal/linux/eal_vfio_mp_sync.c +0 -1
@@ -5,7 +5,6 @@#include <unistd.h> #include <string.h> -#include <rte_compat.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_vfio.h>
lib/eal/unix/eal_file.c +0 -1
@@ -3,7 +3,6 @@*/ #include <sys/file.h> -#include <sys/mman.h> #include <fcntl.h> #include <unistd.h>
lib/eal/unix/rte_thread.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_thread.h>
lib/eal/x86/rte_cycles.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <cpuid.h> -#include <rte_common.h> #include "eal_private.h"
Signature · 1 line
2.25.1
PATCH v4 6/53 vhost: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/vhost/fd_man.c | 6 ------ lib/vhost/fd_man.h | 1 - lib/vhost/socket.c | 1 - lib/vhost/vdpa.c | 1 - lib/vhost/vhost.c | 4 ---- lib/vhost/vhost.h | 6 ------ lib/vhost/vhost_user.c | 2 -- lib/vhost/vhost_user.h | 1 - 8 files changed, 22 deletions(-)
lib/vhost/fd_man.c +0 -6
@@ -2,14 +2,8 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdint.h> #include <stdio.h> -#include <stdlib.h> -#include <sys/socket.h> -#include <sys/time.h> -#include <sys/types.h> #include <unistd.h> -#include <string.h> #include <rte_common.h> #include <rte_log.h>
lib/vhost/fd_man.h +0 -1
@@ -4,7 +4,6 @@#ifndef _FD_MAN_H_#define _FD_MAN_H_ -#include <stdint.h> #include <pthread.h> #include <poll.h>
lib/vhost/socket.c +0 -1
@@ -8,7 +8,6 @@#include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/queue.h>
lib/vhost/vdpa.c +0 -1
@@ -8,7 +8,6 @@* Device specific vhost lib */ -#include <stdbool.h> #include <sys/queue.h> #include <rte_class.h>
lib/vhost/vhost.c +0 -4
@@ -4,7 +4,6 @@#include <linux/vhost.h> #include <linux/virtio_net.h> -#include <stddef.h> #include <stdint.h> #include <stdlib.h> #ifdef RTE_LIBRTE_VHOST_NUMA
@@ -13,13 +12,10 @@#endif #include <rte_errno.h> -#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_string_fns.h> #include <rte_memory.h> #include <rte_malloc.h> #include <rte_vhost.h> -#include <rte_rwlock.h> #include "iotlb.h" #include "vhost.h"
lib/vhost/vhost.h +0 -6
@@ -5,23 +5,17 @@#ifndef _VHOST_NET_CDEV_H_#define _VHOST_NET_CDEV_H_#include <stdint.h> -#include <stdio.h> #include <stdbool.h> -#include <sys/types.h> #include <sys/queue.h> #include <unistd.h> -#include <linux/vhost.h> #include <linux/virtio_net.h> -#include <sys/socket.h> #include <linux/if.h> #include <rte_log.h> #include <rte_ether.h> -#include <rte_rwlock.h> #include <rte_malloc.h> #include "rte_vhost.h" -#include "rte_vdpa.h" #include "vdpa_driver.h" #include "rte_vhost_async.h"
lib/vhost/vhost_user.c +0 -2
@@ -27,10 +27,8 @@#include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> #include <sys/syscall.h> -#include <assert.h> #ifdef RTE_LIBRTE_VHOST_NUMA #include <numaif.h> #endif
lib/vhost/vhost_user.h +0 -1
@@ -6,7 +6,6 @@#define _VHOST_NET_USER_H#include <stdint.h> -#include <linux/vhost.h> #include "rte_vhost.h"
Signature · 1 line
2.25.1
PATCH v4 7/53 timer: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/timer/rte_timer.c | 7 ------- 1 file changed, 7 deletions(-)
lib/timer/rte_timer.c +0 -7
@@ -2,29 +2,22 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> -#include <inttypes.h> #include <assert.h> #include <sys/queue.h> #include <rte_common.h> #include <rte_cycles.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> #include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_branch_prediction.h> #include <rte_spinlock.h> #include <rte_random.h> #include <rte_pause.h> #include <rte_memzone.h> -#include <rte_malloc.h> -#include <rte_errno.h> #include "rte_timer.h"
Signature · 1 line
2.25.1
PATCH v4 8/53 table: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/table/rte_swx_table_em.c | 1 - lib/table/rte_swx_table_em.h | 1 - lib/table/rte_swx_table_learner.c | 1 - lib/table/rte_swx_table_learner.h | 1 - lib/table/rte_swx_table_selector.c | 1 - lib/table/rte_swx_table_wm.c | 2 -- lib/table/rte_swx_table_wm.h | 1 - lib/table/rte_table_acl.c | 3 --- lib/table/rte_table_array.c | 2 -- lib/table/rte_table_hash_cuckoo.c | 2 -- lib/table/rte_table_hash_ext.c | 2 -- lib/table/rte_table_hash_key16.c | 2 -- lib/table/rte_table_hash_key32.c | 2 -- lib/table/rte_table_hash_key8.c | 2 -- lib/table/rte_table_hash_lru.c | 2 -- lib/table/rte_table_lpm.c | 2 -- lib/table/rte_table_lpm_ipv6.c | 3 --- lib/table/rte_table_stub.c | 1 - lib/table/rte_table_stub.h | 1 - 19 files changed, 32 deletions(-)
lib/table/rte_swx_table_em.c +0 -1
@@ -1,7 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Intel Corporation */ -#include <stdlib.h> #include <string.h> #include <stdio.h> #include <errno.h>
lib/table/rte_swx_table_em.h +0 -1
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Exact Match Table */ -#include <stdint.h> #include <rte_swx_table.h>
lib/table/rte_swx_table_learner.c +0 -1
@@ -1,7 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Intel Corporation */ -#include <stdlib.h> #include <string.h> #include <stdio.h> #include <errno.h>
lib/table/rte_swx_table_learner.h +0 -1
@@ -22,7 +22,6 @@ extern "C" {*/ #include <stdint.h> -#include <sys/queue.h> #include <rte_compat.h>
lib/table/rte_swx_table_selector.c +0 -1
@@ -7,7 +7,6 @@#include <errno.h> #include <rte_common.h> -#include <rte_prefetch.h> #include "rte_swx_table_selector.h"
lib/table/rte_swx_table_wm.c +0 -2
@@ -4,10 +4,8 @@#include <stdlib.h> #include <string.h> #include <stdio.h> -#include <errno.h> #include <rte_common.h> -#include <rte_prefetch.h> #include <rte_cycles.h> #include <rte_acl.h>
lib/table/rte_swx_table_wm.h +0 -1
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Wildcard Match Table */ -#include <stdint.h> #include <rte_swx_table.h>
lib/table/rte_table_acl.c +0 -3
@@ -6,13 +6,10 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h> #include "rte_table_acl.h" -#include <rte_ether.h> #ifdef RTE_TABLE_STATS_COLLECT
lib/table/rte_table_array.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_cuckoo.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_ext.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key16.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key32.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key8.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_lru.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_lpm.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_byteorder.h> #include <rte_log.h>
lib/table/rte_table_lpm_ipv6.c +0 -3
@@ -6,10 +6,7 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> -#include <rte_byteorder.h> #include <rte_log.h> #include <rte_lpm6.h>
lib/table/rte_table_stub.c +0 -1
@@ -4,7 +4,6 @@#include <string.h> -#include <rte_mbuf.h> #include <rte_malloc.h> #include "rte_table_stub.h"
lib/table/rte_table_stub.h +0 -1
@@ -17,7 +17,6 @@ extern "C" {* ***/ -#include <stdint.h> #include "rte_table.h"
Signature · 1 line
2.25.1
PATCH v4 9/53 stack: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/stack/rte_stack.c | 2 -- lib/stack/rte_stack.h | 1 - 2 files changed, 3 deletions(-)
lib/stack/rte_stack.c +0 -2
@@ -6,12 +6,10 @@#include <sys/queue.h> #include <rte_string_fns.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_malloc.h> #include <rte_memzone.h> -#include <rte_rwlock.h> #include <rte_tailq.h> #include "rte_stack.h"
lib/stack/rte_stack.h +0 -1
@@ -19,7 +19,6 @@extern "C" {#endif -#include <rte_compat.h> #include <rte_debug.h> #include <rte_errno.h> #include <rte_memzone.h>
Signature · 1 line
2.25.1
PATCH v4 10/53 security: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/security/rte_security.c | 2 -- lib/security/rte_security.h | 3 --- 2 files changed, 5 deletions(-)
lib/security/rte_security.c +0 -2
@@ -5,10 +5,8 @@*/ #include <rte_cryptodev.h> -#include <rte_malloc.h> #include <rte_dev.h> #include <rte_telemetry.h> -#include "rte_compat.h" #include "rte_security.h" #include "rte_security_driver.h"
lib/security/rte_security.h +0 -3
@@ -23,10 +23,7 @@ extern "C" {#include <rte_common.h> #include <rte_crypto.h> #include <rte_ip.h> -#include <rte_mbuf.h> #include <rte_mbuf_dyn.h> -#include <rte_memory.h> -#include <rte_mempool.h> /** IPSec protocol mode */ enum rte_security_ipsec_sa_mode {
Signature · 1 line
2.25.1
PATCH v4 11/53 sched: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/sched/rte_pie.c | 2 -- lib/sched/rte_red.h | 1 - lib/sched/rte_sched.c | 1 - lib/sched/rte_sched.h | 1 - 4 files changed, 5 deletions(-)
lib/sched/rte_pie.c +0 -2
@@ -5,8 +5,6 @@#include <stdlib.h> #include "rte_pie.h" -#include <rte_common.h> -#include <rte_cycles.h> #include <rte_malloc.h> #ifdef __INTEL_COMPILER
lib/sched/rte_red.h +0 -1
@@ -18,7 +18,6 @@ extern "C" {#include <stdint.h> #include <limits.h> -#include <rte_common.h> #include <rte_debug.h> #include <rte_cycles.h> #include <rte_branch_prediction.h>
lib/sched/rte_sched.c +0 -1
@@ -7,7 +7,6 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_prefetch.h>
lib/sched/rte_sched.h +0 -1
@@ -56,7 +56,6 @@ extern "C" {* */ -#include <sys/types.h> #include <rte_compat.h> #include <rte_mbuf.h> #include <rte_meter.h>
Signature · 1 line
2.25.1
PATCH v4 12/53 ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 2 -- 1 file changed, 2 deletions(-)
lib/ring/rte_ring.c +0 -2
@@ -8,7 +8,6 @@*/ #include <stdio.h> -#include <stdarg.h> #include <string.h> #include <stdint.h> #include <inttypes.h>
@@ -22,7 +21,6 @@#include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_string_fns.h> -#include <rte_spinlock.h> #include <rte_tailq.h> #include "rte_ring.h"
Signature · 1 line
2.25.1
PATCH v4 13/53 rib: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/rib/rte_rib.c | 2 -- lib/rib/rte_rib.h | 1 - lib/rib/rte_rib6.c | 2 -- lib/rib/rte_rib6.h | 1 - 4 files changed, 6 deletions(-)
lib/rib/rte_rib.c +0 -2
@@ -6,12 +6,10 @@#include <stdbool.h> #include <stdint.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_malloc.h> #include <rte_mempool.h> -#include <rte_rwlock.h> #include <rte_string_fns.h> #include <rte_tailq.h>
lib/rib/rte_rib.h +0 -1
@@ -17,7 +17,6 @@#include <stdlib.h> #include <stdint.h> -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
lib/rib/rte_rib6.c +0 -2
@@ -6,12 +6,10 @@#include <stdbool.h> #include <stdint.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_malloc.h> #include <rte_mempool.h> -#include <rte_rwlock.h> #include <rte_string_fns.h> #include <rte_tailq.h>
lib/rib/rte_rib6.h +0 -1
@@ -15,7 +15,6 @@*/ #include <rte_memcpy.h> -#include <rte_compat.h> #include <rte_common.h> #ifdef __cplusplus
Signature · 1 line
2.25.1
PATCH v4 14/53 reorder: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/reorder/rte_reorder.c | 1 - 1 file changed, 1 deletion(-)
lib/reorder/rte_reorder.c +0 -1
@@ -2,7 +2,6 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <inttypes.h> #include <string.h> #include <rte_string_fns.h>
Signature · 1 line
2.25.1
PATCH v4 15/53 regexdev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/regexdev/rte_regexdev.c | 2 -- lib/regexdev/rte_regexdev.h | 3 --- 2 files changed, 5 deletions(-)
lib/regexdev/rte_regexdev.c +0 -2
@@ -5,8 +5,6 @@#include <string.h> -#include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_string_fns.h>
lib/regexdev/rte_regexdev.h +0 -3
@@ -199,11 +199,8 @@ extern "C" {#endif #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> -#include <rte_errno.h> #include <rte_mbuf.h> -#include <rte_memory.h> #define RTE_REGEXDEV_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
Signature · 1 line
2.25.1
RE: [PATCH v4 15/53] regexdev: remove unneeded header includes
Hi Sean,
Quoted 44 lines
-----Original Message-----
From: Sean Morrissey <[email protected]>
Sent: Friday, January 14, 2022 6:24 PM
Subject: [PATCH v4 15/53] regexdev: remove unneeded header includesThese header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>--- lib/regexdev/rte_regexdev.c | 2 -- lib/regexdev/rte_regexdev.h | 3 --- 2 files changed, 5 deletions(-)lib/regexdev/rte_regexdev.c +0
-2@@ -5,8 +5,6 @@#include <string.h> -#include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_string_fns.h> lib/regexdev/rte_regexdev.h +0
-4@@ -199,11 +199,8 @@ extern "C" {#endif #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> -#include <rte_errno.h> #include <rte_mbuf.h> -#include <rte_memory.h> #define RTE_REGEXDEV_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN --
Quoted 1 line
2.25.1
Best,
Ori
PATCH v4 16/53 rcu: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/rcu/rte_rcu_qsbr.c | 4 ---- lib/rcu/rte_rcu_qsbr.h | 4 ---- 2 files changed, 8 deletions(-)
lib/rcu/rte_rcu_qsbr.c +0 -4
@@ -13,10 +13,6 @@#include <rte_log.h> #include <rte_memory.h> #include <rte_malloc.h> -#include <rte_eal.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_ring_elem.h>
lib/rcu/rte_rcu_qsbr.h +0 -4
@@ -32,11 +32,7 @@ extern "C" {#include <stdbool.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> -#include <errno.h> #include <rte_common.h> -#include <rte_memory.h> -#include <rte_lcore.h> #include <rte_debug.h> #include <rte_atomic.h> #include <rte_ring.h>
Signature · 1 line
2.25.1
PATCH v4 17/53 rawdev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/rawdev/rte_rawdev.c | 14 -------------- 1 file changed, 14 deletions(-)
lib/rawdev/rte_rawdev.c +0 -14
@@ -6,29 +6,15 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <errno.h> #include <stdint.h> #include <inttypes.h> -#include <sys/types.h> -#include <sys/queue.h> #include <rte_string_fns.h> -#include <rte_byteorder.h> #include <rte_log.h> -#include <rte_debug.h> #include <rte_dev.h> -#include <rte_memory.h> -#include <rte_memcpy.h> -#include <rte_memzone.h> -#include <rte_eal.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_common.h> #include <rte_malloc.h> -#include <rte_errno.h> #include <rte_telemetry.h> #include "rte_rawdev.h"
Signature · 1 line
2.25.1
PATCH v4 18/53 power: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed. Also added rte_string_fns.h to example app vm_power_manager for users without libbsd.
--- examples/vm_power_manager/guest_cli/main.c | 1 + lib/power/guest_channel.c | 2 -- lib/power/power_acpi_cpufreq.c | 7 ------- lib/power/power_acpi_cpufreq.h | 4 ---- lib/power/power_common.h | 1 - lib/power/power_cppc_cpufreq.c | 1 - lib/power/power_cppc_cpufreq.h | 4 ---- lib/power/power_kvm_vm.c | 1 - lib/power/power_kvm_vm.h | 4 ---- lib/power/power_pstate_cpufreq.c | 7 ------- lib/power/power_pstate_cpufreq.h | 4 ---- lib/power/rte_power.c | 1 - lib/power/rte_power.h | 2 -- lib/power/rte_power_empty_poll.c | 2 -- 14 files changed, 1 insertion(+), 40 deletions(-)
examples/vm_power_manager/guest_cli/main.c +1 -0
@@ -13,6 +13,7 @@#include <rte_debug.h> #include <rte_eal.h> #include <rte_log.h> +#include <rte_string_fns.h> #include "vm_power_cli_guest.h" #include "parse.h"
lib/power/guest_channel.c +0 -2
@@ -4,9 +4,7 @@#include <glob.h> #include <stdio.h> -#include <stdlib.h> #include <unistd.h> -#include <signal.h> #include <limits.h> #include <fcntl.h> #include <string.h>
lib/power/power_acpi_cpufreq.c +0 -7
@@ -3,17 +3,10 @@*/ #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <signal.h> -#include <limits.h> #include <rte_memcpy.h> -#include <rte_memory.h> #include <rte_string_fns.h> #include "power_acpi_cpufreq.h"
lib/power/power_acpi_cpufreq.h +0 -4
@@ -10,10 +10,6 @@* RTE Power Management via userspace ACPI cpufreq */ -#include <rte_common.h> -#include <rte_byteorder.h> -#include <rte_log.h> -#include <rte_string_fns.h> #include "rte_power.h" /**
lib/power/power_common.h +0 -1
@@ -5,7 +5,6 @@#ifndef _POWER_COMMON_H_#define _POWER_COMMON_H_ -#include <inttypes.h> #include <rte_common.h>
lib/power/power_cppc_cpufreq.c +0 -1
@@ -4,7 +4,6 @@*/ #include <rte_memcpy.h> -#include <rte_memory.h> #include "power_cppc_cpufreq.h" #include "power_common.h"
lib/power/power_cppc_cpufreq.h +0 -4
@@ -11,10 +11,6 @@* RTE Power Management via userspace CPPC cpufreq */ -#include <rte_common.h> -#include <rte_byteorder.h> -#include <rte_log.h> -#include <rte_string_fns.h> #include "rte_power.h" /**
lib/power/power_kvm_vm.c +0 -1
@@ -9,7 +9,6 @@#include "rte_power_guest_channel.h" #include "guest_channel.h" #include "power_kvm_vm.h" -#include "power_common.h" #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent"
lib/power/power_kvm_vm.h +0 -4
@@ -10,10 +10,6 @@* RTE Power Management KVM VM */ -#include <rte_common.h> -#include <rte_byteorder.h> -#include <rte_log.h> -#include <rte_string_fns.h> #include "rte_power.h" /**
lib/power/power_pstate_cpufreq.c +0 -7
@@ -3,20 +3,13 @@*/ #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <signal.h> #include <limits.h> #include <errno.h> -#include <inttypes.h> #include <rte_memcpy.h> -#include <rte_memory.h> -#include <rte_string_fns.h> #include "power_pstate_cpufreq.h" #include "power_common.h"
lib/power/power_pstate_cpufreq.h +0 -4
@@ -10,10 +10,6 @@* RTE Power Management via Intel Pstate driver */ -#include <rte_common.h> -#include <rte_byteorder.h> -#include <rte_log.h> -#include <rte_string_fns.h> #include "rte_power.h" /**
lib/power/rte_power.c +0 -1
@@ -10,7 +10,6 @@#include "power_cppc_cpufreq.h" #include "power_kvm_vm.h" #include "power_pstate_cpufreq.h" -#include "power_common.h" enum power_management_env global_default_env =PM_ENV_NOT_SET ;
lib/power/rte_power.h +0 -2
@@ -11,9 +11,7 @@*/ #include <rte_common.h> -#include <rte_byteorder.h> #include <rte_log.h> -#include <rte_string_fns.h> #include <rte_power_guest_channel.h> #ifdef __cplusplus
lib/power/rte_power_empty_poll.c +0 -2
@@ -5,8 +5,6 @@#include <string.h> #include <rte_lcore.h> -#include <rte_cycles.h> -#include <rte_atomic.h> #include <rte_malloc.h> #include <inttypes.h>
Signature · 1 line
2.25.1
PATCH v4 19/53 port: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/port/rte_port_fd.h | 1 - lib/port/rte_port_frag.c | 2 -- lib/port/rte_port_frag.h | 1 - lib/port/rte_port_kni.c | 1 - lib/port/rte_port_kni.h | 1 - lib/port/rte_port_ras.c | 1 - lib/port/rte_port_ras.h | 1 - lib/port/rte_port_ring.h | 1 - lib/port/rte_port_sched.c | 1 - lib/port/rte_port_source_sink.c | 1 - lib/port/rte_swx_port_fd.c | 1 - lib/port/rte_swx_port_fd.h | 1 - lib/port/rte_swx_port_ring.h | 1 - 13 files changed, 14 deletions(-)
lib/port/rte_port_fd.h +0 -1
@@ -20,7 +20,6 @@ extern "C" {#include <stdint.h> -#include <rte_mempool.h> #include "rte_port.h" /** fd_reader port parameters */
lib/port/rte_port_frag.c +0 -2
@@ -3,9 +3,7 @@*/ #include <string.h> -#include <rte_ether.h> #include <rte_ip_frag.h> -#include <rte_memory.h> #include "rte_port_frag.h"
lib/port/rte_port_frag.h +0 -1
@@ -29,7 +29,6 @@ extern "C" {#include <stdint.h> -#include <rte_ring.h> #include "rte_port.h"
lib/port/rte_port_kni.c +0 -1
@@ -4,7 +4,6 @@*/ #include <string.h> -#include <rte_common.h> #include <rte_malloc.h> #include <rte_kni.h>
lib/port/rte_port_kni.h +0 -1
@@ -21,7 +21,6 @@ extern "C" {#include <stdint.h> -#include <rte_kni.h> #include "rte_port.h"
lib/port/rte_port_ras.c +0 -1
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <rte_ether.h> #include <rte_ip_frag.h> #include <rte_cycles.h> #include <rte_log.h>
lib/port/rte_port_ras.h +0 -1
@@ -30,7 +30,6 @@ extern "C" {#include <stdint.h> -#include <rte_ring.h> #include "rte_port.h"
lib/port/rte_port_ring.h +0 -1
@@ -26,7 +26,6 @@ extern "C" {#include <stdint.h> -#include <rte_ring.h> #include "rte_port.h"
lib/port/rte_port_sched.c +0 -1
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <rte_mbuf.h> #include <rte_malloc.h> #include "rte_port_sched.h"
lib/port/rte_port_source_sink.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <rte_mbuf.h> -#include <rte_mempool.h> #include <rte_malloc.h> #include <rte_memcpy.h>
lib/port/rte_swx_port_fd.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <rte_mbuf.h> -#include <rte_malloc.h> #include <rte_hexdump.h> #include "rte_swx_port_fd.h"
lib/port/rte_swx_port_fd.h +0 -1
@@ -16,7 +16,6 @@ extern "C" {***/ #include <stdint.h> -#include <rte_mempool.h> #include "rte_swx_port.h"
lib/port/rte_swx_port_ring.h +0 -1
@@ -16,7 +16,6 @@ extern "C" {#include <stdint.h> -#include <rte_ring.h> #include "rte_swx_port.h"
Signature · 1 line
2.25.1
PATCH v4 20/53 pipeline: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/pipeline/rte_pipeline.c | 4 ---- lib/pipeline/rte_port_in_action.c | 2 -- lib/pipeline/rte_swx_ctl.h | 2 -- lib/pipeline/rte_swx_pipeline.c | 1 - lib/pipeline/rte_swx_pipeline.h | 1 - lib/pipeline/rte_swx_pipeline_spec.c | 1 - lib/pipeline/rte_table_action.c | 2 -- 7 files changed, 13 deletions(-)
lib/pipeline/rte_pipeline.c +0 -4
@@ -6,10 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_memory.h> -#include <rte_cycles.h> -#include <rte_prefetch.h> -#include <rte_branch_prediction.h> #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_string_fns.h>
lib/pipeline/rte_port_in_action.c +0 -2
@@ -6,9 +6,7 @@#include <string.h> #include <rte_common.h> -#include <rte_byteorder.h> #include <rte_malloc.h> -#include <rte_memcpy.h> #include "rte_port_in_action.h"
lib/pipeline/rte_swx_ctl.h +0 -2
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Pipeline Control */ -#include <stddef.h> #include <stdint.h> #include <stdio.h>
@@ -22,7 +21,6 @@ extern "C" {#include "rte_swx_port.h" #include "rte_swx_table.h" -#include "rte_swx_table_selector.h" struct rte_swx_pipeline ;
lib/pipeline/rte_swx_pipeline.c +0 -1
@@ -4,7 +4,6 @@#include <stdlib.h> #include <stdio.h> #include <errno.h> -#include <arpa/inet.h> #include <dlfcn.h> #include "rte_swx_pipeline_internal.h"
lib/pipeline/rte_swx_pipeline.h +0 -1
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Pipeline */ -#include <stddef.h> #include <stdint.h> #include <stdio.h>
lib/pipeline/rte_swx_pipeline_spec.c +0 -1
@@ -8,7 +8,6 @@#include <errno.h> #include "rte_swx_pipeline.h" -#include "rte_swx_ctl.h" #define MAX_LINE_LENGTH RTE_SWX_INSTRUCTION_SIZE#define MAX_TOKENS RTE_SWX_INSTRUCTION_TOKENS_MAX
lib/pipeline/rte_table_action.c +0 -2
@@ -11,12 +11,10 @@#include <rte_memcpy.h> #include <rte_ether.h> #include <rte_ip.h> -#include <rte_esp.h> #include <rte_tcp.h> #include <rte_udp.h> #include <rte_vxlan.h> #include <rte_cryptodev.h> -#include <cryptodev_pmd.h> #include "rte_table_action.h"
Signature · 1 line
2.25.1
PATCH v4 21/53 pdump: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/pdump/rte_pdump.c | 1 - lib/pdump/rte_pdump.h | 2 -- 2 files changed, 3 deletions(-)
lib/pdump/rte_pdump.c +0 -1
@@ -2,7 +2,6 @@* Copyright(c) 2016-2018 Intel Corporation */ -#include <rte_memcpy.h> #include <rte_mbuf.h> #include <rte_ethdev.h> #include <rte_lcore.h>
lib/pdump/rte_pdump.h +0 -2
@@ -13,8 +13,6 @@*/ #include <stdint.h> -#include <rte_mempool.h> -#include <rte_ring.h> #include <rte_bpf.h> #ifdef __cplusplus
Signature · 1 line
2.25.1
PATCH v4 22/53 pci: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/pci/rte_pci.c | 15 +-------------- lib/pci/rte_pci.h | 2 -- 2 files changed, 1 insertion(+), 16 deletions(-)
lib/pci/rte_pci.c +1 -14
@@ -3,23 +3,10 @@* Copyright 2013-2014 6WIND S.A. */ -#include <string.h> -#include <inttypes.h> #include <stdint.h> #include <stdlib.h> #include <stdio.h> -#include <sys/queue.h> - -#include <rte_errno.h> -#include <rte_interrupts.h> -#include <rte_log.h> -#include <rte_bus.h> -#include <rte_eal_paging.h> -#include <rte_per_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_string_fns.h> -#include <rte_common.h> +#include <rte_debug.h> #include "rte_pci.h"
lib/pci/rte_pci.h +0 -2
@@ -17,9 +17,7 @@ extern "C" {#endif #include <stdio.h> -#include <limits.h> #include <inttypes.h> -#include <sys/types.h> /* * Conventional PCI and PCI-X Mode 1 devices have 256 bytes of
Signature · 1 line
2.25.1
PATCH v4 23/53 pcapng: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/pcapng/rte_pcapng.c | 1 - lib/pcapng/rte_pcapng.h | 2 -- 2 files changed, 3 deletions(-)
lib/pcapng/rte_pcapng.c +0 -1
@@ -8,7 +8,6 @@#include <stdlib.h> #include <string.h> #include <sys/uio.h> -#include <sys/utsname.h> #include <time.h> #include <unistd.h>
lib/pcapng/rte_pcapng.h +0 -2
@@ -26,9 +26,7 @@#include <stdint.h> #include <sys/types.h> #include <rte_compat.h> -#include <rte_common.h> #include <rte_mempool.h> -#include <rte_ring.h> #ifdef __cplusplusextern "C" {
Signature · 1 line
2.25.1
PATCH v4 24/53 node: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/node/ethdev_ctrl.c | 2 -- lib/node/ethdev_rx.c | 1 - lib/node/ethdev_tx.c | 1 - lib/node/ip4_lookup.c | 5 ----- lib/node/ip4_rewrite.c | 4 ---- lib/node/pkt_cls.c | 4 ---- lib/node/pkt_drop.c | 1 - 7 files changed, 18 deletions(-)
lib/node/ethdev_ctrl.c +0 -2
@@ -2,9 +2,7 @@* Copyright(C) 2020 Marvell International Ltd. */ -#include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ether.h> #include <rte_graph.h> #include "rte_node_eth_api.h"
lib/node/ethdev_rx.c +0 -1
@@ -7,7 +7,6 @@#include <rte_ether.h> #include <rte_graph.h> #include <rte_graph_worker.h> -#include <rte_mbuf.h> #include "ethdev_rx_priv.h" #include "node_private.h"
lib/node/ethdev_tx.c +0 -1
@@ -6,7 +6,6 @@#include <rte_ethdev.h> #include <rte_graph.h> #include <rte_graph_worker.h> -#include <rte_mbuf.h> #include "ethdev_tx_priv.h"
lib/node/ip4_lookup.c +0 -5
@@ -5,17 +5,12 @@#include <arpa/inet.h> #include <sys/socket.h> -#include <rte_debug.h> #include <rte_ethdev.h> #include <rte_ether.h> #include <rte_graph.h> #include <rte_graph_worker.h> #include <rte_ip.h> #include <rte_lpm.h> -#include <rte_mbuf.h> -#include <rte_tcp.h> -#include <rte_udp.h> -#include <rte_vect.h> #include "rte_node_ip4_api.h"
lib/node/ip4_rewrite.c +0 -4
@@ -2,16 +2,12 @@* Copyright(C) 2020 Marvell International Ltd. */ -#include <rte_debug.h> #include <rte_ethdev.h> #include <rte_ether.h> #include <rte_graph.h> #include <rte_graph_worker.h> #include <rte_ip.h> #include <rte_malloc.h> -#include <rte_mbuf.h> -#include <rte_tcp.h> -#include <rte_udp.h> #include <rte_vect.h> #include "rte_node_ip4_api.h"
lib/node/pkt_cls.c +0 -4
@@ -2,10 +2,6 @@* Copyright (C) 2020 Marvell. */ -#include <rte_debug.h> -#include <rte_ether.h> -#include <rte_ethdev.h> -#include <rte_mbuf.h> #include <rte_graph.h> #include <rte_graph_worker.h>
lib/node/pkt_drop.c +0 -1
@@ -2,7 +2,6 @@* Copyright(C) 2020 Marvell International Ltd. */ -#include <rte_debug.h> #include <rte_graph.h> #include <rte_mbuf.h>
Signature · 1 line
2.25.1
PATCH v4 25/53 net: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/net/net_crc_avx512.c | 3 --- lib/net/net_crc_sse.c | 1 - lib/net/rte_arp.c | 1 - lib/net/rte_ether.h | 1 - lib/net/rte_net.h | 1 - lib/net/rte_net_crc.c | 2 -- 6 files changed, 9 deletions(-)
lib/net/net_crc_avx512.c +0 -3
@@ -2,11 +2,8 @@* Copyright(c) 2020 Intel Corporation */ -#include <string.h> #include <rte_common.h> -#include <rte_branch_prediction.h> -#include <rte_cpuflags.h> #include "net_crc.h"
lib/net/net_crc_sse.c +0 -1
@@ -6,7 +6,6 @@#include <rte_common.h> #include <rte_branch_prediction.h> -#include <rte_cpuflags.h> #include "net_crc.h"
lib/net/rte_arp.c +0 -1
@@ -3,7 +3,6 @@*/ #include <rte_arp.h> -#include <rte_byteorder.h> #define RARP_PKT_SIZE 64 struct rte_mbuf *
lib/net/rte_ether.h +0 -1
@@ -18,7 +18,6 @@ extern "C" {#include <stdint.h> #include <stdio.h> -#include <rte_memcpy.h> #include <rte_random.h> #include <rte_mbuf.h> #include <rte_byteorder.h>
lib/net/rte_net.h +0 -1
@@ -12,7 +12,6 @@ extern "C" {#include <rte_ip.h> #include <rte_udp.h> #include <rte_tcp.h> -#include <rte_sctp.h> /** * Structure containing header lengths associated to a packet, filled
lib/net/rte_net_crc.c +0 -2
@@ -3,13 +3,11 @@*/ #include <stddef.h> -#include <string.h> #include <stdint.h> #include <rte_cpuflags.h> #include <rte_common.h> #include <rte_net_crc.h> -#include <rte_eal.h> #include <rte_log.h> #include <rte_vect.h>
Signature · 1 line
2.25.1
PATCH v4 26/53 metrics: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/metrics/rte_metrics.c | 3 --- 1 file changed, 3 deletions(-)
lib/metrics/rte_metrics.c +0 -3
@@ -3,13 +3,10 @@*/ #include <string.h> -#include <sys/queue.h> #include <rte_common.h> #include <rte_string_fns.h> -#include <rte_malloc.h> #include <rte_metrics.h> -#include <rte_lcore.h> #include <rte_memzone.h> #include <rte_spinlock.h>
Signature · 1 line
2.25.1
PATCH v4 27/53 mempool: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/mempool/rte_mempool.c | 7 ------- lib/mempool/rte_mempool.h | 4 ---- 2 files changed, 11 deletions(-)
lib/mempool/rte_mempool.c +0 -7
@@ -7,7 +7,6 @@#include <stdio.h> #include <string.h> #include <stdint.h> -#include <stdarg.h> #include <unistd.h> #include <inttypes.h> #include <errno.h>
@@ -19,16 +18,10 @@#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_atomic.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> -#include <rte_spinlock.h> #include <rte_tailq.h> #include <rte_eal_paging.h> #include <rte_telemetry.h>
lib/mempool/rte_mempool.h +0 -4
@@ -34,17 +34,13 @@*/ #include <stdio.h> -#include <stdlib.h> #include <stdint.h> -#include <errno.h> #include <inttypes.h> #include <rte_config.h> #include <rte_spinlock.h> -#include <rte_log.h> #include <rte_debug.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_branch_prediction.h> #include <rte_ring.h> #include <rte_memcpy.h>
Signature · 1 line
2.25.1
PATCH v4 28/53 member: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/member/rte_member.c | 2 -- lib/member/rte_member.h | 1 - lib/member/rte_member_vbf.c | 1 - 3 files changed, 4 deletions(-)
lib/member/rte_member.c +0 -2
@@ -5,9 +5,7 @@#include <string.h> #include <rte_string_fns.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_errno.h> #include <rte_tailq.h>
lib/member/rte_member.h +0 -1
@@ -52,7 +52,6 @@ extern "C" {#include <stdint.h> #include <rte_common.h> -#include <rte_config.h> /** The set ID type that stored internally in hash table based set summary. */ typedef uint16_t member_set_t ;
lib/member/rte_member_vbf.c +0 -1
@@ -6,7 +6,6 @@#include <string.h> #include <rte_malloc.h> -#include <rte_memory.h> #include <rte_errno.h> #include <rte_log.h>
Signature · 1 line
2.25.1
PATCH v4 29/53 mbuf: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/mbuf/rte_mbuf.c | 11 ----------- lib/mbuf/rte_mbuf.h | 2 -- lib/mbuf/rte_mbuf_dyn.h | 2 -- lib/mbuf/rte_mbuf_pool_ops.c | 1 - lib/mbuf/rte_mbuf_pool_ops.h | 1 - 5 files changed, 17 deletions(-)
lib/mbuf/rte_mbuf.c +0 -11
@@ -5,28 +5,17 @@#include <string.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <errno.h> -#include <ctype.h> -#include <sys/queue.h> -#include <rte_compat.h> #include <rte_debug.h> #include <rte_common.h> #include <rte_log.h> -#include <rte_memory.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_mempool.h> #include <rte_mbuf.h> #include <rte_mbuf_pool_ops.h> -#include <rte_string_fns.h> #include <rte_hexdump.h> #include <rte_errno.h> #include <rte_memcpy.h>
lib/mbuf/rte_mbuf.h +0 -2
@@ -36,10 +36,8 @@#include <rte_common.h> #include <rte_config.h> #include <rte_mempool.h> -#include <rte_memory.h> #include <rte_prefetch.h> #include <rte_branch_prediction.h> -#include <rte_byteorder.h> #include <rte_mbuf_ptype.h> #include <rte_mbuf_core.h>
lib/mbuf/rte_mbuf_dyn.h +0 -2
@@ -68,9 +68,7 @@#include <stdio.h> #include <stdint.h> -#include <sys/types.h> -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
lib/mbuf/rte_mbuf_pool_ops.c +0 -1
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <rte_compat.h> #include <rte_eal.h> #include <rte_mbuf.h> #include <rte_errno.h>
lib/mbuf/rte_mbuf_pool_ops.h +0 -1
@@ -14,7 +14,6 @@* the best mempool ops available. */ -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
Signature · 1 line
2.25.1
PATCH v4 30/53 lpm: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/lpm/rte_lpm.c | 7 ------- lib/lpm/rte_lpm.h | 4 ---- lib/lpm/rte_lpm6.c | 7 ------- lib/lpm/rte_lpm6.h | 1 - 4 files changed, 19 deletions(-)
lib/lpm/rte_lpm.c +0 -7
@@ -6,22 +6,15 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <stdarg.h> #include <stdio.h> #include <sys/queue.h> #include <rte_log.h> -#include <rte_branch_prediction.h> #include <rte_common.h> -#include <rte_memory.h> /* for definition of RTE_CACHE_LINE_SIZE */ #include <rte_malloc.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> #include <rte_string_fns.h> #include <rte_errno.h> -#include <rte_rwlock.h> -#include <rte_spinlock.h> #include <rte_tailq.h> #include "rte_lpm.h"
lib/lpm/rte_lpm.h +0 -4
@@ -12,13 +12,9 @@*/ #include <errno.h> -#include <sys/queue.h> #include <stdint.h> -#include <stdlib.h> #include <rte_branch_prediction.h> #include <rte_byteorder.h> -#include <rte_config.h> -#include <rte_memory.h> #include <rte_common.h> #include <rte_vect.h> #include <rte_rcu_qsbr.h>
lib/lpm/rte_lpm6.c +0 -7
@@ -4,23 +4,16 @@#include <string.h> #include <stdint.h> #include <errno.h> -#include <stdarg.h> #include <stdio.h> #include <sys/queue.h> #include <rte_log.h> -#include <rte_branch_prediction.h> #include <rte_common.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_memcpy.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> #include <rte_string_fns.h> #include <rte_errno.h> -#include <rte_rwlock.h> -#include <rte_spinlock.h> #include <rte_hash.h> #include <assert.h> #include <rte_jhash.h>
lib/lpm/rte_lpm6.h +0 -1
@@ -10,7 +10,6 @@*/ #include <stdint.h> -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
Signature · 1 line
2.25.1
PATCH v4 31/53 latencystats: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/latencystats/rte_latencystats.c | 4 ---- 1 file changed, 4 deletions(-)
lib/latencystats/rte_latencystats.c +0 -4
@@ -2,13 +2,9 @@* Copyright(c) 2018 Intel Corporation */ -#include <unistd.h> -#include <sys/types.h> -#include <stdbool.h> #include <math.h> #include <rte_string_fns.h> -#include <rte_mbuf.h> #include <rte_mbuf_dyn.h> #include <rte_log.h> #include <rte_cycles.h>
Signature · 1 line
2.25.1
PATCH v4 32/53 kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 1 - 1 file changed, 1 deletion(-)
lib/kvargs/rte_kvargs.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
PATCH v4 33/53 kni: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kni/rte_kni.c | 2 -- lib/kni/rte_kni.h | 2 -- 2 files changed, 4 deletions(-)
lib/kni/rte_kni.c +0 -2
@@ -12,7 +12,6 @@#include <sys/ioctl.h> #include <linux/version.h> -#include <rte_spinlock.h> #include <rte_string_fns.h> #include <rte_ethdev.h> #include <rte_malloc.h>
@@ -20,7 +19,6 @@#include <rte_kni.h> #include <rte_memzone.h> #include <rte_tailq.h> -#include <rte_rwlock.h> #include <rte_eal_memconfig.h> #include <rte_kni_common.h> #include "rte_kni_fifo.h"
lib/kni/rte_kni.h +0 -2
@@ -18,8 +18,6 @@*/ #include <rte_pci.h> -#include <rte_memory.h> -#include <rte_mempool.h> #include <rte_ether.h> #include <rte_kni_common.h>
Signature · 1 line
2.25.1
PATCH v4 34/53 jobstats: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/jobstats/rte_jobstats.c | 3 --- 1 file changed, 3 deletions(-)
lib/jobstats/rte_jobstats.c +0 -3
@@ -7,10 +7,7 @@#include <errno.h> #include <rte_string_fns.h> -#include <rte_errno.h> #include <rte_common.h> -#include <rte_eal.h> -#include <rte_log.h> #include <rte_cycles.h> #include <rte_branch_prediction.h>
Signature · 1 line
2.25.1
PATCH v4 35/53 ipsec: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ipsec/esp_inb.c | 1 - lib/ipsec/esp_outb.c | 1 - lib/ipsec/ipsec_sad.c | 1 - lib/ipsec/sa.c | 3 --- lib/ipsec/sa.h | 1 - 5 files changed, 7 deletions(-)
lib/ipsec/esp_inb.c +0 -1
@@ -4,7 +4,6 @@#include <rte_ipsec.h> #include <rte_esp.h> -#include <rte_ip.h> #include <rte_errno.h> #include <rte_cryptodev.h>
lib/ipsec/esp_outb.c +0 -1
@@ -4,7 +4,6 @@#include <rte_ipsec.h> #include <rte_esp.h> -#include <rte_ip.h> #include <rte_udp.h> #include <rte_errno.h> #include <rte_cryptodev.h>
lib/ipsec/ipsec_sad.c +0 -1
@@ -10,7 +10,6 @@#include <rte_hash_crc.h> #include <rte_malloc.h> #include <rte_random.h> -#include <rte_rwlock.h> #include <rte_tailq.h> #include "rte_ipsec_sad.h"
lib/ipsec/sa.c +0 -3
@@ -7,14 +7,11 @@#include <rte_ip.h> #include <rte_udp.h> #include <rte_errno.h> -#include <rte_cryptodev.h> #include "sa.h" #include "ipsec_sqn.h" #include "crypto.h" -#include "iph.h" #include "misc.h" -#include "pad.h" #define MBUF_MAX_L2_LEN RTE_LEN2MASK(RTE_MBUF_L2_LEN_BITS, uint64_t)#define MBUF_MAX_L3_LEN RTE_LEN2MASK(RTE_MBUF_L3_LEN_BITS, uint64_t)
lib/ipsec/sa.h +0 -1
@@ -5,7 +5,6 @@#ifndef _SA_H_#define _SA_H_ -#include <rte_rwlock.h> #define IPSEC_MAX_HDR_SIZE 64#define IPSEC_MAX_IV_SIZE 16
Signature · 1 line
2.25.1
PATCH v4 36/53 ip_frag: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ip_frag/rte_ip_frag_common.c | 1 - lib/ip_frag/rte_ipv4_fragmentation.c | 2 -- 2 files changed, 3 deletions(-)
lib/ip_frag/rte_ip_frag_common.c +0 -1
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdio.h> -#include <rte_memory.h> #include <rte_log.h> #include "ip_frag_common.h"
lib/ip_frag/rte_ipv4_fragmentation.c +0 -2
@@ -6,8 +6,6 @@#include <errno.h> #include <rte_memcpy.h> -#include <rte_mempool.h> -#include <rte_debug.h> #include <rte_ether.h> #include "ip_frag_common.h"
Signature · 1 line
2.25.1
PATCH v4 37/53 hash: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/hash/rte_cuckoo_hash.c | 4 ---- lib/hash/rte_fbk_hash.c | 6 ------ lib/hash/rte_fbk_hash.h | 1 - lib/hash/rte_thash.c | 1 - lib/hash/rte_thash.h | 1 - 5 files changed, 13 deletions(-)
lib/hash/rte_cuckoo_hash.c +0 -4
@@ -7,7 +7,6 @@#include <stdint.h> #include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <sys/queue.h> #include <rte_common.h>
@@ -16,14 +15,11 @@#include <rte_prefetch.h> #include <rte_branch_prediction.h> #include <rte_malloc.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> #include <rte_rwlock.h> -#include <rte_spinlock.h> #include <rte_ring_elem.h> #include <rte_compat.h> #include <rte_vect.h>
lib/hash/rte_fbk_hash.c +0 -6
@@ -4,22 +4,16 @@#include <stdint.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> #include <errno.h> #include <sys/queue.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_malloc.h> #include <rte_common.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> -#include <rte_cpuflags.h> #include <rte_log.h> -#include <rte_spinlock.h> #include <rte_tailq.h> #include "rte_fbk_hash.h"
lib/hash/rte_fbk_hash.h +0 -1
@@ -24,7 +24,6 @@ extern "C" {#include <string.h> -#include <rte_config.h> #include <rte_hash_crc.h> #include <rte_jhash.h>
lib/hash/rte_thash.c +0 -1
@@ -9,7 +9,6 @@#include <rte_random.h> #include <rte_memcpy.h> #include <rte_errno.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_log.h> #include <rte_malloc.h>
lib/hash/rte_thash.h +0 -1
@@ -21,7 +21,6 @@ extern "C" {#include <stdint.h> #include <rte_byteorder.h> -#include <rte_config.h> #include <rte_ip.h> #include <rte_common.h> #include <rte_thash_gfni.h>
Signature · 1 line
2.25.1
PATCH v4 38/53 gro: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/gro/gro_tcp4.c | 1 - lib/gro/gro_tcp4.h | 2 -- lib/gro/gro_udp4.c | 1 - lib/gro/gro_udp4.h | 2 -- lib/gro/gro_vxlan_tcp4.c | 1 - lib/gro/gro_vxlan_udp4.c | 1 - lib/gro/rte_gro.c | 1 - 7 files changed, 9 deletions(-)
lib/gro/gro_tcp4.c +0 -1
@@ -4,7 +4,6 @@#include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_cycles.h> #include <rte_ethdev.h> #include "gro_tcp4.h"
lib/gro/gro_tcp4.h +0 -2
@@ -5,9 +5,7 @@#ifndef _GRO_TCP4_H_#define _GRO_TCP4_H_ -#include <rte_ip.h> #include <rte_tcp.h> -#include <rte_vxlan.h> #define INVALID_ARRAY_INDEX 0xffffffffUL#define GRO_TCP4_TBL_MAX_ITEM_NUM (1024UL * 1024UL)
lib/gro/gro_udp4.c +0 -1
@@ -4,7 +4,6 @@#include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_cycles.h> #include <rte_ethdev.h> #include "gro_udp4.h"
lib/gro/gro_udp4.h +0 -2
@@ -6,8 +6,6 @@#define _GRO_UDP4_H_#include <rte_ip.h> -#include <rte_udp.h> -#include <rte_vxlan.h> #define INVALID_ARRAY_INDEX 0xffffffffUL#define GRO_UDP4_TBL_MAX_ITEM_NUM (1024UL * 1024UL)
lib/gro/gro_vxlan_tcp4.c +0 -1
@@ -4,7 +4,6 @@#include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_cycles.h> #include <rte_ethdev.h> #include <rte_udp.h>
lib/gro/gro_vxlan_udp4.c +0 -1
@@ -4,7 +4,6 @@#include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_cycles.h> #include <rte_ethdev.h> #include <rte_udp.h>
lib/gro/rte_gro.c +0 -1
@@ -3,7 +3,6 @@*/ #include <rte_malloc.h> -#include <rte_mbuf.h> #include <rte_cycles.h> #include <rte_ethdev.h>
Signature · 1 line
2.25.1
PATCH v4 39/53 graph: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/graph/graph_debug.c | 2 -- lib/graph/graph_ops.c | 1 - lib/graph/graph_populate.c | 2 -- lib/graph/node.c | 1 - 4 files changed, 6 deletions(-)
lib/graph/graph_debug.c +0 -2
@@ -2,8 +2,6 @@* Copyright(C) 2020 Marvell International Ltd. */ -#include <rte_common.h> -#include <rte_debug.h> #include "graph_private.h"
lib/graph/graph_ops.c +0 -1
@@ -5,7 +5,6 @@#include <stdbool.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include "graph_private.h"
lib/graph/graph_populate.c +0 -2
@@ -2,8 +2,6 @@* Copyright(C) 2020 Marvell International Ltd. */ -#include <fnmatch.h> -#include <stdbool.h> #include <rte_common.h> #include <rte_errno.h>
lib/graph/node.c +0 -1
@@ -8,7 +8,6 @@#include <rte_common.h> #include <rte_debug.h> -#include <rte_eal.h> #include <rte_errno.h> #include <rte_string_fns.h>
Signature · 1 line
2.25.1
PATCH v4 40/53 gpudev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/gpudev/gpudev.c | 1 - 1 file changed, 1 deletion(-)
lib/gpudev/gpudev.c +0 -1
@@ -4,7 +4,6 @@#include <rte_eal.h> #include <rte_tailq.h> -#include <rte_rwlock.h> #include <rte_string_fns.h> #include <rte_memzone.h> #include <rte_malloc.h>
Signature · 1 line
2.25.1
PATCH v4 41/53 flow_classify: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/flow_classify/rte_flow_classify.c | 3 --- lib/flow_classify/rte_flow_classify.h | 4 ---- lib/flow_classify/rte_flow_classify_parse.c | 1 - lib/flow_classify/rte_flow_classify_parse.h | 1 - 4 files changed, 9 deletions(-)
lib/flow_classify/rte_flow_classify.c +0 -3
@@ -3,12 +3,9 @@*/ #include <rte_string_fns.h> -#include <rte_compat.h> #include <rte_flow_classify.h> #include "rte_flow_classify_parse.h" -#include <rte_flow_driver.h> #include <rte_table_acl.h> -#include <stdbool.h> static uint32_t unique_id =1 ;
lib/flow_classify/rte_flow_classify.h +0 -4
@@ -45,11 +45,7 @@#include <rte_compat.h> #include <rte_common.h> -#include <rte_ethdev.h> -#include <rte_ether.h> #include <rte_flow.h> -#include <rte_acl.h> -#include <rte_table_acl.h> #ifdef __cplusplusextern "C" {
lib/flow_classify/rte_flow_classify_parse.c +0 -1
@@ -4,7 +4,6 @@#include <rte_flow_classify.h> #include "rte_flow_classify_parse.h" -#include <rte_flow_driver.h> struct classify_valid_pattern {enum rte_flow_item_type *items;
lib/flow_classify/rte_flow_classify_parse.h +0 -1
@@ -6,7 +6,6 @@#define _RTE_FLOW_CLASSIFY_PARSE_H_#include <rte_ethdev.h> -#include <rte_ether.h> #include <rte_flow.h> #include <stdbool.h>
Signature · 1 line
2.25.1
PATCH v4 42/53 fib: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/fib/dir24_8.c | 4 ---- lib/fib/rte_fib.c | 2 -- lib/fib/rte_fib.h | 1 - lib/fib/rte_fib6.c | 2 -- lib/fib/rte_fib6.h | 1 - lib/fib/trie.c | 5 ----- lib/fib/trie.h | 2 -- 7 files changed, 17 deletions(-)
lib/fib/dir24_8.c +0 -4
@@ -4,15 +4,11 @@*/ #include <stdint.h> -#include <stdlib.h> #include <stdio.h> -#include <string.h> -#include <inttypes.h> #include <rte_debug.h> #include <rte_malloc.h> #include <rte_errno.h> -#include <rte_memory.h> #include <rte_vect.h> #include <rte_rib.h>
lib/fib/rte_fib.c +0 -2
@@ -6,11 +6,9 @@#include <stdint.h> #include <string.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_malloc.h> -#include <rte_rwlock.h> #include <rte_string_fns.h> #include <rte_tailq.h>
lib/fib/rte_fib.h +0 -1
@@ -17,7 +17,6 @@#include <stdint.h> -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
lib/fib/rte_fib6.c +0 -2
@@ -6,11 +6,9 @@#include <stdint.h> #include <string.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_tailq.h> #include <rte_errno.h> -#include <rte_rwlock.h> #include <rte_malloc.h> #include <rte_string_fns.h>
lib/fib/rte_fib6.h +0 -1
@@ -17,7 +17,6 @@#include <stdint.h> -#include <rte_compat.h> #ifdef __cplusplusextern "C" {
lib/fib/trie.c +0 -5
@@ -4,16 +4,11 @@*/ #include <stdint.h> -#include <stdlib.h> #include <stdio.h> -#include <string.h> -#include <inttypes.h> #include <rte_debug.h> #include <rte_malloc.h> #include <rte_errno.h> -#include <rte_memory.h> -#include <rte_vect.h> #include <rte_rib6.h> #include <rte_fib6.h>
lib/fib/trie.h +0 -2
@@ -10,8 +10,6 @@* @file * RTE IPv6 Longest Prefix Match (LPM) */ -#include <rte_prefetch.h> -#include <rte_branch_prediction.h> /* @internal Total number of tbl24 entries. */ #define TRIE_TBL24_NUM_ENT (1 << 24)
Signature · 1 line
2.25.1
PATCH v4 43/53 eventdev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eventdev/rte_event_ring.c | 6 ------ lib/eventdev/rte_event_ring.h | 2 -- lib/eventdev/rte_event_timer_adapter.c | 5 ----- lib/eventdev/rte_event_timer_adapter.h | 2 -- lib/eventdev/rte_eventdev.c | 11 ----------- lib/eventdev/rte_eventdev.h | 2 -- 6 files changed, 28 deletions(-)
lib/eventdev/rte_event_ring.c +0 -6
@@ -3,13 +3,7 @@* Copyright(c) 2019 Arm Limited */ -#include <sys/queue.h> -#include <string.h> -#include <rte_tailq.h> -#include <rte_memzone.h> -#include <rte_rwlock.h> -#include <rte_eal_memconfig.h> #include "rte_event_ring.h" int
lib/eventdev/rte_event_ring.h +0 -2
@@ -17,8 +17,6 @@#include <stdint.h> #include <rte_common.h> -#include <rte_memory.h> -#include <rte_malloc.h> #include <rte_ring.h> #include <rte_ring_elem.h> #include "rte_eventdev.h"
lib/eventdev/rte_event_timer_adapter.c +0 -5
@@ -6,19 +6,14 @@#include <string.h> #include <inttypes.h> #include <stdbool.h> -#include <sys/queue.h> #include <rte_memzone.h> -#include <rte_memory.h> -#include <rte_dev.h> #include <rte_errno.h> #include <rte_malloc.h> -#include <rte_ring.h> #include <rte_mempool.h> #include <rte_common.h> #include <rte_timer.h> #include <rte_service_component.h> -#include <rte_cycles.h> #include "event_timer_adapter_pmd.h" #include "eventdev_pmd.h"
lib/eventdev/rte_event_timer_adapter.h +0 -2
@@ -111,8 +111,6 @@extern "C" {#endif -#include <rte_spinlock.h> -#include <rte_memory.h> #include "rte_eventdev.h" #include "rte_eventdev_trace_fp.h"
lib/eventdev/rte_eventdev.c +0 -11
@@ -6,26 +6,15 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <errno.h> #include <stdint.h> #include <inttypes.h> -#include <sys/types.h> -#include <sys/queue.h> #include <rte_string_fns.h> -#include <rte_byteorder.h> #include <rte_log.h> -#include <rte_debug.h> #include <rte_dev.h> -#include <rte_memory.h> -#include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_errno.h>
lib/eventdev/rte_eventdev.h +0 -2
@@ -211,10 +211,8 @@ extern "C" {#endif #include <rte_common.h> -#include <rte_config.h> #include <rte_errno.h> #include <rte_mbuf_pool_ops.h> -#include <rte_memory.h> #include <rte_mempool.h> #include "rte_eventdev_trace_fp.h"
Signature · 1 line
2.25.1
PATCH v4 44/53 efd: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/efd/rte_efd.c | 3 --- 1 file changed, 3 deletions(-)
lib/efd/rte_efd.c +0 -3
@@ -6,7 +6,6 @@#include <stdint.h> #include <inttypes.h> #include <errno.h> -#include <stdarg.h> #include <sys/queue.h> #include <rte_string_fns.h>
@@ -21,11 +20,9 @@#include <rte_jhash.h> #include <rte_hash_crc.h> #include <rte_tailq.h> -#include <rte_vect.h> #include "rte_efd.h" #if defined(RTE_ARCH_X86 ) -#include "rte_efd_x86.h" #elif defined(RTE_ARCH_ARM64 )#include "rte_efd_arm64.h" #endif
Signature · 1 line
2.25.1
PATCH v4 45/53 eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/linux/eal_thread.c | 1 - 1 file changed, 1 deletion(-)
lib/eal/linux/eal_thread.c +0 -1
@@ -10,7 +10,6 @@#include <sys/syscall.h> #include <rte_debug.h> -#include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> #include <rte_eal.h>
Signature · 1 line
2.25.1
PATCH v4 46/53 dmadev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/dmadev/rte_dmadev.h | 1 - 1 file changed, 1 deletion(-)
lib/dmadev/rte_dmadev.h +0 -1
@@ -149,7 +149,6 @@#include <rte_bitops.h> #include <rte_common.h> #include <rte_compat.h> -#include <rte_dev.h> #ifdef __cplusplusextern "C" {
Signature · 1 line
2.25.1
PATCH v4 47/53 distributor: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/distributor/rte_distributor.c | 2 -- lib/distributor/rte_distributor_match_sse.c | 2 -- lib/distributor/rte_distributor_single.c | 2 -- 3 files changed, 6 deletions(-)
lib/distributor/rte_distributor.c +0 -2
@@ -6,7 +6,6 @@#include <sys/queue.h> #include <string.h> #include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_cycles.h> #include <rte_memzone.h> #include <rte_errno.h>
@@ -14,7 +13,6 @@#include <rte_eal_memconfig.h> #include <rte_pause.h> #include <rte_tailq.h> -#include <rte_vect.h> #include "rte_distributor.h" #include "rte_distributor_single.h"
lib/distributor/rte_distributor_match_sse.c +0 -2
@@ -3,10 +3,8 @@*/ #include <rte_mbuf.h> -#include "rte_distributor.h" #include "distributor_private.h" #include "smmintrin.h" -#include "nmmintrin.h" void
lib/distributor/rte_distributor_single.c +0 -2
@@ -4,9 +4,7 @@#include <stdio.h> #include <sys/queue.h> -#include <string.h> #include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_errno.h> #include <rte_string_fns.h>
Signature · 1 line
2.25.1
PATCH v4 48/53 compressdev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/compressdev/rte_comp.c | 1 - lib/compressdev/rte_comp.h | 1 - lib/compressdev/rte_compressdev.c | 1 - lib/compressdev/rte_compressdev.h | 1 - lib/compressdev/rte_compressdev_pmd.h | 2 -- 5 files changed, 6 deletions(-)
lib/compressdev/rte_comp.c +0 -1
@@ -3,7 +3,6 @@*/ #include "rte_comp.h" -#include "rte_compressdev.h" #include "rte_compressdev_internal.h" const char *
lib/compressdev/rte_comp.h +0 -1
@@ -16,7 +16,6 @@extern "C" {#endif -#include <rte_mempool.h> #include <rte_mbuf.h> /**
lib/compressdev/rte_compressdev.c +0 -1
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <stdarg.h> #include <stdio.h> #include <inttypes.h>
lib/compressdev/rte_compressdev.h +0 -1
@@ -21,7 +21,6 @@extern "C" {#endif -#include <rte_common.h> #include "rte_comp.h"
lib/compressdev/rte_compressdev_pmd.h +0 -2
@@ -19,8 +19,6 @@ extern "C" {#include <string.h> -#include <rte_dev.h> -#include <rte_common.h> #include "rte_compressdev.h" #include "rte_compressdev_internal.h"
Signature · 1 line
2.25.1
PATCH v4 49/53 cmdline: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/cmdline/cmdline.c | 2 -- lib/cmdline/cmdline_cirbuf.c | 1 - lib/cmdline/cmdline_cirbuf.h | 1 - lib/cmdline/cmdline_parse.c | 3 --- lib/cmdline/cmdline_parse_num.c | 4 ---- lib/cmdline/cmdline_parse_portlist.c | 3 --- lib/cmdline/cmdline_parse_string.c | 4 ---- lib/cmdline/cmdline_rdline.c | 2 -- lib/cmdline/cmdline_socket.c | 5 ----- lib/cmdline/cmdline_socket.h | 1 - lib/cmdline/cmdline_vt100.c | 3 --- 11 files changed, 29 deletions(-)
lib/cmdline/cmdline.c +0 -2
@@ -9,8 +9,6 @@#include <unistd.h> #include <stdlib.h> #include <stdarg.h> -#include <inttypes.h> -#include <fcntl.h> #include <errno.h> #include <rte_string_fns.h>
lib/cmdline/cmdline_cirbuf.c +0 -1
@@ -6,7 +6,6 @@#include <string.h> #include <errno.h> -#include <stdio.h> #include "cmdline_cirbuf.h"
lib/cmdline/cmdline_cirbuf.h +0 -1
@@ -7,7 +7,6 @@ #ifndef _CIRBUF_H_ #define _CIRBUF_H_ -#include <rte_config.h> #ifdef __cplusplus extern "C" {
lib/cmdline/cmdline_parse.c +0 -3
@@ -5,11 +5,8 @@*/ #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <string.h> -#include <inttypes.h> -#include <ctype.h> #include <rte_string_fns.h>
lib/cmdline/cmdline_parse_num.c +0 -4
@@ -6,11 +6,7 @@#include <stdio.h> #include <stdint.h> -#include <inttypes.h> -#include <ctype.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_string_fns.h> #include "cmdline_parse.h"
lib/cmdline/cmdline_parse_portlist.c +0 -3
@@ -6,11 +6,8 @@#include <stdio.h> #include <stdlib.h> -#include <inttypes.h> -#include <ctype.h> #include <string.h> #include <errno.h> -#include <stdarg.h> #include <rte_string_fns.h> #include "cmdline_parse.h"
lib/cmdline/cmdline_parse_string.c +0 -4
@@ -5,11 +5,7 @@*/ #include <stdio.h> -#include <inttypes.h> -#include <ctype.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_string_fns.h> #include "cmdline_parse.h"
lib/cmdline/cmdline_rdline.c +0 -2
@@ -6,9 +6,7 @@#include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <string.h> -#include <stdarg.h> #include <errno.h> #include <ctype.h>
lib/cmdline/cmdline_socket.c +0 -5
@@ -5,11 +5,6 @@*/ #include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdarg.h> -#include <inttypes.h> #include <fcntl.h> #include "cmdline.h"
lib/cmdline/cmdline_socket.h +0 -1
@@ -8,7 +8,6 @@#define _CMDLINE_SOCKET_H_#include <cmdline_parse.h> -#include <cmdline.h> #ifdef __cplusplusextern "C" {
lib/cmdline/cmdline_vt100.c +0 -3
@@ -4,12 +4,9 @@* All rights reserved. */ -#include <stdlib.h> #include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <ctype.h> #include "cmdline_vt100.h"
Signature · 1 line
2.25.1
PATCH v4 50/53 bpf: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/bpf/bpf.c | 4 ---- lib/bpf/bpf_exec.c | 6 ------ lib/bpf/bpf_jit_x86.c | 5 ----- lib/bpf/bpf_load.c | 8 -------- lib/bpf/bpf_pkt.c | 12 ------------ lib/bpf/bpf_validate.c | 3 --- 6 files changed, 38 deletions(-)
lib/bpf/bpf.c +0 -4
@@ -2,15 +2,11 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <stdio.h> -#include <string.h> #include <errno.h> #include <stdint.h> -#include <inttypes.h> #include <rte_common.h> -#include <rte_eal.h> #include "bpf_impl.h"
lib/bpf/bpf_exec.c +0 -6
@@ -2,18 +2,12 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <stdio.h> -#include <string.h> -#include <errno.h> #include <stdint.h> -#include <inttypes.h> #include <rte_common.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_byteorder.h> #include "bpf_impl.h"
lib/bpf/bpf_jit_x86.c +0 -5
@@ -2,17 +2,12 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <errno.h> #include <stdint.h> -#include <inttypes.h> #include <rte_common.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_byteorder.h> #include "bpf_impl.h"
lib/bpf/bpf_load.c +0 -8
@@ -2,20 +2,12 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <stdint.h> -#include <unistd.h> -#include <inttypes.h> -#include <rte_common.h> #include <rte_log.h> -#include <rte_debug.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_byteorder.h> #include <rte_errno.h> #include "bpf_impl.h"
lib/bpf/bpf_pkt.c +0 -12
@@ -2,28 +2,16 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <stdint.h> -#include <unistd.h> -#include <inttypes.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> #include <sys/queue.h> #include <rte_common.h> -#include <rte_byteorder.h> #include <rte_malloc.h> #include <rte_log.h> -#include <rte_debug.h> -#include <rte_cycles.h> -#include <rte_eal.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_atomic.h> #include <rte_mbuf.h> #include <rte_ethdev.h>
lib/bpf/bpf_validate.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2018 Intel Corporation */ -#include <stdarg.h> #include <stdio.h> #include <string.h> #include <errno.h>
@@ -10,8 +9,6 @@#include <inttypes.h> #include <rte_common.h> -#include <rte_eal.h> -#include <rte_byteorder.h> #include "bpf_impl.h"
Signature · 1 line
2.25.1
PATCH v4 51/53 bbdev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/bbdev/rte_bbdev.c | 4 ---- lib/bbdev/rte_bbdev.h | 4 ---- 2 files changed, 8 deletions(-)
lib/bbdev/rte_bbdev.c +0 -4
@@ -6,19 +6,15 @@#include <string.h> #include <stdbool.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_debug.h> #include <rte_eal.h> #include <rte_malloc.h> #include <rte_mempool.h> #include <rte_memzone.h> #include <rte_lcore.h> -#include <rte_dev.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include <rte_interrupts.h> #include "rte_bbdev_op.h"
lib/bbdev/rte_bbdev.h +0 -4
@@ -26,12 +26,8 @@ extern "C" {#include <stdint.h> #include <stdbool.h> -#include <string.h> -#include <rte_compat.h> -#include <rte_bus.h> #include <rte_cpuflags.h> -#include <rte_memory.h> #include "rte_bbdev_op.h"
Signature · 1 line
2.25.1
PATCH v4 52/53 cryptodev: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/cryptodev/cryptodev_pmd.h | 4 ---- lib/cryptodev/rte_cryptodev.c | 11 ----------- lib/cryptodev/rte_cryptodev.h | 2 -- 3 files changed, 17 deletions(-)
lib/cryptodev/cryptodev_pmd.h +0 -4
@@ -15,11 +15,7 @@#include <string.h> -#include <rte_config.h> -#include <rte_dev.h> #include <rte_malloc.h> -#include <rte_mbuf.h> -#include <rte_mempool.h> #include <rte_log.h> #include <rte_common.h>
lib/cryptodev/rte_cryptodev.c +0 -11
@@ -2,36 +2,25 @@* Copyright(c) 2015-2020 Intel Corporation */ -#include <sys/types.h> #include <sys/queue.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdarg.h> #include <errno.h> #include <stdint.h> #include <inttypes.h> -#include <rte_byteorder.h> #include <rte_log.h> #include <rte_debug.h> #include <rte_dev.h> -#include <rte_interrupts.h> #include <rte_memory.h> #include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_launch.h> -#include <rte_tailq.h> #include <rte_eal.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_common.h> #include <rte_mempool.h> #include <rte_malloc.h> -#include <rte_mbuf.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_string_fns.h>
lib/cryptodev/rte_cryptodev.h +0 -2
@@ -20,9 +20,7 @@ extern "C" {#include "rte_kvargs.h" #include "rte_crypto.h" -#include "rte_dev.h" #include <rte_common.h> -#include <rte_config.h> #include <rte_rcu_qsbr.h> #include "rte_cryptodev_trace_fp.h"
Signature · 1 line
2.25.1
PATCH v4 53/53 acl: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/acl/rte_acl.c | 1 - 1 file changed, 1 deletion(-)
lib/acl/rte_acl.c +0 -1
@@ -6,7 +6,6 @@#include <rte_string_fns.h> #include <rte_acl.h> #include <rte_tailq.h> -#include <rte_vect.h> #include "acl.h"
Signature · 1 line
2.25.1
v5 cover introduce IWYU
In reply to Sean MorrisseyThis patchset introduces the include-what-you-use script which removes unused header includes. IWYU GitHub:
https://github.com/include-what-you-use/include-what-you-use
Along with the script there are some patches which make a start on removing unneeded headers.
V4:
* Re-added removed headers that are now needed in order to fix build issues.
* Removed other unused headers from other libraries
V5:
* Fix build issues for RHEL 7.
* Squash commits for overlapping libraries.
Sean Morrissey (50):
devtools: script to remove unused headers includes
telemetry: remove unneeded header includes
ring: remove unneeded header includes
kvargs: remove unneeded header includes
eal: remove unneeded header includes
vhost: remove unneeded header includes
timer: remove unneeded header includes
table: remove unneeded header includes
stack: remove unneeded header includes
security: remove unneeded header includes
sched: remove unneeded header includes
rib: remove unneeded header includes
reorder: remove unneeded header includes
regexdev: remove unneeded header includes
rcu: remove unneeded header includes
rawdev: remove unneeded header includes
power: remove unneeded header includes
port: remove unneeded header includes
pipeline: remove unneeded header includes
pdump: remove unneeded header includes
pci: remove unneeded header includes
pcapng: remove unneeded header includes
node: remove unneeded header includes
net: remove unneeded header includes
metrics: remove unneeded header includes
mempool: remove unneeded header includes
member: remove unneeded header includes
mbuf: remove unneeded header includes
lpm: remove unneeded header includes
latencystats: remove unneeded header includes
kni: remove unneeded header includes
jobstats: remove unneeded header includes
ipsec: remove unneeded header includes
ip_frag: remove unneeded header includes
hash: remove unneeded header includes
gro: remove unneeded header includes
graph: remove unneeded header includes
gpudev: remove unneeded header includes
flow_classify: remove unneeded header includes
fib: remove unneeded header includes
eventdev: remove unneeded header includes
efd: remove unneeded header includes
dmadev: remove unneeded header includes
distributor: remove unneeded header includes
compressdev: remove unneeded header includes
cmdline: remove unneeded header includes
bpf: remove unneeded header includes
bbdev: remove unneeded header includes
cryptodev: remove unneeded header includes
acl: remove unneeded header includes
devtools/process_iwyu.py | 109 ++++++++++++++++++++ examples/vm_power_manager/guest_cli/main.c | 1 + lib/acl/rte_acl.c | 1 - lib/bbdev/rte_bbdev.c | 4 - lib/bbdev/rte_bbdev.h | 4 - lib/bpf/bpf.c | 4 - lib/bpf/bpf_exec.c | 6 -- lib/bpf/bpf_jit_x86.c | 5 - lib/bpf/bpf_load.c | 8 -- lib/bpf/bpf_pkt.c | 12 --- lib/bpf/bpf_validate.c | 3 - lib/cmdline/cmdline.c | 2 - lib/cmdline/cmdline_parse.c | 3 - lib/cmdline/cmdline_parse_num.c | 4 - lib/cmdline/cmdline_parse_portlist.c | 3 - lib/cmdline/cmdline_parse_string.c | 4 - lib/cmdline/cmdline_rdline.c | 2 - lib/cmdline/cmdline_vt100.c | 3 - lib/compressdev/rte_comp.c | 1 - lib/compressdev/rte_comp.h | 1 - lib/compressdev/rte_compressdev.c | 1 - lib/compressdev/rte_compressdev.h | 1 - lib/compressdev/rte_compressdev_pmd.h | 2 - lib/cryptodev/cryptodev_pmd.h | 4 - lib/cryptodev/rte_cryptodev.c | 11 -- lib/cryptodev/rte_cryptodev.h | 2 - lib/distributor/rte_distributor.c | 2 - lib/distributor/rte_distributor_match_sse.c | 2 - lib/distributor/rte_distributor_single.c | 2 - lib/dmadev/rte_dmadev.h | 1 - lib/eal/common/eal_common_dev.c | 5 - lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 - lib/eal/common/eal_common_fbarray.c | 3 - lib/eal/common/eal_common_hexdump.c | 3 - lib/eal/common/eal_common_launch.c | 6 -- lib/eal/common/eal_common_lcore.c | 7 +- lib/eal/common/eal_common_log.c | 2 - lib/eal/common/eal_common_memalloc.c | 3 - lib/eal/common/eal_common_memory.c | 5 - lib/eal/common/eal_common_memzone.c | 4 - lib/eal/common/eal_common_options.c | 2 - lib/eal/common/eal_common_proc.c | 2 - lib/eal/common/eal_common_string_fns.c | 2 - lib/eal/common/eal_common_tailqs.c | 11 -- lib/eal/common/eal_common_thread.c | 3 - lib/eal/common/eal_common_timer.c | 6 -- lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 -- lib/eal/common/malloc_heap.c | 5 - lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 - lib/eal/common/rte_malloc.c | 5 - lib/eal/common/rte_random.c | 3 - lib/eal/common/rte_service.c | 6 -- lib/eal/include/rte_version.h | 2 - lib/eal/linux/eal.c | 10 -- lib/eal/linux/eal_alarm.c | 7 -- lib/eal/linux/eal_cpuflags.c | 2 - lib/eal/linux/eal_debug.c | 5 - lib/eal/linux/eal_dev.c | 4 - lib/eal/linux/eal_hugepage_info.c | 7 -- lib/eal/linux/eal_interrupts.c | 8 -- lib/eal/linux/eal_lcore.c | 7 -- lib/eal/linux/eal_log.c | 11 +- lib/eal/linux/eal_memalloc.c | 8 -- lib/eal/linux/eal_memory.c | 9 -- lib/eal/linux/eal_thread.c | 6 -- lib/eal/linux/eal_timer.c | 15 --- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - lib/efd/rte_efd.c | 3 - lib/eventdev/rte_event_ring.c | 6 -- lib/eventdev/rte_event_ring.h | 2 - lib/eventdev/rte_event_timer_adapter.c | 5 - lib/eventdev/rte_event_timer_adapter.h | 2 - lib/eventdev/rte_eventdev.c | 11 -- lib/eventdev/rte_eventdev.h | 2 - lib/fib/dir24_8.c | 4 - lib/fib/rte_fib.c | 2 - lib/fib/rte_fib.h | 1 - lib/fib/rte_fib6.c | 2 - lib/fib/rte_fib6.h | 1 - lib/fib/trie.c | 5 - lib/fib/trie.h | 2 - lib/flow_classify/rte_flow_classify.c | 3 - lib/flow_classify/rte_flow_classify.h | 4 - lib/flow_classify/rte_flow_classify_parse.c | 1 - lib/flow_classify/rte_flow_classify_parse.h | 1 - lib/gpudev/gpudev.c | 1 - lib/graph/graph_debug.c | 2 - lib/graph/graph_ops.c | 1 - lib/graph/graph_populate.c | 2 - lib/graph/node.c | 1 - lib/gro/gro_tcp4.c | 1 - lib/gro/gro_tcp4.h | 2 - lib/gro/gro_udp4.c | 1 - lib/gro/gro_udp4.h | 2 - lib/gro/gro_vxlan_tcp4.c | 1 - lib/gro/gro_vxlan_udp4.c | 1 - lib/gro/rte_gro.c | 1 - lib/hash/rte_cuckoo_hash.c | 4 - lib/hash/rte_fbk_hash.c | 6 -- lib/hash/rte_fbk_hash.h | 1 - lib/hash/rte_thash.c | 1 - lib/hash/rte_thash.h | 1 - lib/ip_frag/rte_ip_frag_common.c | 1 - lib/ip_frag/rte_ipv4_fragmentation.c | 2 - lib/ipsec/esp_inb.c | 1 - lib/ipsec/esp_outb.c | 1 - lib/ipsec/ipsec_sad.c | 1 - lib/ipsec/sa.c | 3 - lib/ipsec/sa.h | 1 - lib/jobstats/rte_jobstats.c | 3 - lib/kni/rte_kni.c | 2 - lib/kni/rte_kni.h | 2 - lib/kvargs/rte_kvargs.c | 2 - lib/latencystats/rte_latencystats.c | 4 - lib/lpm/rte_lpm.c | 7 -- lib/lpm/rte_lpm.h | 4 - lib/lpm/rte_lpm6.c | 7 -- lib/lpm/rte_lpm6.h | 1 - lib/mbuf/rte_mbuf.c | 11 -- lib/mbuf/rte_mbuf.h | 2 - lib/mbuf/rte_mbuf_dyn.h | 2 - lib/mbuf/rte_mbuf_pool_ops.c | 1 - lib/mbuf/rte_mbuf_pool_ops.h | 1 - lib/member/rte_member.c | 2 - lib/member/rte_member.h | 1 - lib/member/rte_member_vbf.c | 1 - lib/mempool/rte_mempool.c | 7 -- lib/mempool/rte_mempool.h | 4 - lib/metrics/rte_metrics.c | 3 - lib/net/net_crc_avx512.c | 3 - lib/net/net_crc_sse.c | 1 - lib/net/rte_arp.c | 1 - lib/net/rte_ether.h | 1 - lib/net/rte_net.h | 1 - lib/net/rte_net_crc.c | 2 - lib/node/ethdev_ctrl.c | 2 - lib/node/ethdev_rx.c | 1 - lib/node/ethdev_tx.c | 1 - lib/node/ip4_lookup.c | 5 - lib/node/ip4_rewrite.c | 4 - lib/node/pkt_cls.c | 4 - lib/node/pkt_drop.c | 1 - lib/pcapng/rte_pcapng.c | 1 - lib/pcapng/rte_pcapng.h | 2 - lib/pci/rte_pci.c | 15 +-- lib/pci/rte_pci.h | 2 - lib/pdump/rte_pdump.c | 1 - lib/pdump/rte_pdump.h | 2 - lib/pipeline/rte_pipeline.c | 4 - lib/pipeline/rte_port_in_action.c | 2 - lib/pipeline/rte_swx_ctl.h | 2 - lib/pipeline/rte_swx_pipeline.c | 1 - lib/pipeline/rte_swx_pipeline.h | 1 - lib/pipeline/rte_swx_pipeline_spec.c | 1 - lib/pipeline/rte_table_action.c | 2 - lib/port/rte_port_fd.h | 1 - lib/port/rte_port_frag.c | 2 - lib/port/rte_port_frag.h | 1 - lib/port/rte_port_kni.c | 1 - lib/port/rte_port_kni.h | 1 - lib/port/rte_port_ras.c | 1 - lib/port/rte_port_ras.h | 1 - lib/port/rte_port_ring.h | 1 - lib/port/rte_port_sched.c | 1 - lib/port/rte_port_source_sink.c | 1 - lib/port/rte_swx_port_fd.c | 1 - lib/port/rte_swx_port_fd.h | 1 - lib/port/rte_swx_port_ring.h | 1 - lib/power/guest_channel.c | 2 - lib/power/power_acpi_cpufreq.c | 7 -- lib/power/power_acpi_cpufreq.h | 4 - lib/power/power_common.h | 1 - lib/power/power_cppc_cpufreq.c | 1 - lib/power/power_cppc_cpufreq.h | 4 - lib/power/power_kvm_vm.c | 1 - lib/power/power_kvm_vm.h | 4 - lib/power/power_pstate_cpufreq.c | 7 -- lib/power/power_pstate_cpufreq.h | 4 - lib/power/rte_power.c | 1 - lib/power/rte_power.h | 2 - lib/power/rte_power_empty_poll.c | 2 - lib/rawdev/rte_rawdev.c | 14 --- lib/rcu/rte_rcu_qsbr.c | 4 - lib/rcu/rte_rcu_qsbr.h | 4 - lib/regexdev/rte_regexdev.c | 2 - lib/regexdev/rte_regexdev.h | 3 - lib/reorder/rte_reorder.c | 1 - lib/rib/rte_rib.c | 2 - lib/rib/rte_rib.h | 1 - lib/rib/rte_rib6.c | 2 - lib/rib/rte_rib6.h | 1 - lib/ring/rte_ring.c | 9 -- lib/sched/rte_pie.c | 2 - lib/sched/rte_red.h | 1 - lib/sched/rte_sched.c | 1 - lib/sched/rte_sched.h | 1 - lib/security/rte_security.c | 2 - lib/security/rte_security.h | 3 - lib/stack/rte_stack.c | 2 - lib/stack/rte_stack.h | 1 - lib/table/rte_swx_table_em.c | 1 - lib/table/rte_swx_table_em.h | 1 - lib/table/rte_swx_table_learner.c | 1 - lib/table/rte_swx_table_learner.h | 1 - lib/table/rte_swx_table_selector.c | 1 - lib/table/rte_swx_table_wm.c | 2 - lib/table/rte_swx_table_wm.h | 1 - lib/table/rte_table_acl.c | 3 - lib/table/rte_table_array.c | 2 - lib/table/rte_table_hash_cuckoo.c | 2 - lib/table/rte_table_hash_ext.c | 2 - lib/table/rte_table_hash_key16.c | 2 - lib/table/rte_table_hash_key32.c | 2 - lib/table/rte_table_hash_key8.c | 2 - lib/table/rte_table_hash_lru.c | 2 - lib/table/rte_table_lpm.c | 2 - lib/table/rte_table_lpm_ipv6.c | 3 - lib/table/rte_table_stub.c | 1 - lib/table/rte_table_stub.h | 1 - lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - lib/timer/rte_timer.c | 7 -- lib/vhost/fd_man.c | 6 -- lib/vhost/fd_man.h | 1 - lib/vhost/socket.c | 1 - lib/vhost/vdpa.c | 1 - lib/vhost/vhost.c | 4 - lib/vhost/vhost.h | 2 - lib/vhost/vhost_user.c | 2 - 236 files changed, 113 insertions(+), 693 deletions(-) create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
PATCH v5 1/50 devtools: script to remove unused headers includes
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Remove headers flagged by iwyu_tool output file
$ ./devtools/process_iwyu.py iwyu.out -b build
Remove headers flagged by iwyu_tool output file from sub-directory
$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargs
Remove headers directly piped from the iwyu_tool
$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
--- devtools/process_iwyu.py | 109 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 devtools/process_iwyu.py
devtools/process_iwyu.py new file +109 -0
@@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation +# + +import argparse +import fileinput +import sys +from os.path import abspath, relpath, join +from pathlib import Path +from mesonbuild import mesonmain + + +def args_parse(): + "parse arguments and return the argument object back to main" + parser = argparse.ArgumentParser(description="This script can be used to remove includes which are not in use\n") + parser.add_argument('-b', '--build_dir', type=str, default='build', + help="The path to the build directory in which the IWYU tool was used in.") + parser.add_argument('-d', '--sub_dir', type=str, default='', + help="The sub-directory to remove headers from.") + parser.add_argument('file', type=Path, + help="The path to the IWYU log file or output from stdin.") + + return parser.parse_args() + + +def run_meson(args): + "Runs a meson command logging output to process.log" + with open('process_iwyu.log', 'a') as sys.stdout: + ret = mesonmain.run(args, abspath('meson')) + sys.stdout = sys.__stdout__ + return ret + + +def remove_includes(filepath, include, build_dir): + "Attempts to remove include, if it fails then revert to original state" + with open(filepath) as f: + lines = f.readlines() # Read lines when file is opened + + with open(filepath, 'w') as f: + for ln in lines: # Removes the include passed in + if not ln.startswith(include): + f.write(ln) + + # run test build -> call meson on the build folder, meson compile -C build + ret = run_meson(['compile', '-C', build_dir]) + if (ret == 0): # Include is not needed -> build is successful + print('SUCCESS') + else: + # failed, catch the error + # return file to original state + with open(filepath, 'w') as f: + f.writelines(lines) + print('FAILED') + + +def get_build_config(builddir, condition): + "returns contents of rte_build_config.h" + with open(join(builddir, 'rte_build_config.h')) as f: + return [ln for ln in f.readlines() if condition(ln)] + + +def uses_libbsd(builddir): + "return whether the build uses libbsd or not" + return bool(get_build_config(builddir, lambda ln: 'RTE_USE_LIBBSD' in ln)) + + +def process(args): + "process the iwyu output on a set of files" + filepath = None + build_dir = abspath(args.build_dir) + directory = args.sub_dir + + print("Warning: The results of this script may include false positives which are required for different systems", + file=sys.stderr) + + keep_str_fns = uses_libbsd(build_dir) # check for libbsd + if keep_str_fns: + print("Warning: libbsd is present, build will fail to detect incorrect removal of rte_string_fns.h", + file=sys.stderr) + # turn on werror + run_meson(['configure', build_dir, '-Dwerror=true']) + # Use stdin if no iwyu_tool out file given + for line in fileinput.input(args.file): + if 'should remove' in line: + # If the file path in the iwyu_tool output is an absolute path it + # means the file is outside of the dpdk directory, therefore ignore it. + # Also check to see if the file is within the specified sub directory. + filename = line.split()[0] + if (filename != abspath(filename) and + directory in filename): + filepath = relpath(join(build_dir, filename)) + elif line.startswith('-') and filepath: + include = '#include ' + line.split()[2] + print(f"Remove {include} from {filepath} ... ", end='', flush=True) + if keep_str_fns and '<rte_string_fns.h>' in include: + print('skipped') + continue + remove_includes(filepath, include, build_dir) + else: + filepath = None + + +def main(): + process(args_parse()) + + +if __name__ == '__main__': + main()
Signature · 1 line
2.25.1
Re: [PATCH v5 01/50] devtools: script to remove unused headers includes
17/01/2022 21:18, Sean Morrissey:
Quoted 7 lines
This script can be used for removing headers flagged for removal by the include-what-you-use (IWYU) tool. The script has the ability to remove headers from specified sub-directories or dpdk as a whole and tests the build after each removal by calling meson compile.
example usages:
Quoted 8 lines
Remove headers flagged by
iwyu_tooloutput file$ ./devtools/process_iwyu.py iwyu.out -b buildRemove headers flagged by
iwyu_tooloutput file from sub-directory$ ./devtools/process_iwyu.py iwyu.out -b build -d lib/kvargsRemove headers directly piped from the
iwyu_tool$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build
Can it be an automatic check per patch?
Or are we supposed to run it from time to time?
Quoted 4 lines
Signed-off-by Sean Morrissey <[email protected]>Signed-off-by Conor Fogarty <[email protected]>Reviewed-by Bruce Richardson <[email protected]>
Please no blank line between names.
I assume you checked with flake8?
PATCH v5 2/50 telemetry: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/telemetry/telemetry.c | 1 - lib/telemetry/telemetry_data.h | 1 - 2 files changed, 2 deletions(-)
lib/telemetry/telemetry.c +0 -1
@@ -8,7 +8,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> -#include <dlfcn.h> #endif /* !RTE_EXEC_ENV_WINDOWS */ /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
lib/telemetry/telemetry_data.h +0 -1
@@ -5,7 +5,6 @@#ifndef _TELEMETRY_DATA_H_#define _TELEMETRY_DATA_H_ -#include <inttypes.h> #include "rte_telemetry.h" enum tel_container_types {
Signature · 1 line
2.25.1
PATCH v5 3/50 ring: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/ring/rte_ring.c | 9 --------- 1 file changed, 9 deletions(-)
lib/ring/rte_ring.c +0 -9
@@ -8,7 +8,6 @@*/ #include <stdio.h> -#include <stdarg.h> #include <string.h> #include <stdint.h> #include <inttypes.h>
@@ -17,19 +16,11 @@#include <rte_common.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_memzone.h> #include <rte_malloc.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_atomic.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_string_fns.h> -#include <rte_spinlock.h> #include <rte_tailq.h> #include "rte_ring.h"
Signature · 1 line
2.25.1
PATCH v5 4/50 kvargs: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/kvargs/rte_kvargs.c | 2 -- 1 file changed, 2 deletions(-)
lib/kvargs/rte_kvargs.c +0 -2
@@ -7,8 +7,6 @@#include <stdlib.h> #include <stdbool.h> -#include <rte_os_shim.h> -#include <rte_string_fns.h> #include "rte_kvargs.h"
Signature · 1 line
2.25.1
PATCH v5 5/50 eal: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/eal/common/eal_common_dev.c | 5 ----- lib/eal/common/eal_common_devargs.c | 1 - lib/eal/common/eal_common_errno.c | 4 ---- lib/eal/common/eal_common_fbarray.c | 3 --- lib/eal/common/eal_common_hexdump.c | 3 --- lib/eal/common/eal_common_launch.c | 6 ------ lib/eal/common/eal_common_lcore.c | 7 +------ lib/eal/common/eal_common_log.c | 2 -- lib/eal/common/eal_common_memalloc.c | 3 --- lib/eal/common/eal_common_memory.c | 5 ----- lib/eal/common/eal_common_memzone.c | 4 ---- lib/eal/common/eal_common_options.c | 2 -- lib/eal/common/eal_common_proc.c | 2 -- lib/eal/common/eal_common_string_fns.c | 2 -- lib/eal/common/eal_common_tailqs.c | 11 ----------- lib/eal/common/eal_common_thread.c | 3 --- lib/eal/common/eal_common_timer.c | 6 ------ lib/eal/common/eal_common_trace.c | 1 - lib/eal/common/hotplug_mp.h | 1 - lib/eal/common/malloc_elem.c | 6 ------ lib/eal/common/malloc_heap.c | 5 ----- lib/eal/common/malloc_mp.c | 1 - lib/eal/common/malloc_mp.h | 2 -- lib/eal/common/rte_malloc.c | 5 ----- lib/eal/common/rte_random.c | 3 --- lib/eal/common/rte_service.c | 6 ------ lib/eal/include/rte_version.h | 2 -- lib/eal/linux/eal.c | 10 ---------- lib/eal/linux/eal_alarm.c | 7 ------- lib/eal/linux/eal_cpuflags.c | 2 -- lib/eal/linux/eal_debug.c | 5 ----- lib/eal/linux/eal_dev.c | 4 ---- lib/eal/linux/eal_hugepage_info.c | 7 ------- lib/eal/linux/eal_interrupts.c | 8 -------- lib/eal/linux/eal_lcore.c | 7 ------- lib/eal/linux/eal_log.c | 11 +---------- lib/eal/linux/eal_memalloc.c | 8 -------- lib/eal/linux/eal_memory.c | 9 --------- lib/eal/linux/eal_thread.c | 6 ------ lib/eal/linux/eal_timer.c | 15 --------------- lib/eal/linux/eal_vfio_mp_sync.c | 1 - lib/eal/unix/eal_file.c | 1 - lib/eal/unix/rte_thread.c | 1 - lib/eal/x86/rte_cycles.c | 1 - 44 files changed, 2 insertions(+), 202 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
@@ -5,20 +5,15 @@#include <stdio.h> #include <string.h> -#include <inttypes.h> #include <sys/queue.h> -#include <rte_compat.h> #include <rte_bus.h> #include <rte_class.h> #include <rte_dev.h> #include <rte_devargs.h> -#include <rte_debug.h> #include <rte_errno.h> -#include <rte_kvargs.h> #include <rte_log.h> #include <rte_spinlock.h> -#include <rte_malloc.h> #include <rte_string_fns.h> #include "eal_private.h"
lib/eal/common/eal_common_devargs.c +0 -1
@@ -12,7 +12,6 @@#include <rte_bus.h> #include <rte_class.h> -#include <rte_compat.h> #include <rte_dev.h> #include <rte_devargs.h> #include <rte_errno.h>
lib/eal/common/eal_common_errno.c +0 -4
@@ -5,15 +5,11 @@/* Use XSI-compliant portable version of strerror_r() */ #undef _GNU_SOURCE -#include <stdint.h> #include <stdio.h> #include <string.h> -#include <stdarg.h> -#include <errno.h> #include <rte_per_lcore.h> #include <rte_errno.h> -#include <rte_string_fns.h> #ifdef RTE_EXEC_ENV_WINDOWS #define strerror_r (errnum, buf, buflen) strerror_s(buf, buflen, errnum)
lib/eal/common/eal_common_fbarray.c +0 -3
@@ -2,7 +2,6 @@* Copyright(c) 2017-2018 Intel Corporation */ -#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h>
@@ -14,9 +13,7 @@#include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_log.h> -#include <rte_memory.h> #include <rte_spinlock.h> -#include <rte_tailq.h> #include "eal_filesystem.h" #include "eal_private.h"
lib/eal/common/eal_common_hexdump.c +0 -3
@@ -1,10 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> -#include <errno.h> -#include <stdint.h> #include <rte_hexdump.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_launch.c +0 -6
@@ -3,16 +3,10 @@*/ #include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/queue.h> #include <rte_launch.h> -#include <rte_memory.h> -#include <rte_eal.h> #include <rte_atomic.h> #include <rte_pause.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include "eal_private.h"
lib/eal/common/eal_common_lcore.c +1 -6
@@ -2,19 +2,14 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <unistd.h> -#include <limits.h> #include <string.h> #include <rte_common.h> -#include <rte_debug.h> -#include <rte_eal.h> +#include <rte_branch_prediction.h> #include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_rwlock.h> -#include "eal_memcfg.h" #include "eal_private.h" #include "eal_thread.h"
lib/eal/common/eal_common_log.c +0 -2
@@ -12,9 +12,7 @@#include <fnmatch.h> #include <sys/queue.h> -#include <rte_eal.h> #include <rte_log.h> -#include <rte_os_shim.h> #include <rte_per_lcore.h> #include "eal_log.h"
lib/eal/common/eal_common_memalloc.c +0 -3
@@ -5,12 +5,9 @@#include <string.h> #include <rte_errno.h> -#include <rte_lcore.h> #include <rte_fbarray.h> -#include <rte_memzone.h> #include <rte_memory.h> #include <rte_string_fns.h> -#include <rte_rwlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/eal_common_memory.c +0 -5
@@ -2,16 +2,11 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <fcntl.h> #include <errno.h> #include <stdio.h> #include <stdint.h> -#include <stdlib.h> -#include <stdarg.h> #include <string.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/queue.h> #include <rte_fbarray.h> #include <rte_memory.h>
lib/eal/common/eal_common_memzone.c +0 -4
@@ -2,20 +2,16 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <stdarg.h> #include <inttypes.h> #include <string.h> #include <errno.h> -#include <sys/queue.h> #include <rte_log.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_errno.h> #include <rte_string_fns.h> #include <rte_common.h>
lib/eal/common/eal_common_options.c +0 -2
@@ -4,7 +4,6 @@*/ #include <stdlib.h> -#include <unistd.h> #include <string.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <syslog.h>
@@ -17,7 +16,6 @@#include <dlfcn.h> #include <libgen.h> #endif -#include <sys/types.h> #include <sys/stat.h> #ifndef RTE_EXEC_ENV_WINDOWS #include <dirent.h>
lib/eal/common/eal_common_proc.c +0 -2
@@ -15,7 +15,6 @@#include <string.h> #include <sys/file.h> #include <sys/time.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h>
@@ -27,7 +26,6 @@#include <rte_errno.h> #include <rte_lcore.h> #include <rte_log.h> -#include <rte_tailq.h> #include "eal_memcfg.h" #include "eal_private.h"
lib/eal/common/eal_common_string_fns.c +0 -2
@@ -2,9 +2,7 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <rte_string_fns.h>
lib/eal/common/eal_common_tailqs.c +0 -11
@@ -3,24 +3,13 @@*/ #include <sys/queue.h> -#include <stdint.h> -#include <errno.h> #include <stdio.h> -#include <stdarg.h> #include <string.h> -#include <inttypes.h> -#include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_atomic.h> -#include <rte_branch_prediction.h> #include <rte_log.h> #include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_memcfg.h"
lib/eal/common/eal_common_thread.c +0 -3
@@ -4,10 +4,7 @@#include <stdio.h> #include <stdlib.h> -#include <stdint.h> -#include <unistd.h> #include <pthread.h> -#include <signal.h> #include <sched.h> #include <assert.h> #include <string.h>
lib/eal/common/eal_common_timer.c +0 -6
@@ -2,16 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <sys/types.h> -#include <time.h> -#include <errno.h> #include <rte_common.h> -#include <rte_compat.h> #include <rte_log.h> #include <rte_cycles.h> #include <rte_pause.h>
lib/eal/common/eal_common_trace.c +0 -1
@@ -3,7 +3,6 @@*/ #include <fnmatch.h> -#include <inttypes.h> #include <sys/queue.h> #include <regex.h>
lib/eal/common/hotplug_mp.h +0 -1
@@ -6,7 +6,6 @@#define _HOTPLUG_MP_H_#include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request"#define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response"
lib/eal/common/malloc_elem.c +0 -6
@@ -6,17 +6,11 @@#include <stddef.h> #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> #include <rte_common.h> -#include <rte_spinlock.h> #include "eal_private.h" #include "eal_internal_cfg.h"
lib/eal/common/malloc_heap.c +0 -5
@@ -5,7 +5,6 @@#include <stddef.h> #include <stdlib.h> #include <stdio.h> -#include <stdarg.h> #include <errno.h> #include <sys/queue.h>
@@ -13,15 +12,11 @@#include <rte_errno.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> #include <rte_string_fns.h> #include <rte_spinlock.h> -#include <rte_memcpy.h> #include <rte_memzone.h> -#include <rte_atomic.h> #include <rte_fbarray.h> #include "eal_internal_cfg.h"
lib/eal/common/malloc_mp.c +0 -1
@@ -5,7 +5,6 @@#include <string.h> #include <sys/time.h> -#include <rte_alarm.h> #include <rte_errno.h> #include <rte_string_fns.h>
lib/eal/common/malloc_mp.h +0 -2
@@ -10,8 +10,6 @@#include <rte_common.h> #include <rte_random.h> -#include <rte_spinlock.h> -#include <rte_tailq.h> /* forward declarations */ struct malloc_heap ;
lib/eal/common/rte_malloc.c +0 -5
@@ -13,11 +13,6 @@#include <rte_memory.h> #include <rte_eal.h> #include <rte_eal_memconfig.h> -#include <rte_branch_prediction.h> -#include <rte_debug.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> #include <rte_common.h> #include <rte_spinlock.h>
lib/eal/common/rte_random.c +0 -3
@@ -5,14 +5,11 @@#ifdef __RDSEED__#include <x86intrin.h> #endif -#include <stdlib.h> #include <unistd.h> #include <rte_branch_prediction.h> #include <rte_cycles.h> -#include <rte_eal.h> #include <rte_lcore.h> -#include <rte_memory.h> #include <rte_random.h> struct rte_rand_state {
lib/eal/common/rte_service.c +0 -6
@@ -3,22 +3,16 @@*/ #include <stdio.h> -#include <unistd.h> #include <inttypes.h> -#include <limits.h> #include <string.h> -#include <rte_compat.h> #include <rte_service.h> #include <rte_service_component.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_debug.h> #include <rte_cycles.h> #include <rte_atomic.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_spinlock.h>
lib/eal/include/rte_version.h +0 -2
@@ -14,10 +14,8 @@extern "C" {#endif -#include <stdint.h> #include <string.h> #include <stdio.h> -#include <rte_common.h> #include <rte_compat.h> /**
lib/eal/linux/eal.c +0 -10
@@ -7,10 +7,8 @@#include <stdlib.h> #include <stdint.h> #include <string.h> -#include <stdarg.h> #include <unistd.h> #include <pthread.h> -#include <syslog.h> #include <getopt.h> #include <sys/file.h> #include <dirent.h>
@@ -20,32 +18,24 @@#include <errno.h> #include <limits.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #if defined(RTE_ARCH_X86 )#include <sys/io.h> #endif #include <linux/version.h> -#include <rte_compat.h> #include <rte_common.h> #include <rte_debug.h> #include <rte_memory.h> #include <rte_launch.h> #include <rte_eal.h> #include <rte_errno.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_service_component.h> #include <rte_log.h> -#include <rte_random.h> -#include <rte_cycles.h> #include <rte_string_fns.h> #include <rte_cpuflags.h> -#include <rte_interrupts.h> #include <rte_bus.h> -#include <rte_dev.h> -#include <rte_devargs.h> #include <rte_version.h> #include <malloc_heap.h> #include <rte_vfio.h>
lib/eal/linux/eal_alarm.c +0 -7
@@ -3,21 +3,14 @@*/ #include <stdio.h> #include <stdint.h> -#include <signal.h> #include <errno.h> -#include <string.h> #include <sys/queue.h> #include <sys/time.h> #include <sys/timerfd.h> -#include <rte_memory.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_common.h> -#include <rte_per_lcore.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_lcore.h> #include <rte_errno.h> #include <rte_spinlock.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_cpuflags.c +0 -2
@@ -5,8 +5,6 @@#include <elf.h> #include <fcntl.h> #include <string.h> -#include <sys/stat.h> -#include <sys/types.h> #include <unistd.h> #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
lib/eal/linux/eal_debug.c +0 -5
@@ -5,16 +5,11 @@#ifdef RTE_BACKTRACE #include <execinfo.h> #endif -#include <stdarg.h> -#include <signal.h> #include <stdlib.h> #include <stdio.h> -#include <stdint.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_common.h> -#include <rte_eal.h> #define BACKTRACE_SIZE 256
lib/eal/linux/eal_dev.c +0 -4
@@ -4,20 +4,16 @@#include <string.h> #include <unistd.h> -#include <fcntl.h> #include <signal.h> #include <sys/socket.h> #include <linux/netlink.h> #include <rte_string_fns.h> #include <rte_log.h> -#include <rte_compat.h> #include <rte_dev.h> -#include <rte_malloc.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_bus.h> -#include <rte_eal.h> #include <rte_spinlock.h> #include <rte_errno.h>
lib/eal/linux/eal_hugepage_info.c +0 -7
@@ -3,7 +3,6 @@*/ #include <string.h> -#include <sys/types.h> #include <sys/file.h> #include <dirent.h> #include <fcntl.h>
@@ -12,19 +11,13 @@#include <stdio.h> #include <fnmatch.h> #include <inttypes.h> -#include <stdarg.h> #include <unistd.h> #include <errno.h> #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> #include <linux/mman.h> /* for hugetlb-related flags */ -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_debug.h> #include <rte_log.h>
lib/eal/linux/eal_interrupts.c +0 -8
@@ -7,13 +7,10 @@#include <stdlib.h> #include <pthread.h> #include <sys/queue.h> -#include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> -#include <inttypes.h> #include <sys/epoll.h> -#include <sys/signalfd.h> #include <sys/ioctl.h> #include <sys/eventfd.h> #include <assert.h>
@@ -21,9 +18,6 @@#include <rte_common.h> #include <rte_interrupts.h> -#include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_branch_prediction.h>
@@ -36,8 +30,6 @@#include <rte_eal_trace.h> #include "eal_private.h" -#include "eal_vfio.h" -#include "eal_thread.h" #define EAL_INTR_EPOLL_WAIT_FOREVER (-1)#define NB_OTHER_INTR 1
lib/eal/linux/eal_lcore.c +0 -7
@@ -4,15 +4,8 @@#include <unistd.h> #include <limits.h> -#include <string.h> -#include <dirent.h> #include <rte_log.h> -#include <rte_eal.h> -#include <rte_lcore.h> -#include <rte_common.h> -#include <rte_string_fns.h> -#include <rte_debug.h> #include "eal_private.h" #include "eal_filesystem.h"
lib/eal/linux/eal_log.c +1 -10
@@ -2,19 +2,10 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> -#include <stdint.h> #include <sys/types.h> #include <syslog.h> -#include <sys/queue.h> - -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_launch.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_spinlock.h> +#include <rte_log.h> #include "eal_log.h"
lib/eal/linux/eal_memalloc.c +0 -8
@@ -3,23 +3,17 @@*/ #include <errno.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <unistd.h> #include <limits.h> #include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
@@ -36,9 +30,7 @@#include <rte_common.h> #include <rte_log.h> #include <rte_eal.h> -#include <rte_errno.h> #include <rte_memory.h> -#include <rte_spinlock.h> #include "eal_filesystem.h" #include "eal_internal_cfg.h"
lib/eal/linux/eal_memory.c +0 -9
@@ -5,7 +5,6 @@#include <errno.h> #include <fcntl.h> -#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h>
@@ -13,19 +12,14 @@#include <inttypes.h> #include <string.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> -#include <sys/queue.h> #include <sys/file.h> #include <sys/resource.h> #include <unistd.h> #include <limits.h> -#include <sys/ioctl.h> -#include <sys/time.h> #include <signal.h> #include <setjmp.h> #ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */ -#include <linux/memfd.h> #define MEMFD_SUPPORTED #endif #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
@@ -36,12 +30,9 @@#include <rte_errno.h> #include <rte_log.h> #include <rte_memory.h> -#include <rte_launch.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_lcore.h> #include <rte_common.h> -#include <rte_string_fns.h> #include "eal_private.h" #include "eal_memalloc.h"
lib/eal/linux/eal_thread.c +0 -6
@@ -4,20 +4,14 @@#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <pthread.h> -#include <sched.h> -#include <sys/queue.h> #include <sys/syscall.h> #include <rte_debug.h> -#include <rte_atomic.h> #include <rte_launch.h> #include <rte_log.h> -#include <rte_memory.h> -#include <rte_per_lcore.h> #include <rte_eal.h> #include <rte_lcore.h> #include <rte_eal_trace.h>
lib/eal/linux/eal_timer.c +0 -15
@@ -3,28 +3,13 @@* Copyright(c) 2012-2013 6WIND S.A. */ -#include <string.h> -#include <stdlib.h> #include <stdio.h> #include <stdint.h> -#include <unistd.h> -#include <fcntl.h> -#include <inttypes.h> -#include <sys/mman.h> -#include <sys/queue.h> -#include <pthread.h> -#include <errno.h> #include <rte_common.h> -#include <rte_log.h> #include <rte_cycles.h> -#include <rte_lcore.h> -#include <rte_memory.h> -#include <rte_eal.h> -#include <rte_debug.h> #include "eal_private.h" -#include "eal_internal_cfg.h" enum timer_source eal_timer_source =EAL_TIMER_HPET ;
lib/eal/linux/eal_vfio_mp_sync.c +0 -1
@@ -5,7 +5,6 @@#include <unistd.h> #include <string.h> -#include <rte_compat.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_vfio.h>
lib/eal/unix/eal_file.c +0 -1
@@ -3,7 +3,6 @@*/ #include <sys/file.h> -#include <sys/mman.h> #include <fcntl.h> #include <unistd.h>
lib/eal/unix/rte_thread.c +0 -1
@@ -7,7 +7,6 @@#include <stdlib.h> #include <string.h> -#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> #include <rte_thread.h>
lib/eal/x86/rte_cycles.c +0 -1
@@ -6,7 +6,6 @@#include <unistd.h> #include <cpuid.h> -#include <rte_common.h> #include "eal_private.h"
Signature · 1 line
2.25.1
PATCH v5 6/50 vhost: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/vhost/fd_man.c | 6 ------ lib/vhost/fd_man.h | 1 - lib/vhost/socket.c | 1 - lib/vhost/vdpa.c | 1 - lib/vhost/vhost.c | 4 ---- lib/vhost/vhost.h | 2 -- lib/vhost/vhost_user.c | 2 -- 7 files changed, 17 deletions(-)
lib/vhost/fd_man.c +0 -6
@@ -2,14 +2,8 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <stdint.h> #include <stdio.h> -#include <stdlib.h> -#include <sys/socket.h> -#include <sys/time.h> -#include <sys/types.h> #include <unistd.h> -#include <string.h> #include <rte_common.h> #include <rte_log.h>
lib/vhost/fd_man.h +0 -1
@@ -4,7 +4,6 @@#ifndef _FD_MAN_H_#define _FD_MAN_H_ -#include <stdint.h> #include <pthread.h> #include <poll.h>
lib/vhost/socket.c +0 -1
@@ -8,7 +8,6 @@#include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/queue.h>
lib/vhost/vdpa.c +0 -1
@@ -8,7 +8,6 @@* Device specific vhost lib */ -#include <stdbool.h> #include <sys/queue.h> #include <rte_class.h>
lib/vhost/vhost.c +0 -4
@@ -4,7 +4,6 @@#include <linux/vhost.h> #include <linux/virtio_net.h> -#include <stddef.h> #include <stdint.h> #include <stdlib.h> #ifdef RTE_LIBRTE_VHOST_NUMA
@@ -13,13 +12,10 @@#endif #include <rte_errno.h> -#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_string_fns.h> #include <rte_memory.h> #include <rte_malloc.h> #include <rte_vhost.h> -#include <rte_rwlock.h> #include "iotlb.h" #include "vhost.h"
lib/vhost/vhost.h +0 -2
@@ -17,11 +17,9 @@#include <rte_log.h> #include <rte_ether.h> -#include <rte_rwlock.h> #include <rte_malloc.h> #include "rte_vhost.h" -#include "rte_vdpa.h" #include "vdpa_driver.h" #include "rte_vhost_async.h"
lib/vhost/vhost_user.c +0 -2
@@ -27,10 +27,8 @@#include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/stat.h> #include <sys/syscall.h> -#include <assert.h> #ifdef RTE_LIBRTE_VHOST_NUMA #include <numaif.h> #endif
Signature · 1 line
2.25.1
PATCH v5 7/50 timer: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/timer/rte_timer.c | 7 ------- 1 file changed, 7 deletions(-)
lib/timer/rte_timer.c +0 -7
@@ -2,29 +2,22 @@* Copyright(c) 2010-2014 Intel Corporation */ -#include <string.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> -#include <inttypes.h> #include <assert.h> #include <sys/queue.h> #include <rte_common.h> #include <rte_cycles.h> #include <rte_eal_memconfig.h> -#include <rte_per_lcore.h> #include <rte_memory.h> -#include <rte_launch.h> -#include <rte_eal.h> #include <rte_lcore.h> #include <rte_branch_prediction.h> #include <rte_spinlock.h> #include <rte_random.h> #include <rte_pause.h> #include <rte_memzone.h> -#include <rte_malloc.h> -#include <rte_errno.h> #include "rte_timer.h"
Signature · 1 line
2.25.1
RE: [PATCH v5 07/50] timer: remove unneeded header includes
Quoted 11 lines
-----Original Message-----
From: Morrissey, Sean <[email protected]>
Sent: Monday, January 17, 2022 2:19 PM
To: Robert Sanford <[email protected]>; Carrillo, Erik G <[email protected]>
Cc: [email protected]; Morrissey, Sean <[email protected]>
Subject: [PATCH v5 07/50] timer: remove unneeded header includesThese header includes have been flagged by the
iwyu_tooland removed.Signed-off-by Sean Morrissey <[email protected]>
Thanks, Sean.
PATCH v5 8/50 table: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/table/rte_swx_table_em.c | 1 - lib/table/rte_swx_table_em.h | 1 - lib/table/rte_swx_table_learner.c | 1 - lib/table/rte_swx_table_learner.h | 1 - lib/table/rte_swx_table_selector.c | 1 - lib/table/rte_swx_table_wm.c | 2 -- lib/table/rte_swx_table_wm.h | 1 - lib/table/rte_table_acl.c | 3 --- lib/table/rte_table_array.c | 2 -- lib/table/rte_table_hash_cuckoo.c | 2 -- lib/table/rte_table_hash_ext.c | 2 -- lib/table/rte_table_hash_key16.c | 2 -- lib/table/rte_table_hash_key32.c | 2 -- lib/table/rte_table_hash_key8.c | 2 -- lib/table/rte_table_hash_lru.c | 2 -- lib/table/rte_table_lpm.c | 2 -- lib/table/rte_table_lpm_ipv6.c | 3 --- lib/table/rte_table_stub.c | 1 - lib/table/rte_table_stub.h | 1 - 19 files changed, 32 deletions(-)
lib/table/rte_swx_table_em.c +0 -1
@@ -1,7 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Intel Corporation */ -#include <stdlib.h> #include <string.h> #include <stdio.h> #include <errno.h>
lib/table/rte_swx_table_em.h +0 -1
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Exact Match Table */ -#include <stdint.h> #include <rte_swx_table.h>
lib/table/rte_swx_table_learner.c +0 -1
@@ -1,7 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020 Intel Corporation */ -#include <stdlib.h> #include <string.h> #include <stdio.h> #include <errno.h>
lib/table/rte_swx_table_learner.h +0 -1
@@ -22,7 +22,6 @@ extern "C" {*/ #include <stdint.h> -#include <sys/queue.h> #include <rte_compat.h>
lib/table/rte_swx_table_selector.c +0 -1
@@ -7,7 +7,6 @@#include <errno.h> #include <rte_common.h> -#include <rte_prefetch.h> #include "rte_swx_table_selector.h"
lib/table/rte_swx_table_wm.c +0 -2
@@ -4,10 +4,8 @@#include <stdlib.h> #include <string.h> #include <stdio.h> -#include <errno.h> #include <rte_common.h> -#include <rte_prefetch.h> #include <rte_cycles.h> #include <rte_acl.h>
lib/table/rte_swx_table_wm.h +0 -1
@@ -13,7 +13,6 @@ extern "C" {* RTE SWX Wildcard Match Table */ -#include <stdint.h> #include <rte_swx_table.h>
lib/table/rte_table_acl.c +0 -3
@@ -6,13 +6,10 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h> #include "rte_table_acl.h" -#include <rte_ether.h> #ifdef RTE_TABLE_STATS_COLLECT
lib/table/rte_table_array.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_cuckoo.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_ext.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key16.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key32.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_key8.c +0 -2
@@ -5,8 +5,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_hash_lru.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_log.h>
lib/table/rte_table_lpm.c +0 -2
@@ -6,8 +6,6 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> #include <rte_byteorder.h> #include <rte_log.h>
lib/table/rte_table_lpm_ipv6.c +0 -3
@@ -6,10 +6,7 @@#include <stdio.h> #include <rte_common.h> -#include <rte_mbuf.h> -#include <rte_memory.h> #include <rte_malloc.h> -#include <rte_byteorder.h> #include <rte_log.h> #include <rte_lpm6.h>
lib/table/rte_table_stub.c +0 -1
@@ -4,7 +4,6 @@#include <string.h> -#include <rte_mbuf.h> #include <rte_malloc.h> #include "rte_table_stub.h"
lib/table/rte_table_stub.h +0 -1
@@ -17,7 +17,6 @@ extern "C" {* ***/ -#include <stdint.h> #include "rte_table.h"
Signature · 1 line
2.25.1
PATCH v5 9/50 stack: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/stack/rte_stack.c | 2 -- lib/stack/rte_stack.h | 1 - 2 files changed, 3 deletions(-)
lib/stack/rte_stack.c +0 -2
@@ -6,12 +6,10 @@#include <sys/queue.h> #include <rte_string_fns.h> -#include <rte_eal.h> #include <rte_eal_memconfig.h> #include <rte_errno.h> #include <rte_malloc.h> #include <rte_memzone.h> -#include <rte_rwlock.h> #include <rte_tailq.h> #include "rte_stack.h"
lib/stack/rte_stack.h +0 -1
@@ -19,7 +19,6 @@extern "C" {#endif -#include <rte_compat.h> #include <rte_debug.h> #include <rte_errno.h> #include <rte_memzone.h>
Signature · 1 line
2.25.1
PATCH v5 10/50 security: remove unneeded header includes
In reply to Sean MorrisseyThese header includes have been flagged by the iwyu_tool and removed.
--- lib/security/rte_security.c | 2 -- lib/security/rte_security.h | 3 --- 2 files changed, 5 deletions(-)
lib/security/rte_security.c +0 -2
@@ -5,10 +5,8 @@*/ #include <rte_cryptodev.h> -#include <rte_malloc.h> #include <rte_dev.h> #include <rte_telemetry.h> -#include "rte_compat.h" #include "rte_security.h" #include "rte_security_driver.h"
lib/security/rte_security.h +0 -3
@@ -23,10 +23,7 @@ extern "C" {#include <rte_common.h> #include <rte_crypto.h> #include <rte_ip.h> -#include <rte_mbuf.h> #include <rte_mbuf_dyn.h> -#include <rte_memory.h> -#include <rte_mempool.h> /** IPSec protocol mode */ enum rte_security_ipsec_sa_mode {
Signature · 1 line
2.25.1