Skip to contentSkip to conversation

introduce IWYU

PATCH Superseded Sean Morrissey 17 participants 368 messages Oct 4, 2021 – Feb 22, 2022 Page 2 of 4

lore
Share & tools
lore
#105 lore raw

PATCH v5 11/50 sched: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 934e9aee50..cdb7bab697 100644
@@ -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
index f5843dab1b..80b43b6da0 100644
@@ -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
index 62b3d2e315..e5c62e3d77 100644
@@ -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
index 3c625ba169..5ece64e527 100644
@@ -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
#106 lore raw

PATCH v5 12/50 rib: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6c29e1c49a..cd9e823068 100644
@@ -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
index bebb30f7d7..c18c4ca594 100644
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/rib/rte_rib6.c +0 -2
index 70405113b4..042ac1f090 100644
@@ -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
index 6f532265c6..fa8e9bf732 100644
@@ -15,7 +15,6 @@
  */
 
 #include <rte_memcpy.h>
-#include <rte_compat.h>
 #include <rte_common.h>
 
 #ifdef __cplusplus
Signature · 1 line
2.25.1
#107 lore raw

PATCH v5 13/50 reorder: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9445853b79..f40a48201f 100644
@@ -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
#108 lore raw

PATCH v5 14/50 regexdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 04ab713730..02a388bc5d 100644
@@ -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
index 0bac46cda9..4ba67b0c25 100644
@@ -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
#109 lore raw

PATCH v5 15/50 rcu: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 7510db2f81..17be93e830 100644
@@ -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
index 62a420a785..d81bf5e8db 100644
@@ -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
#110 lore raw

PATCH v5 16/50 rawdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index a6134e76ea..2f0a4f132e 100644
@@ -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
#112 lore raw

PATCH v5 17/50 power: remove unneeded header includes

In reply to Sean Morrissey

These 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
index b8fa65ef15..9da50020ac 100644
@@ -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
index 474dd92998..969a9e5aaa 100644
@@ -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
index 402ed8c99b..6e57aca535 100644
@@ -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
index 41675b9cd9..682fd9278c 100644
@@ -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
index 0b264edfa5..c1c7139276 100644
@@ -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
index 25185a791c..ef06fbcd9e 100644
@@ -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
index 4e73c91b05..f4121b237e 100644
@@ -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
index ab7d4b8cee..6a8109d449 100644
@@ -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
index 9a309a300f..303fcc041b 100644
@@ -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
index 86f8a76e46..959eccffd8 100644
@@ -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
index 3260b32494..7bf64a518c 100644
@@ -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
index 3cba56bac9..0a6614be77 100644
@@ -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
index c5759afa39..47345e26df 100644
@@ -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
index c4b5de9601..dca88555aa 100644
@@ -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
Acked-by on v5 17/50
#113 lore raw

Re: [PATCH v5 17/50] power: remove unneeded header includes

Quoted 5 lines · Sean Morrissey

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

Quoted 17 lines
---
  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(-)
#114 lore raw

PATCH v5 18/50 port: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e7620ef522..c8cfd9765a 100644
@@ -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
index 8a803fda11..e1f1892176 100644
@@ -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
index 74321e4c4c..07060297f6 100644
@@ -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
index 7b370f980a..1c7a6cb200 100644
@@ -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
index 9d318af17e..35c6253806 100644
@@ -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
index 8508814bb2..e5de57da42 100644
@@ -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
index fa5accdc71..ee1d8ae21e 100644
@@ -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
index c4f34e22fe..ba609b3436 100644
@@ -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
index 1209fc121b..8a7d815ef3 100644
@@ -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
index 68575c9833..4928a5f706 100644
@@ -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
index aa7315a15a..51bcd3bb7b 100644
@@ -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
index ecf3349f5f..c1a9200a4f 100644
@@ -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
index 859981f277..dc0ef9247c 100644
@@ -16,7 +16,6 @@ extern "C" {
 
 #include <stdint.h>
 
-#include <rte_ring.h>
 
 #include "rte_swx_port.h"
 
Signature · 1 line
2.25.1
#115 lore raw

PATCH v5 19/50 pipeline: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f5f397d292..ff86c7cf96 100644
@@ -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
index e3b00df8d2..5818973250 100644
@@ -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
index 82e62e70a7..ed752ad5eb 100644
@@ -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
index 2145ca0a42..b39139edb8 100644
@@ -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
index 77141bd341..430e458335 100644
@@ -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
index 07a7580ac8..8165a046ea 100644
@@ -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
index ebab2444d3..b1310be565 100644
@@ -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
#116 lore raw

PATCH v5 20/50 pdump: remove unneeded header includes

In reply to Sean Morrissey

These 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
index af450695ec..b3a62df591 100644
@@ -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
index 6efa0274f2..41c4b7800b 100644
@@ -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
#117 lore raw

PATCH v5 21/50 pci: remove unneeded header includes

In reply to Sean Morrissey

These 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
index c91be8b167..355772ff56 100644
@@ -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
index 71cbd441c7..a096946260 100644
@@ -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
#118 lore raw

PATCH v5 22/50 pcapng: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 03edabe73e..5ae96a5bc9 100644
@@ -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
index 8d3fbb1941..7d2697c647 100644
@@ -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 __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#119 lore raw

PATCH v5 23/50 node: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 13b8b705f0..5294607619 100644
@@ -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
index 4c23961505..a19237b42f 100644
@@ -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
index 075149089f..7d2d72f823 100644
@@ -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
index d083a725fc..8bce03d7db 100644
@@ -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
index 99ecb457ff..34a920df5e 100644
@@ -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
index b95454dd72..3e75f2cf78 100644
@@ -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
index c350013236..1ad7fccd28 100644
@@ -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
#120 lore raw

PATCH v5 24/50 net: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 3740fe3c9d..f6a3ce9bcd 100644
@@ -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
index 053b54b390..dd75845636 100644
@@ -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
index 9f7eb6b375..22af519586 100644
@@ -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
index 3d9852d9e2..bf8a55ba06 100644
@@ -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
index 53a7f4d360..56611fc8f9 100644
@@ -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
index d9a526ab7b..a685f9e7bb 100644
@@ -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
#121 lore raw

PATCH v5 25/50 metrics: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e2a0fbeda8..0c7878e65f 100644
@@ -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
#122 lore raw

PATCH v5 26/50 mempool: remove unneeded header includes

In reply to Sean Morrissey

These 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
index c5a699b1d6..de59009baf 100644
@@ -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
index 1e7a3c1527..5f9f9ead9b 100644
@@ -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
#123 lore raw

PATCH v5 27/50 member: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9dd55a5adf..7e1632e6b5 100644
@@ -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
index c0689e233e..567ee0c84b 100644
@@ -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
index 8a232bae02..9df4620cff 100644
@@ -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
#124 lore raw

PATCH v5 28/50 mbuf: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 604d77bbda..87592faccb 100644
@@ -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
index dedf83c38d..9811e8c760 100644
@@ -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
index 29abe8da53..ed8e57b350 100644
@@ -68,9 +68,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
-#include <sys/types.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/mbuf/rte_mbuf_pool_ops.c +0 -1
index f0e87a1412..4c91f4ce85 100644
@@ -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
index 7ed95a49a4..00cddb83ba 100644
@@ -14,7 +14,6 @@
  * the best mempool ops available.
  */
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#125 lore raw

PATCH v5 29/50 lpm: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 002811f4de..cdcd1b7f9e 100644
@@ -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
index 5eb14c1748..eb91960e81 100644
@@ -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
index 73768fc956..8d21aeddb8 100644
@@ -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
index f96f3372e5..9b07260d5a 100644
@@ -10,7 +10,6 @@
  */
 
 #include <stdint.h>
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#126 lore raw

PATCH v5 30/50 latencystats: remove unneeded header includes

In reply to Sean Morrissey

These 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
index ab8db7a139..8985a377db 100644
@@ -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
#127 lore raw

PATCH v5 31/50 kni: remove unneeded header includes

In reply to Sean Morrissey

These 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
index fc8f0e7b5a..7971c56bb4 100644
@@ -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
index b0eaf46104..b85d3dd32b 100644
@@ -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
#128 lore raw

PATCH v5 32/50 jobstats: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9b8fde5d55..af565a14ea 100644
@@ -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
#129 lore raw

PATCH v5 33/50 ipsec: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 636c850fa6..f159bf7460 100644
@@ -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
index 672e56aba0..6925bb9945 100644
@@ -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
index 531e1e323c..6f3860e3f5 100644
@@ -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
index cdb70af0cb..1b673b6a18 100644
@@ -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
index 7503587b50..46f9a4df5b 100644
@@ -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
#130 lore raw

PATCH v5 34/50 ip_frag: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 2c781a6d33..c1de2e81b6 100644
@@ -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
index 2e7739d027..669682a0cf 100644
@@ -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
#131 lore raw

PATCH v5 35/50 hash: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 1191dfd81a..490f94af4b 100644
@@ -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
index 576e8e6662..538b23a403 100644
@@ -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
index 9c3a61c1d6..b01126999b 100644
@@ -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
index 6847e36f4b..0249883b8d 100644
@@ -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
index c11ca0d5b8..451f64043a 100644
@@ -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
#132 lore raw

PATCH v5 36/50 gro: remove unneeded header includes

In reply to Sean Morrissey

These 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
index aff22178e3..7498c66141 100644
@@ -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
index bb875a5ef0..212f97a042 100644
@@ -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
index e78dda7874..dd71135ada 100644
@@ -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
index d38b393f79..6467d7bc3b 100644
@@ -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
index 2005899afe..3be4deb7c7 100644
@@ -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
index 4767c910bb..b78a7ae89e 100644
@@ -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
index 8ca4da67e9..6f7dd4d709 100644
@@ -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
#133 lore raw

PATCH v5 37/50 graph: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f8aea16acb..b84412f5dd 100644
@@ -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
index 3355953118..20db58d84e 100644
@@ -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
index 093512efab..102fd6c29b 100644
@@ -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
index 86ec4316f9..79230035a2 100644
@@ -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
#134 lore raw

PATCH v5 38/50 gpudev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9ae36dbae9..98bb759fb2 100644
@@ -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
#135 lore raw

PATCH v5 39/50 flow_classify: remove unneeded header includes

In reply to Sean Morrissey

These 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
index d3ba2ed227..e3667306e5 100644
@@ -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
index 82ea92b6a6..39512b6206 100644
@@ -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 __cplusplus
 extern "C" {
lib/flow_classify/rte_flow_classify_parse.c +0 -1
index 465330291f..345d129d35 100644
@@ -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
index 365a07bd6d..7943efc0d4 100644
@@ -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
#136 lore raw

PATCH v5 40/50 fib: remove unneeded header includes

In reply to Sean Morrissey

These 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
index bb3bc9753b..a8ba4f64ca 100644
@@ -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
index 0cced97a77..8af4c40919 100644
@@ -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
index e592d3251a..90f28b7e11 100644
@@ -17,7 +17,6 @@
 
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/fib/rte_fib6.c +0 -2
index eebee297d6..4b8e22b142 100644
@@ -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
index cb133719e1..62a425d9af 100644
@@ -17,7 +17,6 @@
 
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/fib/trie.c +0 -5
index 044095bf03..3e780afdaf 100644
@@ -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
index 9fd15ae79f..3cf161ae25 100644
@@ -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
#137 lore raw

PATCH v5 41/50 eventdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index d27e23901d..c070715148 100644
@@ -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
index c0861b0ec2..0a54f7fde2 100644
@@ -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
index 9dad170b5a..7dc39386c9 100644
@@ -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
index 1551741820..aefa322344 100644
@@ -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
index 79b9ea3a02..1c1b66de88 100644
@@ -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
index eef47d8acc..5738a8d9ea 100644
@@ -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
#138 lore raw

RE: [PATCH v5 41/50] eventdev: remove unneeded header includes

Quoted 11 lines

-----Original Message-----
From: Morrissey, Sean <[email protected]>
Sent: Monday, January 17, 2022 2:20 PM
To: Jerin Jacob <[email protected]>; Carrillo, Erik G <[email protected]>
Cc: [email protected]; Morrissey, Sean <[email protected]>
Subject: [PATCH v5 41/50] eventdev: remove unneeded header includes

These header includes have been flagged by the iwyu_tool and removed.

Thanks, Sean. The timer adapter changes LGTM.

Regards,
Erik

#139 lore raw

PATCH v5 42/50 efd: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 86ef46863c..560cd78961 100644
@@ -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
#140 lore raw

PATCH v5 43/50 dmadev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 4abe79c536..ad9e7a0975 100644
@@ -149,7 +149,6 @@
 #include <rte_bitops.h>
 #include <rte_common.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#141 lore raw

PATCH v5 44/50 distributor: remove unneeded header includes

In reply to Sean Morrissey

These 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
index c210cf86bd..3035b7a999 100644
@@ -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
index e3b3b79264..11d8819278 100644
@@ -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
index b653620688..de90aa8bb5 100644
@@ -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
Acked-by on v5 44/50
#142 lore raw

Re: [PATCH v5 44/50] distributor: remove unneeded header includes

Quoted 10 lines · Sean Morrissey

These 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(-)
#143 lore raw

PATCH v5 45/50 compressdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 3b0e46f96e..320c6dab92 100644
@@ -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
index 95306c5d03..cdb55e5887 100644
@@ -16,7 +16,6 @@
 extern "C" {
 #endif
 
-#include <rte_mempool.h>
 #include <rte_mbuf.h>
 
 /**
lib/compressdev/rte_compressdev.c +0 -1
index 2e9218af68..202ee694d8 100644
@@ -3,7 +3,6 @@
  */
 
 #include <string.h>
-#include <stdarg.h>
 #include <stdio.h>
 #include <inttypes.h>
 
lib/compressdev/rte_compressdev.h +0 -1
index 2840c27c6c..aa865c4c03 100644
@@ -21,7 +21,6 @@
 extern "C" {
 #endif
 
-#include <rte_common.h>
 
 #include "rte_comp.h"
 
lib/compressdev/rte_compressdev_pmd.h +0 -2
index f9a42d1f05..9fabc399c5 100644
@@ -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
#144 lore raw

PATCH v5 46/50 cmdline: remove unneeded header includes

In reply to Sean Morrissey

These header includes have been flagged by the iwyu_tool and removed.

---
 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 ---
 7 files changed, 21 deletions(-)
lib/cmdline/cmdline.c +0 -2
index 8f1854cb0b..e1009ba4c4 100644
@@ -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_parse.c +0 -3
index f5cc934782..349ec87bd7 100644
@@ -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
index b37dd94ae9..a4e68f262c 100644
@@ -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
index e1aa07be4b..2e2294553a 100644
@@ -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
index 9cf41d0f76..d756638905 100644
@@ -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
index d92b1cda53..5cf723a012 100644
@@ -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_vt100.c +0 -3
index bb968dd5fa..4c9a46c953 100644
@@ -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
#145 lore raw

PATCH v5 47/50 bpf: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 0caad2a8f0..1e1dd42a58 100644
@@ -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
index b921112feb..09f4a9a571 100644
@@ -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
index 518513376a..c1a30e0386 100644
@@ -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
index 272f2ba11b..0c4ac7be6c 100644
@@ -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
index af422afc07..ffd2db7840 100644
@@ -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
index 09331258eb..9ff86fc970 100644
@@ -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
#146 lore raw

PATCH v5 48/50 bbdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 7f353d4f7e..aaee7b7872 100644
@@ -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
index 1dbcf73b0e..b88c88167e 100644
@@ -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
#147 lore raw

PATCH v5 49/50 cryptodev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index b9146f652c..8cf2da9b69 100644
@@ -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
index a40536c5ea..8c1cccef0b 100644
@@ -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
index 59ea5a54df..3493384fc7 100644
@@ -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
#148 lore raw

PATCH v5 50/50 acl: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 4e693b2488..a61c3ba188 100644
@@ -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
#149 lore raw
In reply to Sean Morrissey

Hello Sean,

Quoted 8 lines · Sean Morrissey

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.

There are build errors reported by CI.

I see one issue with Windows build seen by UNH:
https://lab.dpdk.org/results/dashboard/patchsets/20695/

And two (but it could be a single issue) errors reported by Intel CI, on RHEL 8 (+debug) and FreeBSD 13 (+debug):
http://mails.dpdk.org/archives/test-report/2022-January/252334.html

Signature · 1 line
David Marchand
#150 lore raw

v6 cover introduce IWYU

In reply to Sean Morrissey

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.

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.

V6:
* Fix some Windows build issues.
* Fix some RHEL 8 build issues.

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_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             |   1 -
 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                     |   1 -
 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                           |   1 -
 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 -
 235 files changed, 113 insertions(+), 686 deletions(-)
 create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
#151 lore raw

PATCH v6 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
new file mode 100755
index 0000000000..50f3d4c5c7
@@ -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
#152 lore raw

Re: [PATCH v6 01/50] devtools: script to remove unused headers includes

02/02/2022 10:47, Sean Morrissey:

Quoted 13 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:

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
Quoted 7 lines

Remove headers directly piped from the iwyu_tool

$ iwyu_tool -p build | ./devtools/process_iwyu.py - -b build

Same comment as in v5:
Please no blank line between names.

There is still a compilation error:
http://mails.dpdk.org/archives/test-report/2022-February/256520.html

#153 lore raw

PATCH v6 2/50 telemetry: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e5ccfe47f7..c6fd03a5ab 100644
@@ -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
index adb84a09f1..26aa28e72c 100644
@@ -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
#154 lore raw

PATCH v6 3/50 ring: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f17bd966be..7945e5d9ed 100644
@@ -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
#155 lore raw

PATCH v6 4/50 kvargs: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 11f624ef14..c77bb82feb 100644
@@ -8,7 +8,6 @@
 #include <stdbool.h>
 
 #include <rte_os_shim.h>
-#include <rte_string_fns.h>
 
 #include "rte_kvargs.h"
 
Signature · 1 line
2.25.1
#156 lore raw

PATCH v6 5/50 eal: remove unneeded header includes

In reply to Sean Morrissey

These 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        |  1 -
 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(+), 201 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
index e1e9976d8d..c0ee4e442f 100644
@@ -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
index 8c7650cf6c..c3c3a9e6e4 100644
@@ -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
index f86802705a..1091065568 100644
@@ -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
index 3a28a53247..f11f87979f 100644
@@ -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
index 2d2179d411..63bbbdcf0a 100644
@@ -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
index e95dadffb3..9f393b9bda 100644
@@ -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
index 5de7570aac..11092791a4 100644
@@ -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 -1
index 1be35f5397..2185857cf7 100644
@@ -12,7 +12,6 @@
 #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>
lib/eal/common/eal_common_memalloc.c +0 -3
index e872c6533b..f8770ff835 100644
@@ -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
index 88517fd69e..9ba2804067 100644
@@ -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
index ecde9441ee..0059de6981 100644
@@ -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
index 1cfdd75f3b..071f1acf50 100644
@@ -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
index ebd0f6673b..575b4ca24d 100644
@@ -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
index ddd1891656..0236ae4023 100644
@@ -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
index ead06897b8..580fbf24bc 100644
@@ -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
index bb6fc8084c..684bea166c 100644
@@ -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
index 86f8429847..5686a5102b 100644
@@ -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
index 7bff1cd2ce..036f6ac348 100644
@@ -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
index 8fcf9b52e2..066494ff27 100644
@@ -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
index bdd20a162e..c08f129c04 100644
@@ -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
index 55aad2711b..5ee5b07941 100644
@@ -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
index 2e597a17a2..801b2e7fbd 100644
@@ -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
index 0095062b72..fb10817e13 100644
@@ -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
index d0bec26920..7bcbec51a2 100644
@@ -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
index ce21c2242a..4535cc980c 100644
@@ -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
index bd8fb72e78..ef31b1f63c 100644
@@ -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
index b06a62e7a2..414b6167f2 100644
@@ -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
index 60b4924838..b5621e64e2 100644
@@ -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
index 3b5e894595..4de67138bc 100644
@@ -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
index d38296e1e5..c684940e1d 100644
@@ -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
index 64dab4e0da..b0ecf5a9dc 100644
@@ -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
index bde55a3d92..f6e5861221 100644
@@ -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
index 9fb0e968db..3f760f85ca 100644
@@ -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
index 70060bf3ef..d52ec8eb4c 100644
@@ -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
index bc8965844c..2e6a350603 100644
@@ -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
index c0aa1007c4..9e72412e2b 100644
@@ -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
index 16b58d861b..026701f331 100644
@@ -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
index 03a4f2dd2d..40ec9663d0 100644
@@ -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
index c7f0f9b2f7..fa6cd7e2c4 100644
@@ -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
index 7cf15cabac..620baf038d 100644
@@ -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
index a2accfab3a..e1776166af 100644
@@ -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
index ec554e0096..f04f5fbcbc 100644
@@ -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
index c72d619ec1..c34ede9186 100644
@@ -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
index edd9621abb..0e695caf28 100644
@@ -6,7 +6,6 @@
 #include <unistd.h>
 #include <cpuid.h>
 
-#include <rte_common.h>
 
 #include "eal_private.h"
 
Signature · 1 line
2.25.1
#157 lore raw

PATCH v6 6/50 vhost: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 55d4856f9e..1876fada33 100644
@@ -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
index 3ab5cfdd60..6f4499bdfa 100644
@@ -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
index 82963c1e6d..c22d84a2cb 100644
@@ -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
index 09ad5d866e..7c57b3f75b 100644
@@ -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
index 13a9bb9dd1..40703b882f 100644
@@ -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
index 7085e0885c..819d361578 100644
@@ -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
index 5eb1dd6812..f8c216c453 100644
@@ -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
#158 lore raw

PATCH v6 7/50 timer: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6d19ce469b..b3f3e229f6 100644
@@ -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
#159 lore raw

PATCH v6 8/50 table: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 03b28c4c9d..f783cfe282 100644
@@ -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
index 909ada483b..b7423dd060 100644
@@ -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
index c3c840ff06..15576c2aa3 100644
@@ -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
index d6ec733655..eb9d7689fd 100644
@@ -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
index 541ebc2213..ad99f18453 100644
@@ -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
index e260be1062..27a67b47bd 100644
@@ -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
index 9e228f971c..4fd52c0a17 100644
@@ -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
index 14d54019f0..179a1da835 100644
@@ -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
index 8264c50c27..54a0c42f7d 100644
@@ -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
index f024303330..c77eccf527 100644
@@ -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
index 802a24fe0f..70ea84fa2e 100644
@@ -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
index c4384b114d..ea8195dc17 100644
@@ -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
index 3e0031fe1e..87f83ce6f5 100644
@@ -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
index 34e3ed1af9..7779a9d1a3 100644
@@ -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
index 5bcdb7ba02..c31acc11cf 100644
@@ -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
index 4dd8289ce5..9de9e8a20d 100644
@@ -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
index 4e068d79bf..8fde2c012f 100644
@@ -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
index 9ce7be9cec..23d0de5c79 100644
@@ -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
index 2b40739790..9086e4edcc 100644
@@ -17,7 +17,6 @@ extern "C" {
  *
  ***/
 
-#include <stdint.h>
 
 #include "rte_table.h"
 
Signature · 1 line
2.25.1
#160 lore raw

PATCH v6 9/50 stack: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 56bf2c8d6d..1fabec2bfe 100644
@@ -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
index 321f4cec1a..91fc570767 100644
@@ -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
#161 lore raw

PATCH v6 10/50 security: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6e45a03fa0..4f5e4b4d49 100644
@@ -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
index 1228b6c8b1..d54d993ccc 100644
@@ -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
#162 lore raw

PATCH v6 11/50 sched: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 934e9aee50..cdb7bab697 100644
@@ -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
index f5843dab1b..80b43b6da0 100644
@@ -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
index 62b3d2e315..e5c62e3d77 100644
@@ -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
index 3c625ba169..5ece64e527 100644
@@ -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
#163 lore raw

PATCH v6 12/50 rib: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6c29e1c49a..cd9e823068 100644
@@ -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
index bebb30f7d7..c18c4ca594 100644
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/rib/rte_rib6.c +0 -2
index 70405113b4..042ac1f090 100644
@@ -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
index 6f532265c6..fa8e9bf732 100644
@@ -15,7 +15,6 @@
  */
 
 #include <rte_memcpy.h>
-#include <rte_compat.h>
 #include <rte_common.h>
 
 #ifdef __cplusplus
Signature · 1 line
2.25.1
#164 lore raw

PATCH v6 13/50 reorder: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9445853b79..f40a48201f 100644
@@ -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
#165 lore raw

PATCH v6 14/50 regexdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 04ab713730..02a388bc5d 100644
@@ -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
index 0bac46cda9..4ba67b0c25 100644
@@ -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
#166 lore raw

PATCH v6 15/50 rcu: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 7510db2f81..17be93e830 100644
@@ -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
index 62a420a785..d81bf5e8db 100644
@@ -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
#167 lore raw

PATCH v6 16/50 rawdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index a6134e76ea..2f0a4f132e 100644
@@ -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
#168 lore raw

PATCH v6 17/50 power: remove unneeded header includes

In reply to Sean Morrissey

These 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
index b8fa65ef15..9da50020ac 100644
@@ -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
index 474dd92998..969a9e5aaa 100644
@@ -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
index 402ed8c99b..6e57aca535 100644
@@ -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
index 41675b9cd9..682fd9278c 100644
@@ -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
index 0b264edfa5..c1c7139276 100644
@@ -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
index 25185a791c..ef06fbcd9e 100644
@@ -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
index 4e73c91b05..f4121b237e 100644
@@ -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
index ab7d4b8cee..6a8109d449 100644
@@ -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
index 9a309a300f..303fcc041b 100644
@@ -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
index 86f8a76e46..959eccffd8 100644
@@ -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
index 3260b32494..7bf64a518c 100644
@@ -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
index 3cba56bac9..0a6614be77 100644
@@ -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
index c5759afa39..47345e26df 100644
@@ -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
index c4b5de9601..dca88555aa 100644
@@ -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
#169 lore raw

PATCH v6 18/50 port: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e7620ef522..c8cfd9765a 100644
@@ -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
index 8a803fda11..e1f1892176 100644
@@ -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
index 74321e4c4c..07060297f6 100644
@@ -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
index 7b370f980a..1c7a6cb200 100644
@@ -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
index 9d318af17e..35c6253806 100644
@@ -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
index 8508814bb2..e5de57da42 100644
@@ -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
index fa5accdc71..ee1d8ae21e 100644
@@ -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
index c4f34e22fe..ba609b3436 100644
@@ -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
index 1209fc121b..8a7d815ef3 100644
@@ -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
index 68575c9833..4928a5f706 100644
@@ -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
index aa7315a15a..51bcd3bb7b 100644
@@ -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
index ecf3349f5f..c1a9200a4f 100644
@@ -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
index 859981f277..dc0ef9247c 100644
@@ -16,7 +16,6 @@ extern "C" {
 
 #include <stdint.h>
 
-#include <rte_ring.h>
 
 #include "rte_swx_port.h"
 
Signature · 1 line
2.25.1
#170 lore raw

PATCH v6 19/50 pipeline: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f5f397d292..ff86c7cf96 100644
@@ -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
index e3b00df8d2..5818973250 100644
@@ -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
index 82e62e70a7..ed752ad5eb 100644
@@ -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
index 2145ca0a42..b39139edb8 100644
@@ -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
index 77141bd341..430e458335 100644
@@ -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
index 07a7580ac8..8165a046ea 100644
@@ -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
index ebab2444d3..b1310be565 100644
@@ -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
#171 lore raw

PATCH v6 20/50 pdump: remove unneeded header includes

In reply to Sean Morrissey

These 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
index af450695ec..b3a62df591 100644
@@ -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
index 6efa0274f2..41c4b7800b 100644
@@ -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
#172 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 14 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These 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 -0
index af450695ec..b3a62df591 100644

lib/pdump/rte_pdump.c line 7

Quoted 7 lines
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>

Yes, this code doesn't use rte_memcpy so yes, remove it.

lib/pdump/rte_pdump.h line 18

Quoted 13 lines
lib/pdump/rte_pdump.h +0 -2
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in rte_pdump_enable(). Not sure why IWYU thinks they should be removed.
Since this is an API header, changing it here risks breaking an application.

#173 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 39 lines · Stephen Hemminger
Quoted 14 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These 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 -0
index af450695ec..b3a62df591 100644

lib/pdump/rte_pdump.c line 7

Quoted 7 lines
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>

Yes, this code doesn't use rte_memcpy so yes, remove it.

Quoted 12 lines
lib/pdump/rte_pdump.h +0 -2
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
Quoted 4 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in rte_pdump_enable(). Not sure why IWYU thinks they should be removed.

Because they are only used as pointer types, not as structures themselves. Normally in cases like this, I would put in just "struct rte_mempool;" at the top of the file rather than including a whole header just for one structure.

Quoted 2 lines

Since this is an API header, changing it here risks breaking an application.

Good point. Should we avoid removing headers from public headers in case of application breakage? It's safer, but it means that we will likely still be including far too many headers in multiple places. If we do remove them, it would not be an ABI break, just an API one, of sorts.

/Bruce

#174 lore raw

RE: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 12 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

---

[...]

Quoted 18 lines
Quoted 13 lines
Quoted 13 lines
lib/pdump/rte_pdump.h +0 -2
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
Quoted 4 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in rte_pdump_enable(). Not sure why IWYU thinks they should be removed.

Quoted 6 lines

Because they are only used as pointer types, not as structures themselves.
Normally in cases like this, I would put in just "struct rte_mempool;" at
the top of the file rather than including a whole header just for one structure.

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to include the header file for the library.

Putting in "struct rte_mempool;" is essentially copy-pasting from the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the atomic counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

If only using one function from a library, you probably wouldn't copy the function prototype instead of including the library header file.

Let's focus on the speed of compiled DPDK code, not the speed of compiling DPDK code. Code readability and lower probability of introducing bugs is far more important than compilation time!

Cleaning up code is also good, so the iwyu_tool initiative is still good.

Quoted 11 lines
Quoted 2 lines

Since this is an API header, changing it here risks breaking an

application.

Quoted 1 line

Good point. Should we avoid removing headers from public headers in case of
application breakage? It's safer, but it means that we will likely still be
including far too many headers in multiple places. If we do remove them, it
would not be an ABI break, just an API one, of sorts.

The application only breaks at compile time, and it should be easy for the application developer to see what is missing.

I vote for removing unused headers in public files too - not considering it an API breakage.

#175 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 40 lines · Morten Brørup
Quoted 12 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

---

[...]

Quoted 18 lines
Quoted 13 lines
Quoted 13 lines
lib/pdump/rte_pdump.h +0 -2
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
Quoted 4 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in rte_pdump_enable(). Not sure why IWYU thinks they should be removed.

Quoted 6 lines

Because they are only used as pointer types, not as structures themselves.
Normally in cases like this, I would put in just "struct rte_mempool;" at
the top of the file rather than including a whole header just for one structure.

Quoted 4 lines

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to include the header file for the library.

Putting in "struct rte_mempool;" is essentially copy-pasting from the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the atomic counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

By "struct rte_mempool;" I mean literally just that. All it does is indicate that there is a structure defined somewhere else that will be used via pointer in the file later on. There is no copy-pasting involved and the reference does not need to change as the structure changes.

From what I read, having this forward declaration is not necessary for C, but for C++ if you use the struct pointer in a function definition later on, you may get an error.

Therefore, if you are using a struct only as a pointer parameter, the best option is to forward declare it (to keep C++ happy), and not include a whole header file unnecessarily.

/Bruce

#176 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 55 lines · On Wed, 2 Feb 2022 17:03:44 +0000 Bruce Richardson…
Quoted 40 lines · Morten Brørup
Quoted 12 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

Quoted 8 lines · Stephen Hemminger
Quoted 5 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

---

[...]

Quoted 18 lines
Quoted 13 lines
Quoted 13 lines
lib/pdump/rte_pdump.h +0 -2
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
Quoted 4 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus  

This header does use rte_mempool and rte_ring in rte_pdump_enable(). Not sure why IWYU thinks they should be removed.

Quoted 6 lines

Because they are only used as pointer types, not as structures themselves.
Normally in cases like this, I would put in just "struct rte_mempool;" at
the top of the file rather than including a whole header just for one structure.

Quoted 4 lines

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to include the header file for the library.

Putting in "struct rte_mempool;" is essentially copy-pasting from the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the atomic counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

By "struct rte_mempool;" I mean literally just that. All it does is indicate that there is a structure defined somewhere else that will be used via pointer in the file later on. There is no copy-pasting involved and the reference does not need to change as the structure changes.

From what I read, having this forward declaration is not necessary for C, but for C++ if you use the struct pointer in a function definition later on, you may get an error.

Quoted 5 lines

Therefore, if you are using a struct only as a pointer parameter, the best option is to forward declare it (to keep C++ happy), and not include a whole header file unnecessarily.

/Bruce

Using the empty structure definition is reasonable and is done a couple other places.

#177 lore raw

RE: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 63 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 18.29

Quoted 5 lines · On Wed, 2 Feb 2022 17:03:44 +0000 Bruce Richardson…
Quoted 4 lines · Morten Brørup
Quoted 4 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger

Quoted 19 lines · wrote:
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

---

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
lib/pdump/rte_pdump.h +0 -0
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

lib/pdump/rte_pdump.h line 18

Quoted 6 lines
lib/pdump/rte_pdump.h +0 -2
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in

rte_pdump_enable().

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

Not sure why IWYU thinks they should be removed.

Because they are only used as pointer types, not as structures themselves.
Normally in cases like this, I would put in just "struct

rte_mempool;"

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

at
the top of the file rather than including a whole header just for

one

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

structure.

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to

include the header file for the library.

Quoted 2 lines
Quoted 2 lines

Putting in "struct rte_mempool;" is essentially copy-pasting from

the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the atomic counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

Quoted 1 line
Quoted 4 lines
Quoted 2 lines

By "struct rte_mempool;" I mean literally just that. All it does is indicate that there is a structure defined somewhere else that will

be used

Quoted 1 line

via pointer in the file later on.

Yes, I did understand that. Like a forward declaration, often used in structures referencing each other.

Quoted 2 lines
Quoted 2 lines

There is no copy-pasting involved and the reference does not need to change as the structure changes.

I meant that the rte_mempool itself could change type, so it is no longer a structure. Then the "copy-pasted" forward declaration will allow the code to compile, not catching that the type has changed.

The refcnt member of the mbuf structure changed over time from being a structure (specifically rte_atomic_t, which was a typedef) to being a simple uint16_t. So types changing over time does happen in the real world, also in DPDK.

Quoted 9 lines
Quoted 2 lines

From what I read, having this forward declaration is not necessary

for C,

Quoted 1 line

but for C++ if you use the struct pointer in a function definition

later

Quoted 3 lines

on, you may get an error.

Therefore, if you are using a struct only as a pointer parameter, the

best

Quoted 8 lines
Quoted 1 line

option is to forward declare it (to keep C++ happy), and not include

a

Quoted 3 lines

whole header file unnecessarily.

/Bruce

Using the empty structure definition is reasonable and is done a couple other places.

I still consider bad practice, because compile time weighs infinitely lower than code cleanliness in my cost/benefit analysis.

-Morten

#178 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 68 lines · Morten Brørup
Quoted 63 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 18.29

Quoted 5 lines · On Wed, 2 Feb 2022 17:03:44 +0000 Bruce Richardson…
Quoted 4 lines · Morten Brørup
Quoted 4 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger

Quoted 19 lines · wrote:
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

---

[...]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
lib/pdump/rte_pdump.h +0 -0
index 6efa0274f2..41c4b7800b 100644
@@ -13,8 +13,6 @@
  */
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

lib/pdump/rte_pdump.h line 18

Quoted 6 lines
lib/pdump/rte_pdump.h +0 -2
 #include <stdint.h>
-#include <rte_mempool.h>
-#include <rte_ring.h>
 #include <rte_bpf.h>
 
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in

rte_pdump_enable().

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

Not sure why IWYU thinks they should be removed.

Because they are only used as pointer types, not as structures themselves.
Normally in cases like this, I would put in just "struct

rte_mempool;"

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

at
the top of the file rather than including a whole header just for

one

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

structure.

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to

include the header file for the library.

Quoted 2 lines
Quoted 2 lines

Putting in "struct rte_mempool;" is essentially copy-pasting from

the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the atomic counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

Quoted 1 line
Quoted 4 lines
Quoted 2 lines

By "struct rte_mempool;" I mean literally just that. All it does is indicate that there is a structure defined somewhere else that will

be used

Quoted 1 line

via pointer in the file later on.

Quoted 9 lines

Yes, I did understand that. Like a forward declaration, often used in structures referencing each other.

Quoted 2 lines
Quoted 2 lines

There is no copy-pasting involved and the reference does not need to change as the structure changes.

I meant that the rte_mempool itself could change type, so it is no longer a structure. Then the "copy-pasted" forward declaration will allow the code to compile, not catching that the type has changed.

The refcnt member of the mbuf structure changed over time from being a structure (specifically rte_atomic_t, which was a typedef) to being a simple uint16_t. So types changing over time does happen in the real world, also in DPDK.

If the type does change, then it will still be caught via compilation error, since the corresponding .c file will have to include the full mempool header to access the internals of the data structures. That will trigger a compilation failure on the function in the .c file, requiring the parameter type to change from e.g. struct to union.
Overall, though, if a type does change, one would expect that a global search replace would be used throughout the whole codebase, so I consider the possibilities of problems here to be very, very remote.

/Bruce

#179 lore raw

RE: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 95 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Thursday, 3 February 2022 11.43

Quoted 18 lines · Morten Brørup
Quoted 18 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 18.29

Quoted 5 lines · On Wed, 2 Feb 2022 17:03:44 +0000 Bruce Richardson…
Quoted 4 lines · Morten Brørup
Quoted 4 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger

Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

---

[...]

Quoted 2 lines
Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/lib/pdump/rte_pdump.h

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

index 6efa0274f2..41c4b7800b 100644

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>
 
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in

rte_pdump_enable().

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Not sure why IWYU thinks they should be removed.

Because they are only used as pointer types, not as

structures

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

themselves.
Normally in cases like this, I would put in just "struct

rte_mempool;"

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

at
the top of the file rather than including a whole header just

for

Quoted 8 lines
Quoted 8 lines

one

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

structure.

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to

include the header file for the library.

Quoted 2 lines
Quoted 2 lines

Putting in "struct rte_mempool;" is essentially copy-pasting

from

Quoted 3 lines
Quoted 3 lines

the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the

atomic

Quoted 5 lines
Quoted 5 lines

counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

Quoted 2 lines

By "struct rte_mempool;" I mean literally just that. All it does

is

Quoted 1 line
Quoted 1 line
Quoted 1 line

indicate that there is a structure defined somewhere else that

will

Quoted 4 lines
Quoted 2 lines

be used

Quoted 1 line

via pointer in the file later on.

Yes, I did understand that. Like a forward declaration, often used in

structures referencing each other.

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

There is no copy-pasting involved and the reference does not need to change as the structure changes.

I meant that the rte_mempool itself could change type, so it is no

longer a structure. Then the "copy-pasted" forward declaration will allow the code to compile, not catching that the type has changed.

Quoted 2 lines

The refcnt member of the mbuf structure changed over time from being

a structure (specifically rte_atomic_t, which was a typedef) to being a simple uint16_t. So types changing over time does happen in the real world, also in DPDK.

Quoted 1 line
Quoted 11 lines

If the type does change, then it will still be caught via compilation error, since the corresponding .c file will have to include the full mempool header to access the internals of the data structures. That will
trigger a compilation failure on the function in the .c file, requiring the
parameter type to change from e.g. struct to union.
Overall, though, if a type does change, one would expect that a global search replace would be used throughout the whole codebase, so I consider
the possibilities of problems here to be very, very remote.

Thank you for elaborating, Bruce.

Although I agree that the risk of problems is extremely low, I still prefer eliminating risks over reducing compile time.

It boils down to different opinions about the cost/benefit analysis, and it seems that Stephen and you outnumber me, so I'll stop complaining about it. ;-)

-Morten

#180 lore raw

Re: [PATCH v6 20/50] pdump: remove unneeded header includes

Quoted 107 lines · Morten Brørup
Quoted 95 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Thursday, 3 February 2022 11.43

Quoted 18 lines · Morten Brørup
Quoted 18 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 18.29

Quoted 5 lines · On Wed, 2 Feb 2022 17:03:44 +0000 Bruce Richardson…
Quoted 4 lines · Morten Brørup
Quoted 4 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 2 February 2022 17.01

On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger

Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines · On Wed, 2 Feb 2022 09:47:32 +0000 Sean Morrissey <[email protected]>…

These header includes have been flagged by the iwyu_tool and removed.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

---

[...]

Quoted 2 lines
Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/lib/pdump/rte_pdump.h

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

index 6efa0274f2..41c4b7800b 100644

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>
 
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

lib/pdump/rte_pdump.h line 18

Quoted 1 line
lib/pdump/rte_pdump.h +0 -0
 #ifdef __cplusplus

This header does use rte_mempool and rte_ring in

rte_pdump_enable().

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Not sure why IWYU thinks they should be removed.

Because they are only used as pointer types, not as

structures

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

themselves.
Normally in cases like this, I would put in just "struct

rte_mempool;"

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

at
the top of the file rather than including a whole header just

for

Quoted 8 lines
Quoted 8 lines

one

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

structure.

I don't think we should introduce such a hack!
If a module uses something from a library, it makes sense to

include the header file for the library.

Quoted 2 lines
Quoted 2 lines

Putting in "struct rte_mempool;" is essentially copy-pasting

from

Quoted 3 lines
Quoted 3 lines

the library, although only a structure. What happens if the type changes or disappears, or depends on some #ifdef? It could have one type in some cases and another type in other cases - e.g. the

atomic

Quoted 5 lines
Quoted 5 lines

counters in the mbuf once had different types, depending on compile time flags. The copy-pasted code would not get fixed if the type evolved over time.

Quoted 2 lines

By "struct rte_mempool;" I mean literally just that. All it does

is

Quoted 1 line
Quoted 1 line
Quoted 1 line

indicate that there is a structure defined somewhere else that

will

Quoted 4 lines
Quoted 2 lines

be used

Quoted 1 line

via pointer in the file later on.

Yes, I did understand that. Like a forward declaration, often used in

structures referencing each other.

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

There is no copy-pasting involved and the reference does not need to change as the structure changes.

I meant that the rte_mempool itself could change type, so it is no

longer a structure. Then the "copy-pasted" forward declaration will allow the code to compile, not catching that the type has changed.

Quoted 2 lines

The refcnt member of the mbuf structure changed over time from being

a structure (specifically rte_atomic_t, which was a typedef) to being a simple uint16_t. So types changing over time does happen in the real world, also in DPDK.

Quoted 1 line
Quoted 11 lines

If the type does change, then it will still be caught via compilation error, since the corresponding .c file will have to include the full mempool header to access the internals of the data structures. That will
trigger a compilation failure on the function in the .c file, requiring the
parameter type to change from e.g. struct to union.
Overall, though, if a type does change, one would expect that a global search replace would be used throughout the whole codebase, so I consider
the possibilities of problems here to be very, very remote.

Quoted 6 lines

Thank you for elaborating, Bruce.

Although I agree that the risk of problems is extremely low, I still prefer eliminating risks over reducing compile time.

It boils down to different opinions about the cost/benefit analysis, and it seems that Stephen and you outnumber me, so I'll stop complaining about it. ;-)

In this case it probably doesn't matter that much, either way, and thanks for flagging issues with this!

Hopefully my final word on this is that it can sometimes be more problematic than just compilation time. I've hit issues in the past when working on DPDK, where adding in a needed header include to another header, created an include loop that broke compilation, because one of the headers in the chain/loop had included another header just to get a reference to a structure half-way down the file. Ever since, I've had a strong dislike for including unnecessary headers, especially if it is just for a pointer to a struct.

Regards,
/Bruce

#181 lore raw

PATCH v6 21/50 pci: remove unneeded header includes

In reply to Sean Morrissey

These header includes have been flagged by the iwyu_tool and removed.

---
 lib/pci/rte_pci.c | 15 +--------------
 lib/pci/rte_pci.h |  1 -
 2 files changed, 1 insertion(+), 15 deletions(-)
lib/pci/rte_pci.c +1 -14
index c91be8b167..355772ff56 100644
@@ -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 -1
index 71cbd441c7..5088157e74 100644
@@ -17,7 +17,6 @@ extern "C" {
 #endif
 
 #include <stdio.h>
-#include <limits.h>
 #include <inttypes.h>
 #include <sys/types.h>
 
Signature · 1 line
2.25.1
#182 lore raw

PATCH v6 22/50 pcapng: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 03edabe73e..5ae96a5bc9 100644
@@ -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
index 8d3fbb1941..7d2697c647 100644
@@ -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 __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
Acked-by on v6 22/50
#183 lore raw

Re: [PATCH v6 22/50] pcapng: remove unneeded header includes

Quoted 14 lines · On Wed, 2 Feb 2022 09:47:34 +0000 Sean Morrissey <[email protected]>…

These 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 -0
index 03edabe73e..5ae96a5bc9 100644

lib/pcapng/rte_pcapng.c line 12

Quoted 6 lines
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>

yes, remove this. It was leftover from earlier code where utsname was called here in setup.

Quoted 5 lines
lib/pcapng/rte_pcapng.h +0 -0
index 8d3fbb1941..7d2697c647 100644

lib/pcapng/rte_pcapng.h line 32

Quoted 9 lines
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 __cplusplus
 extern "C" {

Yes, these can go.

#184 lore raw

PATCH v6 23/50 node: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 13b8b705f0..5294607619 100644
@@ -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
index 4c23961505..a19237b42f 100644
@@ -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
index 075149089f..7d2d72f823 100644
@@ -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
index d083a725fc..8bce03d7db 100644
@@ -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
index 99ecb457ff..34a920df5e 100644
@@ -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
index b95454dd72..3e75f2cf78 100644
@@ -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
index c350013236..1ad7fccd28 100644
@@ -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
#185 lore raw

PATCH v6 24/50 net: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 3740fe3c9d..f6a3ce9bcd 100644
@@ -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
index 053b54b390..dd75845636 100644
@@ -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
index 9f7eb6b375..22af519586 100644
@@ -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
index 3d9852d9e2..bf8a55ba06 100644
@@ -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
index 53a7f4d360..56611fc8f9 100644
@@ -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
index d9a526ab7b..a685f9e7bb 100644
@@ -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
#186 lore raw

PATCH v6 25/50 metrics: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e2a0fbeda8..0c7878e65f 100644
@@ -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
#187 lore raw

PATCH v6 26/50 mempool: remove unneeded header includes

In reply to Sean Morrissey

These 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
index c5a699b1d6..de59009baf 100644
@@ -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
index 1e7a3c1527..5f9f9ead9b 100644
@@ -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
#188 lore raw

PATCH v6 27/50 member: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9dd55a5adf..7e1632e6b5 100644
@@ -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
index c0689e233e..567ee0c84b 100644
@@ -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
index 8a232bae02..9df4620cff 100644
@@ -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
#189 lore raw

PATCH v6 28/50 mbuf: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 604d77bbda..87592faccb 100644
@@ -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
index dedf83c38d..9811e8c760 100644
@@ -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
index 29abe8da53..ed8e57b350 100644
@@ -68,9 +68,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
-#include <sys/types.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/mbuf/rte_mbuf_pool_ops.c +0 -1
index f0e87a1412..4c91f4ce85 100644
@@ -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
index 7ed95a49a4..00cddb83ba 100644
@@ -14,7 +14,6 @@
  * the best mempool ops available.
  */
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#190 lore raw

PATCH v6 29/50 lpm: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 002811f4de..cdcd1b7f9e 100644
@@ -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
index 5eb14c1748..eb91960e81 100644
@@ -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
index 73768fc956..8d21aeddb8 100644
@@ -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
index f96f3372e5..9b07260d5a 100644
@@ -10,7 +10,6 @@
  */
 
 #include <stdint.h>
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#191 lore raw

PATCH v6 30/50 latencystats: remove unneeded header includes

In reply to Sean Morrissey

These 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
index ab8db7a139..8985a377db 100644
@@ -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
#192 lore raw

PATCH v6 31/50 kni: remove unneeded header includes

In reply to Sean Morrissey

These 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
index fc8f0e7b5a..7971c56bb4 100644
@@ -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
index b0eaf46104..b85d3dd32b 100644
@@ -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
#193 lore raw

PATCH v6 32/50 jobstats: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9b8fde5d55..af565a14ea 100644
@@ -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
#194 lore raw

PATCH v6 33/50 ipsec: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 636c850fa6..f159bf7460 100644
@@ -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
index 672e56aba0..6925bb9945 100644
@@ -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
index 531e1e323c..6f3860e3f5 100644
@@ -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
index cdb70af0cb..1b673b6a18 100644
@@ -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
index 7503587b50..46f9a4df5b 100644
@@ -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
#195 lore raw

PATCH v6 34/50 ip_frag: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 2c781a6d33..c1de2e81b6 100644
@@ -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
index 2e7739d027..669682a0cf 100644
@@ -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
#196 lore raw

PATCH v6 35/50 hash: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 1191dfd81a..490f94af4b 100644
@@ -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
index 576e8e6662..538b23a403 100644
@@ -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
index 9c3a61c1d6..b01126999b 100644
@@ -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
index 6847e36f4b..0249883b8d 100644
@@ -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
index c11ca0d5b8..451f64043a 100644
@@ -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
#197 lore raw

PATCH v6 36/50 gro: remove unneeded header includes

In reply to Sean Morrissey

These 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
index aff22178e3..7498c66141 100644
@@ -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
index bb875a5ef0..212f97a042 100644
@@ -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
index e78dda7874..dd71135ada 100644
@@ -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
index d38b393f79..6467d7bc3b 100644
@@ -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
index 2005899afe..3be4deb7c7 100644
@@ -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
index 4767c910bb..b78a7ae89e 100644
@@ -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
index 8ca4da67e9..6f7dd4d709 100644
@@ -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
#198 lore raw

PATCH v6 37/50 graph: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f8aea16acb..b84412f5dd 100644
@@ -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
index 3355953118..20db58d84e 100644
@@ -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
index 093512efab..102fd6c29b 100644
@@ -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
index 86ec4316f9..79230035a2 100644
@@ -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
#199 lore raw

PATCH v6 38/50 gpudev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 59e2169292..1083a3003e 100644
@@ -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
#200 lore raw

PATCH v6 39/50 flow_classify: remove unneeded header includes

In reply to Sean Morrissey

These 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
index d3ba2ed227..e3667306e5 100644
@@ -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
index 82ea92b6a6..39512b6206 100644
@@ -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 __cplusplus
 extern "C" {
lib/flow_classify/rte_flow_classify_parse.c +0 -1
index 465330291f..345d129d35 100644
@@ -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
index 365a07bd6d..7943efc0d4 100644
@@ -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
#201 lore raw

PATCH v6 40/50 fib: remove unneeded header includes

In reply to Sean Morrissey

These 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
index bb3bc9753b..a8ba4f64ca 100644
@@ -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
index 0cced97a77..8af4c40919 100644
@@ -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
index e592d3251a..90f28b7e11 100644
@@ -17,7 +17,6 @@
 
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/fib/rte_fib6.c +0 -2
index eebee297d6..4b8e22b142 100644
@@ -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
index cb133719e1..62a425d9af 100644
@@ -17,7 +17,6 @@
 
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/fib/trie.c +0 -5
index 044095bf03..3e780afdaf 100644
@@ -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
index 9fd15ae79f..3cf161ae25 100644
@@ -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
#202 lore raw

PATCH v6 41/50 eventdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index d27e23901d..c070715148 100644
@@ -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
index c0861b0ec2..0a54f7fde2 100644
@@ -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
index 9dad170b5a..7dc39386c9 100644
@@ -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
index 1551741820..aefa322344 100644
@@ -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
index 79b9ea3a02..1c1b66de88 100644
@@ -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
index eef47d8acc..5738a8d9ea 100644
@@ -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
#203 lore raw

PATCH v6 42/50 efd: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 86ef46863c..560cd78961 100644
@@ -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
#204 lore raw

PATCH v6 43/50 dmadev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 4abe79c536..ad9e7a0975 100644
@@ -149,7 +149,6 @@
 #include <rte_bitops.h>
 #include <rte_common.h>
 #include <rte_compat.h>
-#include <rte_dev.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
2.25.1
#205 lore raw

PATCH v6 44/50 distributor: remove unneeded header includes

In reply to Sean Morrissey

These 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
index c210cf86bd..3035b7a999 100644
@@ -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
index e3b3b79264..11d8819278 100644
@@ -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
index b653620688..de90aa8bb5 100644
@@ -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
#206 lore raw

PATCH v6 45/50 compressdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 3b0e46f96e..320c6dab92 100644
@@ -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
index 95306c5d03..cdb55e5887 100644
@@ -16,7 +16,6 @@
 extern "C" {
 #endif
 
-#include <rte_mempool.h>
 #include <rte_mbuf.h>
 
 /**
lib/compressdev/rte_compressdev.c +0 -1
index 2e9218af68..202ee694d8 100644
@@ -3,7 +3,6 @@
  */
 
 #include <string.h>
-#include <stdarg.h>
 #include <stdio.h>
 #include <inttypes.h>
 
lib/compressdev/rte_compressdev.h +0 -1
index 2840c27c6c..aa865c4c03 100644
@@ -21,7 +21,6 @@
 extern "C" {
 #endif
 
-#include <rte_common.h>
 
 #include "rte_comp.h"
 
lib/compressdev/rte_compressdev_pmd.h +0 -2
index f9a42d1f05..9fabc399c5 100644
@@ -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
#207 lore raw

PATCH v6 46/50 cmdline: remove unneeded header includes

In reply to Sean Morrissey

These header includes have been flagged by the iwyu_tool and removed.

---
 lib/cmdline/cmdline.c                | 2 --
 lib/cmdline/cmdline_parse.c          | 3 ---
 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 ---
 6 files changed, 17 deletions(-)
lib/cmdline/cmdline.c +0 -2
index 8f1854cb0b..e1009ba4c4 100644
@@ -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_parse.c +0 -3
index f5cc934782..349ec87bd7 100644
@@ -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_portlist.c +0 -3
index e1aa07be4b..2e2294553a 100644
@@ -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
index 9cf41d0f76..d756638905 100644
@@ -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
index d92b1cda53..5cf723a012 100644
@@ -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_vt100.c +0 -3
index bb968dd5fa..4c9a46c953 100644
@@ -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
#208 lore raw

PATCH v6 47/50 bpf: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 0caad2a8f0..1e1dd42a58 100644
@@ -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
index b921112feb..09f4a9a571 100644
@@ -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
index 518513376a..c1a30e0386 100644
@@ -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
index 272f2ba11b..0c4ac7be6c 100644
@@ -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
index af422afc07..ffd2db7840 100644
@@ -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
index 09331258eb..9ff86fc970 100644
@@ -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
#209 lore raw

PATCH v6 48/50 bbdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 7f353d4f7e..aaee7b7872 100644
@@ -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
index 1dbcf73b0e..b88c88167e 100644
@@ -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
#210 lore raw

PATCH v6 49/50 cryptodev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index b9146f652c..8cf2da9b69 100644
@@ -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
index a40536c5ea..8c1cccef0b 100644
@@ -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
index 59ea5a54df..3493384fc7 100644
@@ -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
#211 lore raw

PATCH v6 50/50 acl: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 4e693b2488..a61c3ba188 100644
@@ -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
#212 lore raw

v7 cover introduce IWYU

In reply to Sean Morrissey

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.

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.

V6:
* Fix some Windows build issues.
* Fix some RHEL 8 build issues.

V7:
* Further RHEL 8 and FreeBSD build issues fixed.

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_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             |   1 -
 lib/eal/common/eal_common_memalloc.c        |   3 -
 lib/eal/common/eal_common_memory.c          |   4 -
 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                     |   1 -
 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                           |   1 -
 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            |   6 --
 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                       |   6 --
 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 -
 235 files changed, 113 insertions(+), 683 deletions(-)
 create mode 100755 devtools/process_iwyu.py
Signature · 1 line
2.25.1
#213 lore raw

PATCH v7 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
new file mode 100755
index 0000000000..50f3d4c5c7
@@ -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
#214 lore raw

PATCH v7 2/50 telemetry: remove unneeded header includes

In reply to Sean Morrissey

These 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
index e5ccfe47f7..c6fd03a5ab 100644
@@ -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
index adb84a09f1..26aa28e72c 100644
@@ -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
#215 lore raw

PATCH v7 3/50 ring: remove unneeded header includes

In reply to Sean Morrissey

These 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
index f17bd966be..7945e5d9ed 100644
@@ -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
#216 lore raw

PATCH v7 4/50 kvargs: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 11f624ef14..c77bb82feb 100644
@@ -8,7 +8,6 @@
 #include <stdbool.h>
 
 #include <rte_os_shim.h>
-#include <rte_string_fns.h>
 
 #include "rte_kvargs.h"
 
Signature · 1 line
2.25.1
#217 lore raw

PATCH v7 5/50 eal: remove unneeded header includes

In reply to Sean Morrissey

These 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        |  1 -
 lib/eal/common/eal_common_memalloc.c   |  3 ---
 lib/eal/common/eal_common_memory.c     |  4 ----
 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(+), 200 deletions(-)
lib/eal/common/eal_common_dev.c +0 -5
index e1e9976d8d..c0ee4e442f 100644
@@ -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
index 8c7650cf6c..c3c3a9e6e4 100644
@@ -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
index f86802705a..1091065568 100644
@@ -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
index 3a28a53247..f11f87979f 100644
@@ -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
index 2d2179d411..63bbbdcf0a 100644
@@ -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
index e95dadffb3..9f393b9bda 100644
@@ -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
index 5de7570aac..11092791a4 100644
@@ -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 -1
index 1be35f5397..2185857cf7 100644
@@ -12,7 +12,6 @@
 #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>
lib/eal/common/eal_common_memalloc.c +0 -3
index e872c6533b..f8770ff835 100644
@@ -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 -4
index 88517fd69e..688dc615d7 100644
@@ -2,16 +2,12 @@
  * 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
index ecde9441ee..0059de6981 100644
@@ -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
index 1cfdd75f3b..071f1acf50 100644
@@ -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
index ebd0f6673b..575b4ca24d 100644
@@ -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
index ddd1891656..0236ae4023 100644
@@ -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
index ead06897b8..580fbf24bc 100644
@@ -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
index bb6fc8084c..684bea166c 100644
@@ -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
index 86f8429847..5686a5102b 100644
@@ -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
index 7bff1cd2ce..036f6ac348 100644
@@ -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
index 8fcf9b52e2..066494ff27 100644
@@ -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
index bdd20a162e..c08f129c04 100644
@@ -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
index 55aad2711b..5ee5b07941 100644
@@ -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
index 2e597a17a2..801b2e7fbd 100644
@@ -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
index 0095062b72..fb10817e13 100644
@@ -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
index d0bec26920..7bcbec51a2 100644
@@ -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
index ce21c2242a..4535cc980c 100644
@@ -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
index bd8fb72e78..ef31b1f63c 100644
@@ -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
index b06a62e7a2..414b6167f2 100644
@@ -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
index 60b4924838..b5621e64e2 100644
@@ -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
index 3b5e894595..4de67138bc 100644
@@ -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
index d38296e1e5..c684940e1d 100644
@@ -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
index 64dab4e0da..b0ecf5a9dc 100644
@@ -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
index bde55a3d92..f6e5861221 100644
@@ -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
index 9fb0e968db..3f760f85ca 100644
@@ -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
index 70060bf3ef..d52ec8eb4c 100644
@@ -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
index bc8965844c..2e6a350603 100644
@@ -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
index c0aa1007c4..9e72412e2b 100644
@@ -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
index 16b58d861b..026701f331 100644
@@ -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
index 03a4f2dd2d..40ec9663d0 100644
@@ -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
index c7f0f9b2f7..fa6cd7e2c4 100644
@@ -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
index 7cf15cabac..620baf038d 100644
@@ -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
index a2accfab3a..e1776166af 100644
@@ -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
index ec554e0096..f04f5fbcbc 100644
@@ -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
index c72d619ec1..c34ede9186 100644
@@ -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
index edd9621abb..0e695caf28 100644
@@ -6,7 +6,6 @@
 #include <unistd.h>
 #include <cpuid.h>
 
-#include <rte_common.h>
 
 #include "eal_private.h"
 
Signature · 1 line
2.25.1
#218 lore raw

PATCH v7 6/50 vhost: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 55d4856f9e..1876fada33 100644
@@ -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
index 3ab5cfdd60..6f4499bdfa 100644
@@ -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
index 82963c1e6d..c22d84a2cb 100644
@@ -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
index 09ad5d866e..7c57b3f75b 100644
@@ -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
index 13a9bb9dd1..40703b882f 100644
@@ -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
index 7085e0885c..819d361578 100644
@@ -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
index 5eb1dd6812..f8c216c453 100644
@@ -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
#219 lore raw

PATCH v7 7/50 timer: remove unneeded header includes

In reply to Sean Morrissey

These header includes have been flagged by the iwyu_tool and removed.

---
 lib/timer/rte_timer.c | 6 ------
 1 file changed, 6 deletions(-)
lib/timer/rte_timer.c +0 -6
index 6d19ce469b..c51a393e5c 100644
@@ -2,7 +2,6 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
-#include <string.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -13,18 +12,13 @@
 #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
#220 lore raw

PATCH v7 8/50 table: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 03b28c4c9d..f783cfe282 100644
@@ -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
index 909ada483b..b7423dd060 100644
@@ -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
index c3c840ff06..15576c2aa3 100644
@@ -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
index d6ec733655..eb9d7689fd 100644
@@ -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
index 541ebc2213..ad99f18453 100644
@@ -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
index e260be1062..27a67b47bd 100644
@@ -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
index 9e228f971c..4fd52c0a17 100644
@@ -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
index 14d54019f0..179a1da835 100644
@@ -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
index 8264c50c27..54a0c42f7d 100644
@@ -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
index f024303330..c77eccf527 100644
@@ -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
index 802a24fe0f..70ea84fa2e 100644
@@ -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
index c4384b114d..ea8195dc17 100644
@@ -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
index 3e0031fe1e..87f83ce6f5 100644
@@ -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
index 34e3ed1af9..7779a9d1a3 100644
@@ -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
index 5bcdb7ba02..c31acc11cf 100644
@@ -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
index 4dd8289ce5..9de9e8a20d 100644
@@ -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
index 4e068d79bf..8fde2c012f 100644
@@ -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
index 9ce7be9cec..23d0de5c79 100644
@@ -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
index 2b40739790..9086e4edcc 100644
@@ -17,7 +17,6 @@ extern "C" {
  *
  ***/
 
-#include <stdint.h>
 
 #include "rte_table.h"
 
Signature · 1 line
2.25.1
#221 lore raw

PATCH v7 9/50 stack: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 56bf2c8d6d..1fabec2bfe 100644
@@ -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
index 321f4cec1a..91fc570767 100644
@@ -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
#222 lore raw

PATCH v7 10/50 security: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6e45a03fa0..4f5e4b4d49 100644
@@ -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
index 1228b6c8b1..d54d993ccc 100644
@@ -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
#223 lore raw

PATCH v7 11/50 sched: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 934e9aee50..cdb7bab697 100644
@@ -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
index f5843dab1b..80b43b6da0 100644
@@ -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
index 62b3d2e315..e5c62e3d77 100644
@@ -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
index 3c625ba169..5ece64e527 100644
@@ -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
#224 lore raw

PATCH v7 12/50 rib: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 6c29e1c49a..cd9e823068 100644
@@ -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
index bebb30f7d7..c18c4ca594 100644
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 
-#include <rte_compat.h>
 
 #ifdef __cplusplus
 extern "C" {
lib/rib/rte_rib6.c +0 -2
index 70405113b4..042ac1f090 100644
@@ -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
index 6f532265c6..fa8e9bf732 100644
@@ -15,7 +15,6 @@
  */
 
 #include <rte_memcpy.h>
-#include <rte_compat.h>
 #include <rte_common.h>
 
 #ifdef __cplusplus
Signature · 1 line
2.25.1
#225 lore raw

PATCH v7 13/50 reorder: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 9445853b79..f40a48201f 100644
@@ -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
#226 lore raw

PATCH v7 14/50 regexdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 04ab713730..02a388bc5d 100644
@@ -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
index 0bac46cda9..4ba67b0c25 100644
@@ -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
#227 lore raw

PATCH v7 15/50 rcu: remove unneeded header includes

In reply to Sean Morrissey

These 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
index 7510db2f81..17be93e830 100644
@@ -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
index 62a420a785..d81bf5e8db 100644
@@ -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
#228 lore raw

PATCH v7 16/50 rawdev: remove unneeded header includes

In reply to Sean Morrissey

These 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
index a6134e76ea..2f0a4f132e 100644
@@ -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
#229 lore raw

PATCH v7 17/50 power: remove unneeded header includes

In reply to Sean Morrissey

These 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           | 6 ------
 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(+), 39 deletions(-)
examples/vm_power_manager/guest_cli/main.c +1 -0
index b8fa65ef15..9da50020ac 100644
@@ -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
index 474dd92998..969a9e5aaa 100644
@@ -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
index 402ed8c99b..6e57aca535 100644
@@ -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
index 41675b9cd9..682fd9278c 100644
@@ -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
index 0b264edfa5..c1c7139276 100644
@@ -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
index 25185a791c..ef06fbcd9e 100644
@@ -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
index 4e73c91b05..f4121b237e 100644
@@ -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
index ab7d4b8cee..6a8109d449 100644
@@ -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
index 9a309a300f..303fcc041b 100644
@@ -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 -6
index 86f8a76e46..f4c36179ec 100644
@@ -3,20 +3,14 @@
  */
 
 #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
index 3260b32494..7bf64a518c 100644
@@ -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
index 3cba56bac9..0a6614be77 100644
@@ -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
index c5759afa39..47345e26df 100644
@@ -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
index c4b5de9601..dca88555aa 100644
@@ -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