build: remove redundant config include
PATCH 1/1 build: remove redundant config include
The header file rte_config.h is always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications.
In the internal files, explicit include of rte_config.h is useless, and can be removed.
--- app/test-pmd/config.c | 1 - buildtools/pmdinfogen/pmdinfogen.h | 1 - drivers/common/mlx5/mlx5_glue.c | 2 -- drivers/crypto/ccp/rte_ccp_pmd.c | 1 - drivers/net/af_xdp/rte_eth_af_xdp.c | 1 - drivers/net/failsafe/failsafe_intr.c | 1 - drivers/net/hinic/base/hinic_compat.h | 1 - drivers/net/mlx4/mlx4.c | 1 - drivers/net/mlx5/mlx5.c | 1 - drivers/net/vdev_netvsc/vdev_netvsc.c | 1 - lib/librte_eal/common/eal_common_mcfg.c | 1 - lib/librte_eal/common/eal_memcfg.h | 1 - 12 files changed, 13 deletions(-)
app/test-pmd/config.c +0 -1
@@ -49,7 +49,6 @@#include <rte_pmd_bnxt.h> #endif #include <rte_gro.h> -#include <rte_config.h> #include "testpmd.h"
buildtools/pmdinfogen/pmdinfogen.h +0 -1
@@ -24,7 +24,6 @@#include <fcntl.h> #include <unistd.h> #include <elf.h> -#include <rte_config.h> #include <rte_pci.h> /* On BSD-alike OSes elf.h defines these according to host's word size */
drivers/common/mlx5/mlx5_glue.c +0 -2
@@ -14,8 +14,6 @@*/ #include <sys/types.h> -#include <rte_config.h> -#include "mlx5_glue.h" static int
drivers/crypto/ccp/rte_ccp_pmd.c +0 -1
@@ -6,7 +6,6 @@#include <rte_bus_pci.h> #include <rte_bus_vdev.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_cryptodev.h> #include <rte_cryptodev_pmd.h> #include <rte_pci.h>
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -1
@@ -26,7 +26,6 @@#include <rte_string_fns.h> #include <rte_branch_prediction.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_eal.h> #include <rte_ether.h>
drivers/net/failsafe/failsafe_intr.c +0 -1
@@ -13,7 +13,6 @@#include <unistd.h> #include <rte_alarm.h> -#include <rte_config.h> #include <rte_errno.h> #include <rte_ethdev.h> #include <rte_interrupts.h>
drivers/net/hinic/base/hinic_compat.h +0 -1
@@ -18,7 +18,6 @@#include <rte_spinlock.h> #include <rte_cycles.h> #include <rte_log.h> -#include <rte_config.h> typedef uint8_t u8 ;typedef int8_t s8 ;
drivers/net/mlx4/mlx4.c +0 -1
@@ -29,7 +29,6 @@#endif #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_errno.h> #include <rte_ethdev_driver.h>
drivers/net/mlx5/mlx5.c +0 -1
@@ -29,7 +29,6 @@#include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_kvargs.h> #include <rte_rwlock.h> #include <rte_spinlock.h>
drivers/net/vdev_netvsc/vdev_netvsc.c +0 -1
@@ -27,7 +27,6 @@#include <rte_bus.h> #include <rte_bus_vdev.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_errno.h> #include <rte_ethdev.h>
lib/librte_eal/common/eal_common_mcfg.c +0 -1
@@ -2,7 +2,6 @@* Copyright(c) 2019 Intel Corporation */ -#include <rte_config.h> #include <rte_eal_memconfig.h> #include <rte_version.h>
lib/librte_eal/common/eal_memcfg.h +0 -1
@@ -5,7 +5,6 @@#ifndef EAL_MEMCFG_H #define EAL_MEMCFG_H -#include <rte_config.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_pause.h>
Signature · 1 line
2.25.0
From: Thomas Monjalon
Quoted 9 lines
Subject: [PATCH] build: remove redundant config include
The header file
rte_config.his always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications.
In the internal files, explicit include ofrte_config.his useless, and can be removed.Signed-off-by Thomas Monjalon <[email protected]>
Quoted 8 lines · Thomas Monjalon
The header file
rte_config.his always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications.
In the internal files, explicit include ofrte_config.his useless, and can be removed.Signed-off-by Thomas Monjalon <[email protected]>
Quoted 14 lines
--- app/test-pmd/config.c | 1 - buildtools/pmdinfogen/pmdinfogen.h | 1 - drivers/common/mlx5/mlx5_glue.c | 2 -- drivers/crypto/ccp/rte_ccp_pmd.c | 1 - drivers/net/af_xdp/rte_eth_af_xdp.c | 1 - drivers/net/failsafe/failsafe_intr.c | 1 - drivers/net/hinic/base/hinic_compat.h | 1 - drivers/net/mlx4/mlx4.c | 1 - drivers/net/mlx5/mlx5.c | 1 - drivers/net/vdev_netvsc/vdev_netvsc.c | 1 - lib/librte_eal/common/eal_common_mcfg.c | 1 - lib/librte_eal/common/eal_memcfg.h | 1 - 12 files changed, 13 deletions(-)
Signature · 1 line
David Marchand
Quoted 171 lines · Thomas Monjalon
The header file
rte_config.his always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications.
In the internal files, explicit include ofrte_config.his useless, and can be removed.Signed-off-by Thomas Monjalon <[email protected]>--- app/test-pmd/config.c | 1 - buildtools/pmdinfogen/pmdinfogen.h | 1 - drivers/common/mlx5/mlx5_glue.c | 2 -- drivers/crypto/ccp/rte_ccp_pmd.c | 1 - drivers/net/af_xdp/rte_eth_af_xdp.c | 1 - drivers/net/failsafe/failsafe_intr.c | 1 - drivers/net/hinic/base/hinic_compat.h | 1 - drivers/net/mlx4/mlx4.c | 1 - drivers/net/mlx5/mlx5.c | 1 - drivers/net/vdev_netvsc/vdev_netvsc.c | 1 - lib/librte_eal/common/eal_common_mcfg.c | 1 - lib/librte_eal/common/eal_memcfg.h | 1 - 12 files changed, 13 deletions(-)app/test-pmd/config.c +0
-1@@ -49,7 +49,6 @@#include <rte_pmd_bnxt.h> #endif #include <rte_gro.h> -#include <rte_config.h> #include "testpmd.h" buildtools/pmdinfogen/pmdinfogen.h +0
-1@@ -24,7 +24,6 @@#include <fcntl.h> #include <unistd.h> #include <elf.h> -#include <rte_config.h> #include <rte_pci.h> /* On BSD-alike OSes elf.h defines these according to host's word size */ drivers/common/mlx5/mlx5_glue.c +0
-2@@ -14,8 +14,6 @@*/ #include <sys/types.h> -#include <rte_config.h> -#include "mlx5_glue.h" static intdrivers/crypto/ccp/rte_ccp_pmd.c +0
-1@@ -6,7 +6,6 @@#include <rte_bus_pci.h> #include <rte_bus_vdev.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_cryptodev.h> #include <rte_cryptodev_pmd.h> #include <rte_pci.h> drivers/net/af_xdp/rte_eth_af_xdp.c +0
-1@@ -26,7 +26,6 @@#include <rte_string_fns.h> #include <rte_branch_prediction.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_eal.h> #include <rte_ether.h> drivers/net/failsafe/failsafe_intr.c +0
-1@@ -13,7 +13,6 @@#include <unistd.h> #include <rte_alarm.h> -#include <rte_config.h> #include <rte_errno.h> #include <rte_ethdev.h> #include <rte_interrupts.h> drivers/net/hinic/base/hinic_compat.h +0
-1@@ -18,7 +18,6 @@#include <rte_spinlock.h> #include <rte_cycles.h> #include <rte_log.h> -#include <rte_config.h> typedef uint8_t u8 ;typedef int8_t s8 ;drivers/net/mlx4/mlx4.c +0
-1@@ -29,7 +29,6 @@#endif #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_errno.h> #include <rte_ethdev_driver.h> drivers/net/mlx5/mlx5.c +0
-1@@ -29,7 +29,6 @@#include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_kvargs.h> #include <rte_rwlock.h> #include <rte_spinlock.h> drivers/net/vdev_netvsc/vdev_netvsc.c +0
-1@@ -27,7 +27,6 @@#include <rte_bus.h> #include <rte_bus_vdev.h> #include <rte_common.h> -#include <rte_config.h> #include <rte_dev.h> #include <rte_errno.h> #include <rte_ethdev.h> lib/librte_eal/common/eal_common_mcfg.c +0
-1@@ -2,7 +2,6 @@* Copyright(c) 2019 Intel Corporation */ -#include <rte_config.h> #include <rte_eal_memconfig.h> #include <rte_version.h> lib/librte_eal/common/eal_memcfg.h +0
-1@@ -5,7 +5,6 @@#ifndef EAL_MEMCFG_H #define EAL_MEMCFG_H -#include <rte_config.h> #include <rte_memory.h> #include <rte_memzone.h> #include <rte_pause.h> Signature · 1 line
2.25.0
Quoted 8 lines · Thomas Monjalon
The header file
rte_config.his always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications.
In the internal files, explicit include ofrte_config.his useless, and can be removed.Signed-off-by Thomas Monjalon <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand