* [dpdk-dev] [PATCH 00/20] ensure headers have correct includes @ 2021-01-14 11:05 Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 01/20] eal: fix missing header inclusion Bruce Richardson ` (25 more replies) 0 siblings, 26 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. This patchset fixes any missing includes in public headers from the DPDK "lib" folder and then adds a "chkincs" app. to verify this on an ongoing basis. This chkincs app does nothing when run, it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, for example. Bruce Richardson (20): eal: fix missing header inclusion telemetry: fix missing header include ethdev: fix missing header include ring: fix missing includes for c11 model header net: fix missing header include mbuf: fix missing header include bitratestats: fix missing header include rib: fix missing header includes vhost: fix missing header includes ipsec: fix missing header include fib: fix missing header includes table: fix missing header include pipeline: fix missing header includes metrics: fix variable declaration in header node: fix missing header include app: fix extra include paths for app builds app/chkincs: add chkincs app to verify headers eal: add missing include to mcslock eal/x86: add architecture-specific headers to chkincs test-meson-builds: add includes check to default x86 build app/chkincs/gen_c_file_for_header.py | 53 ++++++++++++++++++++ app/chkincs/main.c | 4 ++ app/chkincs/meson.build | 28 +++++++++++ app/meson.build | 2 + devtools/test-meson-builds.sh | 2 +- lib/librte_bitratestats/rte_bitrate.h | 1 + lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/rte_reciprocal.h | 1 + lib/librte_eal/x86/include/meson.build | 1 + lib/librte_ethdev/rte_eth_ctrl.h | 1 + lib/librte_fib/rte_fib.h | 1 + lib/librte_fib/rte_fib6.h | 1 + lib/librte_ipsec/rte_ipsec_sad.h | 1 + lib/librte_mbuf/rte_mbuf_core.h | 1 + lib/librte_mbuf/rte_mbuf_dyn.h | 3 ++ lib/librte_metrics/rte_metrics_telemetry.c | 2 + lib/librte_metrics/rte_metrics_telemetry.h | 2 - lib/librte_net/rte_geneve.h | 1 + lib/librte_node/rte_node_ip4_api.h | 1 + lib/librte_pipeline/rte_swx_ctl.h | 1 + lib/librte_pipeline/rte_swx_pipeline.h | 1 + lib/librte_rib/rte_rib.h | 2 + lib/librte_ring/rte_ring_c11_mem.h | 4 ++ lib/librte_table/rte_lru_x86.h | 1 + lib/librte_telemetry/rte_telemetry.h | 1 + lib/librte_vhost/rte_vdpa.h | 2 + lib/librte_vhost/rte_vdpa_dev.h | 1 + lib/librte_vhost/rte_vhost_crypto.h | 7 +++ lib/meson.build | 1 + meson.build | 1 + meson_options.txt | 2 + 31 files changed, 128 insertions(+), 3 deletions(-) create mode 100755 app/chkincs/gen_c_file_for_header.py create mode 100644 app/chkincs/main.c create mode 100644 app/chkincs/meson.build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 01/20] eal: fix missing header inclusion 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 02/20] telemetry: fix missing header include Bruce Richardson ` (24 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_reciprocal header file used standard __rte_always_inline from rte_common.h but does not include that header file, leading to compiler errors when the reciprocal header is included alone. Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_reciprocal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h index 63e16fde0a..4a59be30a8 100644 --- a/lib/librte_eal/include/rte_reciprocal.h +++ b/lib/librte_eal/include/rte_reciprocal.h @@ -26,6 +26,7 @@ #define _RTE_RECIPROCAL_H_ #include <stdint.h> +#include <rte_common.h> struct rte_reciprocal { uint32_t m; -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 02/20] telemetry: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 01/20] eal: fix missing header inclusion Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 03/20] ethdev: " Bruce Richardson ` (23 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The telemetry header file uses the rte_cpuset_t type, but does not include any header providing that type. Include rte_os.h to provide the necessary type. Fixes: febbebf7f255 ("telemetry: keep threads separate from data plane") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_telemetry/rte_telemetry.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h index 4693275c24..561c6b1658 100644 --- a/lib/librte_telemetry/rte_telemetry.h +++ b/lib/librte_telemetry/rte_telemetry.h @@ -5,6 +5,7 @@ #include <stdint.h> #include <sched.h> #include <rte_compat.h> +#include <rte_os.h> #ifndef _RTE_TELEMETRY_H_ #define _RTE_TELEMETRY_H_ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 03/20] ethdev: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 01/20] eal: fix missing header inclusion Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 02/20] telemetry: fix missing header include Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header Bruce Richardson ` (22 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The define for RTE_ETH_FLOW_MAX is defined in rte_ethdev.h, so that header should be included in rte_eth_ctrl.h to allow it to be compiled independently. Fixes: 7fa96d696f2c ("ethdev: unification of flow types") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_ethdev/rte_eth_ctrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h index 1cca522fa3..8a50dbfef9 100644 --- a/lib/librte_ethdev/rte_eth_ctrl.h +++ b/lib/librte_ethdev/rte_eth_ctrl.h @@ -9,6 +9,7 @@ #include <rte_common.h> #include <rte_ether.h> #include "rte_flow.h" +#include "rte_ethdev.h" /** * @deprecated Please use rte_flow API instead of this legacy one. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (2 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 03/20] ethdev: " Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 12:57 ` David Marchand 2021-01-14 11:05 ` [dpdk-dev] [PATCH 05/20] net: fix missing header include Bruce Richardson ` (21 subsequent siblings) 25 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable Add in the missing includes into the header file for c11 memory model, so it can be compiled up independently of the other headers. Fixes: 39368ebfc606 ("ring: introduce C11 memory model barrier option") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_ring/rte_ring_c11_mem.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h index 0fb73a3371..12caf06a31 100644 --- a/lib/librte_ring/rte_ring_c11_mem.h +++ b/lib/librte_ring/rte_ring_c11_mem.h @@ -10,6 +10,10 @@ #ifndef _RTE_RING_C11_MEM_H_ #define _RTE_RING_C11_MEM_H_ +#include <stdint.h> +#include <rte_common.h> +#include <rte_ring_core.h> + static __rte_always_inline void update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, uint32_t single, uint32_t enqueue) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header 2021-01-14 11:05 ` [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header Bruce Richardson @ 2021-01-14 12:57 ` David Marchand 2021-01-14 13:54 ` Ananyev, Konstantin 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-14 12:57 UTC (permalink / raw) To: Bruce Richardson, Honnappa Nagarahalli, Ananyev, Konstantin Cc: dev, dpdk stable On Thu, Jan 14, 2021 at 12:07 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > Add in the missing includes into the header file for c11 memory model, > so it can be compiled up independently of the other headers. > > Fixes: 39368ebfc606 ("ring: introduce C11 memory model barrier option") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_ring/rte_ring_c11_mem.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h > index 0fb73a3371..12caf06a31 100644 > --- a/lib/librte_ring/rte_ring_c11_mem.h > +++ b/lib/librte_ring/rte_ring_c11_mem.h > @@ -10,6 +10,10 @@ > #ifndef _RTE_RING_C11_MEM_H_ > #define _RTE_RING_C11_MEM_H_ > > +#include <stdint.h> > +#include <rte_common.h> > +#include <rte_ring_core.h> > + This header is never directly included, like rte_ring_generic.h. I'd rather flag it as not being checked. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header 2021-01-14 12:57 ` David Marchand @ 2021-01-14 13:54 ` Ananyev, Konstantin 0 siblings, 0 replies; 165+ messages in thread From: Ananyev, Konstantin @ 2021-01-14 13:54 UTC (permalink / raw) To: David Marchand, Richardson, Bruce, Honnappa Nagarahalli; +Cc: dev, dpdk stable > > On Thu, Jan 14, 2021 at 12:07 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > Add in the missing includes into the header file for c11 memory model, > > so it can be compiled up independently of the other headers. > > > > Fixes: 39368ebfc606 ("ring: introduce C11 memory model barrier option") > > Cc: stable@dpdk.org > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > lib/librte_ring/rte_ring_c11_mem.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h > > index 0fb73a3371..12caf06a31 100644 > > --- a/lib/librte_ring/rte_ring_c11_mem.h > > +++ b/lib/librte_ring/rte_ring_c11_mem.h > > @@ -10,6 +10,10 @@ > > #ifndef _RTE_RING_C11_MEM_H_ > > #define _RTE_RING_C11_MEM_H_ > > > > +#include <stdint.h> > > +#include <rte_common.h> > > +#include <rte_ring_core.h> > > + > > This header is never directly included, like rte_ring_generic.h. > I'd rather flag it as not being checked. Yep, it is sort of 'internal' header that we need to keep public, because of inlined ring enqueue/dequeue functions. > > > -- > David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 05/20] net: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (3 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 06/20] mbuf: " Bruce Richardson ` (20 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The Geneve protocol header file is missing the rte_byteorder.h header. Fixes: ea0e711b8ae0 ("app/testpmd: add GENEVE parsing") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_net/rte_geneve.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_geneve.h b/lib/librte_net/rte_geneve.h index bb67724c31..7c3d477dcb 100644 --- a/lib/librte_net/rte_geneve.h +++ b/lib/librte_net/rte_geneve.h @@ -11,6 +11,7 @@ * GENEVE-related definitions */ #include <stdint.h> +#include <rte_byteorder.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 06/20] mbuf: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (4 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 05/20] net: fix missing header include Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 07/20] bitratestats: " Bruce Richardson ` (19 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_mbuf_dyn.h header file uses a number of types and macros without including the required header files to get the definitions of those macros/types. Similarly, the rte_mbuf_core.h file was missing an include for rte_byteorder.h header. Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Fixes: 3eb860b08eb7 ("mbuf: move definitions into a separate file") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_mbuf/rte_mbuf_core.h | 1 + lib/librte_mbuf/rte_mbuf_dyn.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index 567551deab..34e892f21b 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -18,6 +18,7 @@ #include <stdint.h> #include <rte_compat.h> +#include <rte_byteorder.h> #include <generic/rte_atomic.h> #ifdef __cplusplus diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h index d88e7bacc5..1286a5ccf7 100644 --- a/lib/librte_mbuf/rte_mbuf_dyn.h +++ b/lib/librte_mbuf/rte_mbuf_dyn.h @@ -66,7 +66,10 @@ * - any name that does not start with "rte_" in an application */ +#include <stdio.h> +#include <stdint.h> #include <sys/types.h> +#include <rte_compat.h> /** * Maximum length of the dynamic field or flag string. */ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 07/20] bitratestats: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (5 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 06/20] mbuf: " Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 08/20] rib: fix missing header includes Bruce Richardson ` (18 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_compat.h header file must be included to get the definition of __rte_experimental. Fixes: f030bff72f81 ("bitrate: add free function") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_bitratestats/rte_bitrate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h index 4865929e8f..7e34529687 100644 --- a/lib/librte_bitratestats/rte_bitrate.h +++ b/lib/librte_bitratestats/rte_bitrate.h @@ -6,6 +6,7 @@ #define _RTE_BITRATE_H_ #include <stdint.h> +#include <rte_compat.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 08/20] rib: fix missing header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (6 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 07/20] bitratestats: " Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 09/20] vhost: " Bruce Richardson ` (17 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The standard integer types, and the size_t types are missing their required header includes in the rib header file. Fixes: 5a5793a5ffa2 ("rib: add RIB library") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_rib/rte_rib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h index f80752e5bd..6253860523 100644 --- a/lib/librte_rib/rte_rib.h +++ b/lib/librte_rib/rte_rib.h @@ -18,6 +18,8 @@ * Level compressed tree implementation for IPv4 Longest Prefix Match */ +#include <stdlib.h> +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 09/20] vhost: fix missing header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (7 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 08/20] rib: fix missing header includes Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 10/20] ipsec: fix missing header include Bruce Richardson ` (16 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The vhost header files were missing definitions from headers to allow them to be compiled up individually. Fixes: d7280c9fffcb ("vhost: support selective datapath") Fixes: a49f758d1170 ("vhost: split vDPA header file") Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_vhost/rte_vdpa.h | 2 ++ lib/librte_vhost/rte_vdpa_dev.h | 1 + lib/librte_vhost/rte_vhost_crypto.h | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h index f074ec0c4a..1437f400bf 100644 --- a/lib/librte_vhost/rte_vdpa.h +++ b/lib/librte_vhost/rte_vdpa.h @@ -11,6 +11,8 @@ * Device specific vhost lib */ +#include <stdint.h> + /** Maximum name length for statistics counters */ #define RTE_VDPA_STATS_NAME_SIZE 64 diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h index a60183f780..bfada387b0 100644 --- a/lib/librte_vhost/rte_vdpa_dev.h +++ b/lib/librte_vhost/rte_vdpa_dev.h @@ -8,6 +8,7 @@ #include <stdbool.h> #include "rte_vhost.h" +#include "rte_vdpa.h" #define RTE_VHOST_QUEUE_ALL UINT16_MAX diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h index c809c46a21..2a27a35892 100644 --- a/lib/librte_vhost/rte_vhost_crypto.h +++ b/lib/librte_vhost/rte_vhost_crypto.h @@ -5,6 +5,13 @@ #ifndef _VHOST_CRYPTO_H_ #define _VHOST_CRYPTO_H_ +#include <stdint.h> +#include <rte_compat.h> + +/* pre-declare structs to avoid including full headers */ +struct rte_mempool; +struct rte_crypto_op; + #define VHOST_CRYPTO_MBUF_POOL_SIZE (8192) #define VHOST_CRYPTO_MAX_BURST_SIZE (64) #define VHOST_CRYPTO_MAX_DATA_SIZE (4096) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 10/20] ipsec: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (8 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 09/20] vhost: " Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 11/20] fib: fix missing header includes Bruce Richardson ` (15 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_ipsec_sad.h header used the standard uintXX_t types, but did not include stdint.h header for them. Fixes: 401633d9c112 ("ipsec: add inbound SAD API") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_ipsec/rte_ipsec_sad.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h index 3e67ab1e4b..66c703ff3a 100644 --- a/lib/librte_ipsec/rte_ipsec_sad.h +++ b/lib/librte_ipsec/rte_ipsec_sad.h @@ -7,6 +7,7 @@ #define _RTE_IPSEC_SAD_H_ #include <rte_compat.h> +#include <stdint.h> /** * @file rte_ipsec_sad.h -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 11/20] fib: fix missing header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (9 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 10/20] ipsec: fix missing header include Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 12/20] table: fix missing header include Bruce Richardson ` (14 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable Add stdint.h to get definitions of standard integer types Fixes: 39e927248416 ("fib: add FIB library") Fixes: 40d41a8a7b34 ("fib: support IPv6") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_fib/rte_fib.h | 1 + lib/librte_fib/rte_fib6.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h index fef0749525..352c5e00ad 100644 --- a/lib/librte_fib/rte_fib.h +++ b/lib/librte_fib/rte_fib.h @@ -19,6 +19,7 @@ * for IPv4 Longest Prefix Match */ +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h index 668bffb2ba..60213f3372 100644 --- a/lib/librte_fib/rte_fib6.h +++ b/lib/librte_fib/rte_fib6.h @@ -19,6 +19,7 @@ * for IPv6 Longest Prefix Match */ +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 12/20] table: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (10 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 11/20] fib: fix missing header includes Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 13/20] pipeline: fix missing header includes Bruce Richardson ` (13 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_lru_x86.h header, included from the main rte_lru.h header, uses the RTE_CC_IS_GNU macro from rte_common.h but fails to include that header file. Fixes: 0c9a5735a947 ("eal: fix compiler detection in public headers") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_table/rte_lru_x86.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_table/rte_lru_x86.h b/lib/librte_table/rte_lru_x86.h index 0e24906c2c..38476d956e 100644 --- a/lib/librte_table/rte_lru_x86.h +++ b/lib/librte_table/rte_lru_x86.h @@ -12,6 +12,7 @@ extern "C" { #include <stdint.h> #include <rte_config.h> +#include <rte_common.h> #ifndef RTE_TABLE_HASH_LRU_STRATEGY #define RTE_TABLE_HASH_LRU_STRATEGY 2 -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 13/20] pipeline: fix missing header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (11 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 12/20] table: fix missing header include Bruce Richardson @ 2021-01-14 11:05 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 14/20] metrics: fix variable declaration in header Bruce Richardson ` (12 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:05 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The stdio.h header needs to be included to get the definition of the FILE type. Fixes: b32c0a2c5e4c ("pipeline: add SWX table update high level API") Fixes: 3ca60ceed79a ("pipeline: add SWX pipeline specification file") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_pipeline/rte_swx_ctl.h | 1 + lib/librte_pipeline/rte_swx_pipeline.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_pipeline/rte_swx_ctl.h b/lib/librte_pipeline/rte_swx_ctl.h index bab1894944..32815b69e2 100644 --- a/lib/librte_pipeline/rte_swx_ctl.h +++ b/lib/librte_pipeline/rte_swx_ctl.h @@ -15,6 +15,7 @@ extern "C" { #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <rte_compat.h> diff --git a/lib/librte_pipeline/rte_swx_pipeline.h b/lib/librte_pipeline/rte_swx_pipeline.h index d0a3439edf..f0a2cef777 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.h +++ b/lib/librte_pipeline/rte_swx_pipeline.h @@ -15,6 +15,7 @@ extern "C" { #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <rte_compat.h> -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 14/20] metrics: fix variable declaration in header 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (12 preceding siblings ...) 2021-01-14 11:05 ` [dpdk-dev] [PATCH 13/20] pipeline: fix missing header includes Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 15/20] node: fix missing header include Bruce Richardson ` (11 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The global variable "tel_met_data" was declared in a header file, rather than in a C file, leading to duplicate definitions if more than one C file included the header. Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_metrics/rte_metrics_telemetry.c | 2 ++ lib/librte_metrics/rte_metrics_telemetry.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c index 901cbeb0a3..b8ee56ef01 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.c +++ b/lib/librte_metrics/rte_metrics_telemetry.c @@ -13,6 +13,8 @@ #include "rte_metrics.h" #include "rte_metrics_telemetry.h" +struct telemetry_metrics_data tel_met_data; + int metrics_log_level; /* Logging Macros */ diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h index 3435a55425..5dbb32ca0c 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.h +++ b/lib/librte_metrics/rte_metrics_telemetry.h @@ -34,8 +34,6 @@ struct telemetry_metrics_data { int metrics_register_done; }; -struct telemetry_metrics_data tel_met_data; - __rte_experimental int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list); -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 15/20] node: fix missing header include 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (13 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 14/20] metrics: fix variable declaration in header Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 16/20] app: fix extra include paths for app builds Bruce Richardson ` (10 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The rte_compat header file is needed for the '__rte_experimental' macro. Fixes: f00708c2aa53 ("node: add IPv4 rewrite and lookup control") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_node/rte_node_ip4_api.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_node/rte_node_ip4_api.h b/lib/librte_node/rte_node_ip4_api.h index eb9ebd5f89..46d0d8976b 100644 --- a/lib/librte_node/rte_node_ip4_api.h +++ b/lib/librte_node/rte_node_ip4_api.h @@ -21,6 +21,7 @@ extern "C" { #endif #include <rte_common.h> +#include <rte_compat.h> /** * IP4 lookup next nodes. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 16/20] app: fix extra include paths for app builds 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (14 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 15/20] node: fix missing header include Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers Bruce Richardson ` (9 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable The "includes" variable in the app/meson.build file was ignored when building the executable, meaning that apps couldn't pass additional include paths directly back. Fix this to align with drivers and libs. Fixes: fa036e70d794 ("app: generalize meson build") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/app/meson.build b/app/meson.build index eb74f215a3..b6f2a6f56e 100644 --- a/app/meson.build +++ b/app/meson.build @@ -60,6 +60,7 @@ foreach app:apps c_args: cflags, link_whole: link_libs, dependencies: dep_objs, + include_directories: includes, install_rpath: join_paths(get_option('prefix'), driver_install_path), install: true) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (15 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 16/20] app: fix extra include paths for app builds Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 12:16 ` David Marchand 2021-01-14 16:04 ` David Marchand 2021-01-14 11:06 ` [dpdk-dev] [PATCH 18/20] eal: add missing include to mcslock Bruce Richardson ` (8 subsequent siblings) 25 siblings, 2 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/chkincs/gen_c_file_for_header.py | 49 ++++++++++++++++++++++++++++ app/chkincs/main.c | 4 +++ app/chkincs/meson.build | 28 ++++++++++++++++ app/meson.build | 1 + lib/meson.build | 1 + meson.build | 1 + meson_options.txt | 2 ++ 7 files changed, 86 insertions(+) create mode 100755 app/chkincs/gen_c_file_for_header.py create mode 100644 app/chkincs/main.c create mode 100644 app/chkincs/meson.build diff --git a/app/chkincs/gen_c_file_for_header.py b/app/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..f92f2b412c --- /dev/null +++ b/app/chkincs/gen_c_file_for_header.py @@ -0,0 +1,49 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020 Intel Corporation + +from sys import argv +from os.path import abspath + +empty_contents = 'static const char *empty __attribute__((unused)) = "empty";' +# files which are not used directly, but included via others +exceptions = [ + 'rte_cmp_arm64.h', + 'rte_cmp_x86.h', + 'rte_crc_arm64.h', + 'rte_eal_interrupts.h', + 'rte_eth_ctrl.h', + 'rte_ethdev_core.h', + 'rte_ipsec_group.h', + 'rte_lpm_altivec.h', + 'rte_lpm_neon.h', + 'rte_lpm_sse.h', + 'rte_lpm_x86.h', + 'rte_lru_arm64.h', + 'rte_lru_x86.h', + 'rte_regexdev_core.h', + 'rte_ring_core.h', + 'rte_ring_generic.h', + 'rte_ring_hts_c11_mem.h', + 'rte_ring_hts.h', + 'rte_ring_peek_c11_mem.h', + 'rte_ring_peek.h', + 'rte_ring_peek_zc.h', + 'rte_ring_rts_c11_mem.h', + 'rte_ring_rts.h', + 'rte_stack_lf_c11.h', + 'rte_stack_lf_generic.h', + 'rte_stack_lf.h', + 'rte_stack_std.h', + 'rte_table_hash_func_arm64.h', + ] + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +for ex in exceptions: + if h_file.endswith(ex): + contents = empty_contents + +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/app/chkincs/main.c b/app/chkincs/main.c new file mode 100644 index 0000000000..ecdf641954 --- /dev/null +++ b/app/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2020 Intel Corporation + */ +int main(void) { return 0; } diff --git a/app/chkincs/meson.build b/app/chkincs/meson.build new file mode 100644 index 0000000000..c16ca1f4fe --- /dev/null +++ b/app/chkincs/meson.build @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020 Intel Corporation + +if not get_option('test_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "test_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags += '-Wno-unused-function' # needed if we include generic headers + +# some ethdev headers depend on bus headers +includes += include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources += files('main.c') +sources += gen_c_files.process(dpdk_headers) + +deps = enabled_libs diff --git a/app/meson.build b/app/meson.build index b6f2a6f56e..8832ba8b17 100644 --- a/app/meson.build +++ b/app/meson.build @@ -6,6 +6,7 @@ if is_windows endif apps = [ + 'chkincs', 'pdump', 'proc-info', 'test-acl', diff --git a/lib/meson.build b/lib/meson.build index ed00f89146..7698e6749c 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -103,6 +103,7 @@ foreach l:libraries dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) #old macro dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) # new macro install_headers(headers) + dpdk_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 45d974cd2c..5c612fe93a 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index e384e6dbb2..9214219444 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -32,5 +32,7 @@ option('enable_trace_fp', type: 'boolean', value: false, description: 'enable fast path trace points.') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('test_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 11:06 ` [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers Bruce Richardson @ 2021-01-14 12:16 ` David Marchand 2021-01-14 12:28 ` Bruce Richardson 2021-01-14 16:04 ` David Marchand 1 sibling, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-14 12:16 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev On Thu, Jan 14, 2021 at 12:09 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > To verify that all DPDK headers are ok for inclusion directly in a C > file, and are not missing any other pre-requisite headers, we can > auto-generate for each header an empty C file that includes that header. > Compiling these files will throw errors if any header has unmet > dependencies. Some drivers expose APIs to applications, their headers would need checks too. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > app/chkincs/gen_c_file_for_header.py | 49 ++++++++++++++++++++++++++++ > app/chkincs/main.c | 4 +++ > app/chkincs/meson.build | 28 ++++++++++++++++ > app/meson.build | 1 + > lib/meson.build | 1 + > meson.build | 1 + > meson_options.txt | 2 ++ > 7 files changed, 86 insertions(+) > create mode 100755 app/chkincs/gen_c_file_for_header.py > create mode 100644 app/chkincs/main.c > create mode 100644 app/chkincs/meson.build > > diff --git a/app/chkincs/gen_c_file_for_header.py b/app/chkincs/gen_c_file_for_header.py > new file mode 100755 > index 0000000000..f92f2b412c > --- /dev/null > +++ b/app/chkincs/gen_c_file_for_header.py > @@ -0,0 +1,49 @@ > +#! /usr/bin/env python3 > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2020 Intel Corporation 2021* > + > +from sys import argv > +from os.path import abspath > + > +empty_contents = 'static const char *empty __attribute__((unused)) = "empty";' > +# files which are not used directly, but included via others > +exceptions = [ > + 'rte_cmp_arm64.h', > + 'rte_cmp_x86.h', > + 'rte_crc_arm64.h', > + 'rte_eal_interrupts.h', > + 'rte_eth_ctrl.h', > + 'rte_ethdev_core.h', > + 'rte_ipsec_group.h', > + 'rte_lpm_altivec.h', > + 'rte_lpm_neon.h', > + 'rte_lpm_sse.h', > + 'rte_lpm_x86.h', > + 'rte_lru_arm64.h', > + 'rte_lru_x86.h', > + 'rte_regexdev_core.h', > + 'rte_ring_core.h', > + 'rte_ring_generic.h', > + 'rte_ring_hts_c11_mem.h', > + 'rte_ring_hts.h', > + 'rte_ring_peek_c11_mem.h', > + 'rte_ring_peek.h', > + 'rte_ring_peek_zc.h', > + 'rte_ring_rts_c11_mem.h', > + 'rte_ring_rts.h', > + 'rte_stack_lf_c11.h', > + 'rte_stack_lf_generic.h', > + 'rte_stack_lf.h', > + 'rte_stack_std.h', > + 'rte_table_hash_func_arm64.h', > + ] Can we instead flag those headers from the libraries themselves? In addition of the headers current variable, something like a internal_headers or private_headers variable? > + > +(h_file, c_file) = argv[1:] > + > +contents = '#include "' + abspath(h_file) + '"' > +for ex in exceptions: > + if h_file.endswith(ex): > + contents = empty_contents > + > +with open(c_file, 'w') as cf: > + cf.write(contents) -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 12:16 ` David Marchand @ 2021-01-14 12:28 ` Bruce Richardson 2021-01-14 12:49 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 12:28 UTC (permalink / raw) To: David Marchand; +Cc: dev On Thu, Jan 14, 2021 at 01:16:58PM +0100, David Marchand wrote: > On Thu, Jan 14, 2021 at 12:09 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > To verify that all DPDK headers are ok for inclusion directly in a C > > file, and are not missing any other pre-requisite headers, we can > > auto-generate for each header an empty C file that includes that header. > > Compiling these files will throw errors if any header has unmet > > dependencies. > > Some drivers expose APIs to applications, their headers would need checks too. > Yes, that is something that should be checked too, but I've left it as "further work" for now, and I'm not planning it in this set, as I view it as less important and this set is big-enough as it is for now. :-) > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > app/chkincs/gen_c_file_for_header.py | 49 ++++++++++++++++++++++++++++ > > app/chkincs/main.c | 4 +++ > > app/chkincs/meson.build | 28 ++++++++++++++++ > > app/meson.build | 1 + > > lib/meson.build | 1 + > > meson.build | 1 + > > meson_options.txt | 2 ++ > > 7 files changed, 86 insertions(+) > > create mode 100755 app/chkincs/gen_c_file_for_header.py > > create mode 100644 app/chkincs/main.c > > create mode 100644 app/chkincs/meson.build > > > > diff --git a/app/chkincs/gen_c_file_for_header.py b/app/chkincs/gen_c_file_for_header.py > > new file mode 100755 > > index 0000000000..f92f2b412c > > --- /dev/null > > +++ b/app/chkincs/gen_c_file_for_header.py > > @@ -0,0 +1,49 @@ > > +#! /usr/bin/env python3 > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2020 Intel Corporation > > 2021* > Code actually was written in 2020 hence the date there. > > > + > > +from sys import argv > > +from os.path import abspath > > + > > +empty_contents = 'static const char *empty __attribute__((unused)) = "empty";' > > +# files which are not used directly, but included via others > > +exceptions = [ > > + 'rte_cmp_arm64.h', > > + 'rte_cmp_x86.h', > > + 'rte_crc_arm64.h', > > + 'rte_eal_interrupts.h', > > + 'rte_eth_ctrl.h', > > + 'rte_ethdev_core.h', > > + 'rte_ipsec_group.h', > > + 'rte_lpm_altivec.h', > > + 'rte_lpm_neon.h', > > + 'rte_lpm_sse.h', > > + 'rte_lpm_x86.h', > > + 'rte_lru_arm64.h', > > + 'rte_lru_x86.h', > > + 'rte_regexdev_core.h', > > + 'rte_ring_core.h', > > + 'rte_ring_generic.h', > > + 'rte_ring_hts_c11_mem.h', > > + 'rte_ring_hts.h', > > + 'rte_ring_peek_c11_mem.h', > > + 'rte_ring_peek.h', > > + 'rte_ring_peek_zc.h', > > + 'rte_ring_rts_c11_mem.h', > > + 'rte_ring_rts.h', > > + 'rte_stack_lf_c11.h', > > + 'rte_stack_lf_generic.h', > > + 'rte_stack_lf.h', > > + 'rte_stack_std.h', > > + 'rte_table_hash_func_arm64.h', > > + ] > > Can we instead flag those headers from the libraries themselves? > In addition of the headers current variable, something like a > internal_headers or private_headers variable? > Yes, we could do that, though we need a suitable name, since they aren't internal only or private. :-) Maybe just have it literally called "skip_chkincs_headers"? Open to more ideas... Thanks for the review! /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 12:28 ` Bruce Richardson @ 2021-01-14 12:49 ` David Marchand 0 siblings, 0 replies; 165+ messages in thread From: David Marchand @ 2021-01-14 12:49 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev On Thu, Jan 14, 2021 at 1:28 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > Can we instead flag those headers from the libraries themselves? > > In addition of the headers current variable, something like a > > internal_headers or private_headers variable? > > > > Yes, we could do that, though we need a suitable name, since they aren't > internal only or private. :-) Maybe just have it literally called Yes. > "skip_chkincs_headers"? Open to more ideas... > People who get reports from this odd tool "chkincs" in the CI on their new shiny header, might find some info more easily if they grep for chkincs. +1. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 11:06 ` [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers Bruce Richardson 2021-01-14 12:16 ` David Marchand @ 2021-01-14 16:04 ` David Marchand 2021-01-14 16:18 ` Bruce Richardson 1 sibling, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-14 16:04 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev On Thu, Jan 14, 2021 at 12:09 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > To verify that all DPDK headers are ok for inclusion directly in a C > file, and are not missing any other pre-requisite headers, we can > auto-generate for each header an empty C file that includes that header. > Compiling these files will throw errors if any header has unmet > dependencies. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > app/chkincs/gen_c_file_for_header.py | 49 ++++++++++++++++++++++++++++ > app/chkincs/main.c | 4 +++ > app/chkincs/meson.build | 28 ++++++++++++++++ Those are new files, so the patch is missing a MAINTAINERS update. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers 2021-01-14 16:04 ` David Marchand @ 2021-01-14 16:18 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 16:18 UTC (permalink / raw) To: David Marchand; +Cc: dev On Thu, Jan 14, 2021 at 05:04:11PM +0100, David Marchand wrote: > On Thu, Jan 14, 2021 at 12:09 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > To verify that all DPDK headers are ok for inclusion directly in a C > > file, and are not missing any other pre-requisite headers, we can > > auto-generate for each header an empty C file that includes that header. > > Compiling these files will throw errors if any header has unmet > > dependencies. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > app/chkincs/gen_c_file_for_header.py | 49 ++++++++++++++++++++++++++++ > > app/chkincs/main.c | 4 +++ > > app/chkincs/meson.build | 28 ++++++++++++++++ > > Those are new files, so the patch is missing a MAINTAINERS update. > Yes, forgot that. Will add in V2. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 18/20] eal: add missing include to mcslock 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (16 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 19/20] eal/x86: add architecture-specific headers to chkincs Bruce Richardson ` (7 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, stable Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 19/20] eal/x86: add architecture-specific headers to chkincs 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (17 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 18/20] eal: add missing include to mcslock Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 20/20] test-meson-builds: add includes check to default x86 build Bruce Richardson ` (6 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson Ensure the architecture-specific header files for x86 have all necessary includes in them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/chkincs/gen_c_file_for_header.py | 4 ++++ lib/librte_eal/x86/include/meson.build | 1 + 2 files changed, 5 insertions(+) diff --git a/app/chkincs/gen_c_file_for_header.py b/app/chkincs/gen_c_file_for_header.py index f92f2b412c..d7e97b2ab4 100755 --- a/app/chkincs/gen_c_file_for_header.py +++ b/app/chkincs/gen_c_file_for_header.py @@ -8,6 +8,10 @@ empty_contents = 'static const char *empty __attribute__((unused)) = "empty";' # files which are not used directly, but included via others exceptions = [ + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', 'rte_cmp_arm64.h', 'rte_cmp_x86.h', 'rte_crc_arm64.h', diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..b5aa2c71a5 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -23,3 +23,4 @@ arch_headers = files( 'rte_vect.h', ) install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +dpdk_headers += arch_headers -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH 20/20] test-meson-builds: add includes check to default x86 build 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (18 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 19/20] eal/x86: add architecture-specific headers to chkincs Bruce Richardson @ 2021-01-14 11:06 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (5 subsequent siblings) 25 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-14 11:06 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson Since the includes check is disabled by default, we need to explicitly enable it to have it run. To minimise any extra build time when running the test-meson-builds script, we just add it to the default x86 build. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 7280b7a93d..d7ddd78791 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -215,7 +215,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared +build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine -Dtest_includes=true $use_shared # 32-bit with default compiler if check_cc_flags '-m32' ; then -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (19 preceding siblings ...) 2021-01-14 11:06 ` [dpdk-dev] [PATCH 20/20] test-meson-builds: add includes check to default x86 build Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 01/19] eal: fix missing header inclusion Bruce Richardson ` (19 more replies) 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson ` (4 subsequent siblings) 25 siblings, 20 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. This patchset fixes any missing includes in public headers from the DPDK "lib" folder and then adds a "chkincs" app. to verify this on an ongoing basis. This chkincs app does nothing when run, it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, for example. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions Bruce Richardson (19): eal: fix missing header inclusion telemetry: fix missing header include ethdev: fix missing header include net: fix missing header include mbuf: fix missing header include bitratestats: fix missing header include rib: fix missing header includes vhost: fix missing header includes ipsec: fix missing header include fib: fix missing header includes table: fix missing header include pipeline: fix missing header includes metrics: fix variable declaration in header node: fix missing header include app: fix extra include paths for app builds app/chkincs: add chkincs app to verify headers eal: add missing include to mcslock eal/x86: add architecture-specific headers to chkincs test-meson-builds: add includes check to default x86 build MAINTAINERS | 4 +++ app/chkincs/gen_c_file_for_header.py | 12 +++++++++ app/chkincs/main.c | 4 +++ app/chkincs/meson.build | 28 ++++++++++++++++++++ app/meson.build | 2 ++ devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 +++++++++ lib/librte_bitratestats/rte_bitrate.h | 1 + lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/include/rte_reciprocal.h | 1 + lib/librte_eal/include/rte_thread.h | 1 + lib/librte_eal/x86/include/meson.build | 14 ++++++---- lib/librte_ethdev/meson.build | 4 +-- lib/librte_ethdev/rte_eth_ctrl.h | 1 + lib/librte_fib/rte_fib.h | 1 + lib/librte_fib/rte_fib6.h | 1 + lib/librte_hash/meson.build | 4 +-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_ipsec/rte_ipsec_sad.h | 1 + lib/librte_lpm/meson.build | 2 +- lib/librte_mbuf/rte_mbuf_core.h | 1 + lib/librte_mbuf/rte_mbuf_dyn.h | 3 +++ lib/librte_metrics/rte_metrics_telemetry.c | 2 ++ lib/librte_metrics/rte_metrics_telemetry.h | 2 -- lib/librte_net/rte_geneve.h | 1 + lib/librte_node/rte_node_ip4_api.h | 1 + lib/librte_pipeline/rte_swx_ctl.h | 1 + lib/librte_pipeline/rte_swx_pipeline.h | 1 + lib/librte_regexdev/meson.build | 2 +- lib/librte_rib/rte_rib.h | 2 ++ lib/librte_ring/meson.build | 4 ++- lib/librte_stack/meson.build | 4 ++- lib/librte_table/meson.build | 7 +++-- lib/librte_table/rte_lru_x86.h | 1 + lib/librte_telemetry/rte_telemetry.h | 1 + lib/librte_vhost/rte_vdpa.h | 2 ++ lib/librte_vhost/rte_vdpa_dev.h | 1 + lib/librte_vhost/rte_vhost_crypto.h | 7 +++++ lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 42 files changed, 128 insertions(+), 22 deletions(-) create mode 100755 app/chkincs/gen_c_file_for_header.py create mode 100644 app/chkincs/main.c create mode 100644 app/chkincs/meson.build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 01/19] eal: fix missing header inclusion 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 02/19] telemetry: fix missing header include Bruce Richardson ` (18 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Pavan Nikhilesh, Tal Shnaiderman, Thomas Monjalon, Dmitry Kozlyuk The rte_reciprocal header file used standard __rte_always_inline from rte_common.h but does not include that header file, leading to compiler errors when the reciprocal header is included alone. Similarly, rte_thread.h was missing the compat header to get the __rte_experimental macro definition. Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide") Fixes: b1fd151267e6 ("eal: add generic thread-local-storage functions") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_reciprocal.h | 1 + lib/librte_eal/include/rte_thread.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h index 63e16fde0a..4a59be30a8 100644 --- a/lib/librte_eal/include/rte_reciprocal.h +++ b/lib/librte_eal/include/rte_reciprocal.h @@ -26,6 +26,7 @@ #define _RTE_RECIPROCAL_H_ #include <stdint.h> +#include <rte_common.h> struct rte_reciprocal { uint32_t m; diff --git a/lib/librte_eal/include/rte_thread.h b/lib/librte_eal/include/rte_thread.h index f1ae2d32cc..e640ea1857 100644 --- a/lib/librte_eal/include/rte_thread.h +++ b/lib/librte_eal/include/rte_thread.h @@ -3,6 +3,7 @@ */ #include <rte_os.h> +#include <rte_compat.h> #ifndef _RTE_THREAD_H_ #define _RTE_THREAD_H_ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 02/19] telemetry: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 01/19] eal: fix missing header inclusion Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 03/19] ethdev: " Bruce Richardson ` (17 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Kevin Laatz, Ciara Power The telemetry header file uses the rte_cpuset_t type, but does not include any header providing that type. Include rte_os.h to provide the necessary type. Fixes: febbebf7f255 ("telemetry: keep threads separate from data plane") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_telemetry/rte_telemetry.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h index 4693275c24..561c6b1658 100644 --- a/lib/librte_telemetry/rte_telemetry.h +++ b/lib/librte_telemetry/rte_telemetry.h @@ -5,6 +5,7 @@ #include <stdint.h> #include <sched.h> #include <rte_compat.h> +#include <rte_os.h> #ifndef _RTE_TELEMETRY_H_ #define _RTE_TELEMETRY_H_ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 03/19] ethdev: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 01/19] eal: fix missing header inclusion Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 02/19] telemetry: fix missing header include Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 15:38 ` Andrew Rybchenko 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 04/19] net: " Bruce Richardson ` (16 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Helin Zhang, Jingjing Wu The define for RTE_ETH_FLOW_MAX is defined in rte_ethdev.h, so that header should be included in rte_eth_ctrl.h to allow it to be compiled independently. Fixes: 7fa96d696f2c ("ethdev: unification of flow types") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_ethdev/rte_eth_ctrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h index 1cca522fa3..8a50dbfef9 100644 --- a/lib/librte_ethdev/rte_eth_ctrl.h +++ b/lib/librte_ethdev/rte_eth_ctrl.h @@ -9,6 +9,7 @@ #include <rte_common.h> #include <rte_ether.h> #include "rte_flow.h" +#include "rte_ethdev.h" /** * @deprecated Please use rte_flow API instead of this legacy one. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 03/19] ethdev: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 03/19] ethdev: " Bruce Richardson @ 2021-01-15 15:38 ` Andrew Rybchenko 0 siblings, 0 replies; 165+ messages in thread From: Andrew Rybchenko @ 2021-01-15 15:38 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Thomas Monjalon, Ferruh Yigit, Helin Zhang, Jingjing Wu On 1/15/21 2:10 PM, Bruce Richardson wrote: > The define for RTE_ETH_FLOW_MAX is defined in rte_ethdev.h, so that > header should be included in rte_eth_ctrl.h to allow it to be compiled > independently. > > Fixes: 7fa96d696f2c ("ethdev: unification of flow types") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 04/19] net: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (2 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 03/19] ethdev: " Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-16 12:10 ` Ophir Munk 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 05/19] mbuf: " Bruce Richardson ` (15 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Olivier Matz, Ophir Munk, Ferruh Yigit The Geneve protocol header file is missing the rte_byteorder.h header. Fixes: ea0e711b8ae0 ("app/testpmd: add GENEVE parsing") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_net/rte_geneve.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_geneve.h b/lib/librte_net/rte_geneve.h index bb67724c31..7c3d477dcb 100644 --- a/lib/librte_net/rte_geneve.h +++ b/lib/librte_net/rte_geneve.h @@ -11,6 +11,7 @@ * GENEVE-related definitions */ #include <stdint.h> +#include <rte_byteorder.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 04/19] net: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 04/19] net: " Bruce Richardson @ 2021-01-16 12:10 ` Ophir Munk 0 siblings, 0 replies; 165+ messages in thread From: Ophir Munk @ 2021-01-16 12:10 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Olivier Matz, Ophir Munk, Ferruh Yigit Acked-by: Ophir Munk <ophirmu@nvidia.com> > -----Original Message----- > From: Bruce Richardson <bruce.richardson@intel.com> > Sent: Friday, January 15, 2021 1:11 PM > To: dev@dpdk.org > Cc: david.marchand@redhat.com; Bruce Richardson > <bruce.richardson@intel.com>; stable@dpdk.org; Olivier Matz > <olivier.matz@6wind.com>; Ophir Munk <ophirmu@mellanox.com>; Ferruh > Yigit <ferruh.yigit@intel.com> > Subject: [PATCH v2 04/19] net: fix missing header include > > The Geneve protocol header file is missing the rte_byteorder.h header. > > Fixes: ea0e711b8ae0 ("app/testpmd: add GENEVE parsing") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_net/rte_geneve.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_net/rte_geneve.h b/lib/librte_net/rte_geneve.h index > bb67724c31..7c3d477dcb 100644 > --- a/lib/librte_net/rte_geneve.h > +++ b/lib/librte_net/rte_geneve.h > @@ -11,6 +11,7 @@ > * GENEVE-related definitions > */ > #include <stdint.h> > +#include <rte_byteorder.h> > > #ifdef __cplusplus > extern "C" { > -- > 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 05/19] mbuf: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (3 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 04/19] net: " Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 15:40 ` Andrew Rybchenko 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 06/19] bitratestats: " Bruce Richardson ` (14 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Olivier Matz, Thomas Monjalon, Konstantin Ananyev, Andrew Rybchenko, Michel Machado The rte_mbuf_dyn.h header file uses a number of types and macros without including the required header files to get the definitions of those macros/types. Similarly, the rte_mbuf_core.h file was missing an include for rte_byteorder.h header. Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Fixes: 3eb860b08eb7 ("mbuf: move definitions into a separate file") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_mbuf/rte_mbuf_core.h | 1 + lib/librte_mbuf/rte_mbuf_dyn.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index 567551deab..34e892f21b 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -18,6 +18,7 @@ #include <stdint.h> #include <rte_compat.h> +#include <rte_byteorder.h> #include <generic/rte_atomic.h> #ifdef __cplusplus diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h index fc4eee71d0..f42deed012 100644 --- a/lib/librte_mbuf/rte_mbuf_dyn.h +++ b/lib/librte_mbuf/rte_mbuf_dyn.h @@ -66,7 +66,10 @@ * - any name that does not start with "rte_" in an application */ +#include <stdio.h> +#include <stdint.h> #include <sys/types.h> +#include <rte_compat.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 05/19] mbuf: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 05/19] mbuf: " Bruce Richardson @ 2021-01-15 15:40 ` Andrew Rybchenko 0 siblings, 0 replies; 165+ messages in thread From: Andrew Rybchenko @ 2021-01-15 15:40 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Olivier Matz, Thomas Monjalon, Konstantin Ananyev, Andrew Rybchenko, Michel Machado On 1/15/21 2:10 PM, Bruce Richardson wrote: > The rte_mbuf_dyn.h header file uses a number of types and macros without > including the required header files to get the definitions of those > macros/types. Similarly, the rte_mbuf_core.h file was missing an > include for rte_byteorder.h header. > > Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") > Fixes: 3eb860b08eb7 ("mbuf: move definitions into a separate file") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 06/19] bitratestats: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (4 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 05/19] mbuf: " Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes Bruce Richardson ` (13 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Hemant Agrawal The rte_compat.h header file must be included to get the definition of __rte_experimental. Fixes: f030bff72f81 ("bitrate: add free function") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_bitratestats/rte_bitrate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h index 4865929e8f..7e34529687 100644 --- a/lib/librte_bitratestats/rte_bitrate.h +++ b/lib/librte_bitratestats/rte_bitrate.h @@ -6,6 +6,7 @@ #define _RTE_BITRATE_H_ #include <stdint.h> +#include <rte_compat.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (5 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 06/19] bitratestats: " Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 08/19] vhost: " Bruce Richardson ` (12 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Vladimir Medvedkin The standard integer types, and the size_t types are missing their required header includes in the rib header file. Fixes: 5a5793a5ffa2 ("rib: add RIB library") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_rib/rte_rib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h index f80752e5bd..6253860523 100644 --- a/lib/librte_rib/rte_rib.h +++ b/lib/librte_rib/rte_rib.h @@ -18,6 +18,8 @@ * Level compressed tree implementation for IPv4 Longest Prefix Match */ +#include <stdlib.h> +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes Bruce Richardson @ 2021-01-15 11:37 ` Medvedkin, Vladimir 0 siblings, 0 replies; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-15 11:37 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: david.marchand, stable On 15/01/2021 11:10, Bruce Richardson wrote: > The standard integer types, and the size_t types are missing their > required header includes in the rib header file. > > Fixes: 5a5793a5ffa2 ("rib: add RIB library") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_rib/rte_rib.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h > index f80752e5bd..6253860523 100644 > --- a/lib/librte_rib/rte_rib.h > +++ b/lib/librte_rib/rte_rib.h > @@ -18,6 +18,8 @@ > * Level compressed tree implementation for IPv4 Longest Prefix Match > */ > > +#include <stdlib.h> > +#include <stdint.h> > #include <rte_compat.h> > > #ifdef __cplusplus > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 08/19] vhost: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (6 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-21 8:38 ` Maxime Coquelin 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include Bruce Richardson ` (11 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Maxime Coquelin, Chenbo Xia, Zhihong Wang, Adrián Moreno, Fan Zhang, Jay Zhou The vhost header files were missing definitions from headers to allow them to be compiled up individually. Fixes: d7280c9fffcb ("vhost: support selective datapath") Fixes: a49f758d1170 ("vhost: split vDPA header file") Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_vhost/rte_vdpa.h | 2 ++ lib/librte_vhost/rte_vdpa_dev.h | 1 + lib/librte_vhost/rte_vhost_crypto.h | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h index f074ec0c4a..1437f400bf 100644 --- a/lib/librte_vhost/rte_vdpa.h +++ b/lib/librte_vhost/rte_vdpa.h @@ -11,6 +11,8 @@ * Device specific vhost lib */ +#include <stdint.h> + /** Maximum name length for statistics counters */ #define RTE_VDPA_STATS_NAME_SIZE 64 diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h index a60183f780..bfada387b0 100644 --- a/lib/librte_vhost/rte_vdpa_dev.h +++ b/lib/librte_vhost/rte_vdpa_dev.h @@ -8,6 +8,7 @@ #include <stdbool.h> #include "rte_vhost.h" +#include "rte_vdpa.h" #define RTE_VHOST_QUEUE_ALL UINT16_MAX diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h index c809c46a21..2a27a35892 100644 --- a/lib/librte_vhost/rte_vhost_crypto.h +++ b/lib/librte_vhost/rte_vhost_crypto.h @@ -5,6 +5,13 @@ #ifndef _VHOST_CRYPTO_H_ #define _VHOST_CRYPTO_H_ +#include <stdint.h> +#include <rte_compat.h> + +/* pre-declare structs to avoid including full headers */ +struct rte_mempool; +struct rte_crypto_op; + #define VHOST_CRYPTO_MBUF_POOL_SIZE (8192) #define VHOST_CRYPTO_MAX_BURST_SIZE (64) #define VHOST_CRYPTO_MAX_DATA_SIZE (4096) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 08/19] vhost: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 08/19] vhost: " Bruce Richardson @ 2021-01-21 8:38 ` Maxime Coquelin 0 siblings, 0 replies; 165+ messages in thread From: Maxime Coquelin @ 2021-01-21 8:38 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Chenbo Xia, Zhihong Wang, Adrián Moreno, Fan Zhang, Jay Zhou On 1/15/21 12:10 PM, Bruce Richardson wrote: > The vhost header files were missing definitions from headers to allow > them to be compiled up individually. > > Fixes: d7280c9fffcb ("vhost: support selective datapath") > Fixes: a49f758d1170 ("vhost: split vDPA header file") > Fixes: 939066d96563 ("vhost/crypto: add public function implementation") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_vhost/rte_vdpa.h | 2 ++ > lib/librte_vhost/rte_vdpa_dev.h | 1 + > lib/librte_vhost/rte_vhost_crypto.h | 7 +++++++ > 3 files changed, 10 insertions(+) > > diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h > index f074ec0c4a..1437f400bf 100644 > --- a/lib/librte_vhost/rte_vdpa.h > +++ b/lib/librte_vhost/rte_vdpa.h > @@ -11,6 +11,8 @@ > * Device specific vhost lib > */ > > +#include <stdint.h> > + > /** Maximum name length for statistics counters */ > #define RTE_VDPA_STATS_NAME_SIZE 64 > > diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h > index a60183f780..bfada387b0 100644 > --- a/lib/librte_vhost/rte_vdpa_dev.h > +++ b/lib/librte_vhost/rte_vdpa_dev.h > @@ -8,6 +8,7 @@ > #include <stdbool.h> > > #include "rte_vhost.h" > +#include "rte_vdpa.h" > > #define RTE_VHOST_QUEUE_ALL UINT16_MAX > > diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h > index c809c46a21..2a27a35892 100644 > --- a/lib/librte_vhost/rte_vhost_crypto.h > +++ b/lib/librte_vhost/rte_vhost_crypto.h > @@ -5,6 +5,13 @@ > #ifndef _VHOST_CRYPTO_H_ > #define _VHOST_CRYPTO_H_ > > +#include <stdint.h> > +#include <rte_compat.h> > + > +/* pre-declare structs to avoid including full headers */ > +struct rte_mempool; > +struct rte_crypto_op; > + > #define VHOST_CRYPTO_MBUF_POOL_SIZE (8192) > #define VHOST_CRYPTO_MAX_BURST_SIZE (64) > #define VHOST_CRYPTO_MAX_DATA_SIZE (4096) > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Thanks, Maxime ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (7 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 08/19] vhost: " Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:35 ` Ananyev, Konstantin 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes Bruce Richardson ` (10 subsequent siblings) 19 siblings, 2 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Akhil Goyal The rte_ipsec_sad.h header used the standard uintXX_t types, but did not include stdint.h header for them. Fixes: 401633d9c112 ("ipsec: add inbound SAD API") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_ipsec/rte_ipsec_sad.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h index 3e67ab1e4b..66c703ff3a 100644 --- a/lib/librte_ipsec/rte_ipsec_sad.h +++ b/lib/librte_ipsec/rte_ipsec_sad.h @@ -7,6 +7,7 @@ #define _RTE_IPSEC_SAD_H_ #include <rte_compat.h> +#include <stdint.h> /** * @file rte_ipsec_sad.h -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include Bruce Richardson @ 2021-01-15 11:35 ` Ananyev, Konstantin 2021-01-15 11:37 ` Medvedkin, Vladimir 1 sibling, 0 replies; 165+ messages in thread From: Ananyev, Konstantin @ 2021-01-15 11:35 UTC (permalink / raw) To: Richardson, Bruce, dev Cc: david.marchand, stable, Iremonger, Bernard, Medvedkin, Vladimir, Akhil Goyal > -----Original Message----- > From: Richardson, Bruce <bruce.richardson@intel.com> > Sent: Friday, January 15, 2021 11:11 AM > To: dev@dpdk.org > Cc: david.marchand@redhat.com; Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>; Medvedkin, Vladimir > <vladimir.medvedkin@intel.com>; Akhil Goyal <akhil.goyal@nxp.com> > Subject: [PATCH v2 09/19] ipsec: fix missing header include > > The rte_ipsec_sad.h header used the standard uintXX_t types, but did not > include stdint.h header for them. > > Fixes: 401633d9c112 ("ipsec: add inbound SAD API") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_ipsec/rte_ipsec_sad.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h > index 3e67ab1e4b..66c703ff3a 100644 > --- a/lib/librte_ipsec/rte_ipsec_sad.h > +++ b/lib/librte_ipsec/rte_ipsec_sad.h > @@ -7,6 +7,7 @@ > #define _RTE_IPSEC_SAD_H_ > > #include <rte_compat.h> > +#include <stdint.h> > > /** > * @file rte_ipsec_sad.h > -- Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> > 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include Bruce Richardson 2021-01-15 11:35 ` Ananyev, Konstantin @ 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:45 ` Medvedkin, Vladimir 1 sibling, 1 reply; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-15 11:37 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Konstantin Ananyev, Bernard Iremonger, Akhil Goyal On 15/01/2021 11:10, Bruce Richardson wrote: > The rte_ipsec_sad.h header used the standard uintXX_t types, but did not > include stdint.h header for them. > > Fixes: 401633d9c112 ("ipsec: add inbound SAD API") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_ipsec/rte_ipsec_sad.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h > index 3e67ab1e4b..66c703ff3a 100644 > --- a/lib/librte_ipsec/rte_ipsec_sad.h > +++ b/lib/librte_ipsec/rte_ipsec_sad.h > @@ -7,6 +7,7 @@ > #define _RTE_IPSEC_SAD_H_ > > #include <rte_compat.h> > +#include <stdint.h> > > /** > * @file rte_ipsec_sad.h > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include 2021-01-15 11:37 ` Medvedkin, Vladimir @ 2021-01-15 11:45 ` Medvedkin, Vladimir 2021-01-15 11:49 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-15 11:45 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Konstantin Ananyev, Bernard Iremonger, Akhil Goyal Hi Bruce, Just a one nit, please put <stdint.h> before rte_ includes. On 15/01/2021 11:37, Medvedkin, Vladimir wrote: > > > On 15/01/2021 11:10, Bruce Richardson wrote: >> The rte_ipsec_sad.h header used the standard uintXX_t types, but did not >> include stdint.h header for them. >> >> Fixes: 401633d9c112 ("ipsec: add inbound SAD API") >> Cc: stable@dpdk.org >> >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> >> --- >> lib/librte_ipsec/rte_ipsec_sad.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/librte_ipsec/rte_ipsec_sad.h >> b/lib/librte_ipsec/rte_ipsec_sad.h >> index 3e67ab1e4b..66c703ff3a 100644 >> --- a/lib/librte_ipsec/rte_ipsec_sad.h >> +++ b/lib/librte_ipsec/rte_ipsec_sad.h >> @@ -7,6 +7,7 @@ >> #define _RTE_IPSEC_SAD_H_ >> #include <rte_compat.h> >> +#include <stdint.h> >> /** >> * @file rte_ipsec_sad.h >> > > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> > -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include 2021-01-15 11:45 ` Medvedkin, Vladimir @ 2021-01-15 11:49 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:49 UTC (permalink / raw) To: Medvedkin, Vladimir Cc: dev, david.marchand, stable, Konstantin Ananyev, Bernard Iremonger, Akhil Goyal On Fri, Jan 15, 2021 at 11:45:11AM +0000, Medvedkin, Vladimir wrote: > Hi Bruce, > > Just a one nit, please put <stdint.h> before rte_ includes. > Good point, I'll fix if I do a V3. > On 15/01/2021 11:37, Medvedkin, Vladimir wrote: > > > > > > On 15/01/2021 11:10, Bruce Richardson wrote: > > > The rte_ipsec_sad.h header used the standard uintXX_t types, but did not > > > include stdint.h header for them. > > > > > > Fixes: 401633d9c112 ("ipsec: add inbound SAD API") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > --- > > > lib/librte_ipsec/rte_ipsec_sad.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/lib/librte_ipsec/rte_ipsec_sad.h > > > b/lib/librte_ipsec/rte_ipsec_sad.h > > > index 3e67ab1e4b..66c703ff3a 100644 > > > --- a/lib/librte_ipsec/rte_ipsec_sad.h > > > +++ b/lib/librte_ipsec/rte_ipsec_sad.h > > > @@ -7,6 +7,7 @@ > > > #define _RTE_IPSEC_SAD_H_ > > > #include <rte_compat.h> > > > +#include <stdint.h> > > > /** > > > * @file rte_ipsec_sad.h > > > > > > > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> > > > > -- > Regards, > Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (8 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 11/19] table: fix missing header include Bruce Richardson ` (9 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Vladimir Medvedkin Add stdint.h to get definitions of standard integer types Fixes: 39e927248416 ("fib: add FIB library") Fixes: 40d41a8a7b34 ("fib: support IPv6") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_fib/rte_fib.h | 1 + lib/librte_fib/rte_fib6.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h index fef0749525..352c5e00ad 100644 --- a/lib/librte_fib/rte_fib.h +++ b/lib/librte_fib/rte_fib.h @@ -19,6 +19,7 @@ * for IPv4 Longest Prefix Match */ +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h index 668bffb2ba..60213f3372 100644 --- a/lib/librte_fib/rte_fib6.h +++ b/lib/librte_fib/rte_fib6.h @@ -19,6 +19,7 @@ * for IPv6 Longest Prefix Match */ +#include <stdint.h> #include <rte_compat.h> #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes Bruce Richardson @ 2021-01-15 11:37 ` Medvedkin, Vladimir 0 siblings, 0 replies; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-15 11:37 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: david.marchand, stable On 15/01/2021 11:10, Bruce Richardson wrote: > Add stdint.h to get definitions of standard integer types > > Fixes: 39e927248416 ("fib: add FIB library") > Fixes: 40d41a8a7b34 ("fib: support IPv6") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_fib/rte_fib.h | 1 + > lib/librte_fib/rte_fib6.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h > index fef0749525..352c5e00ad 100644 > --- a/lib/librte_fib/rte_fib.h > +++ b/lib/librte_fib/rte_fib.h > @@ -19,6 +19,7 @@ > * for IPv4 Longest Prefix Match > */ > > +#include <stdint.h> > #include <rte_compat.h> > > #ifdef __cplusplus > diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h > index 668bffb2ba..60213f3372 100644 > --- a/lib/librte_fib/rte_fib6.h > +++ b/lib/librte_fib/rte_fib6.h > @@ -19,6 +19,7 @@ > * for IPv6 Longest Prefix Match > */ > > +#include <stdint.h> > #include <rte_compat.h> > > #ifdef __cplusplus > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 11/19] table: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (9 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 12/19] pipeline: fix missing header includes Bruce Richardson ` (8 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Cristian Dumitrescu, Thomas Monjalon, Dmitry Kozlyuk The rte_lru_x86.h header, included from the main rte_lru.h header, uses the RTE_CC_IS_GNU macro from rte_common.h but fails to include that header file. Fixes: 0c9a5735a947 ("eal: fix compiler detection in public headers") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_table/rte_lru_x86.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_table/rte_lru_x86.h b/lib/librte_table/rte_lru_x86.h index 0e24906c2c..38476d956e 100644 --- a/lib/librte_table/rte_lru_x86.h +++ b/lib/librte_table/rte_lru_x86.h @@ -12,6 +12,7 @@ extern "C" { #include <stdint.h> #include <rte_config.h> +#include <rte_common.h> #ifndef RTE_TABLE_HASH_LRU_STRATEGY #define RTE_TABLE_HASH_LRU_STRATEGY 2 -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 12/19] pipeline: fix missing header includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (10 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 11/19] table: fix missing header include Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 13/19] metrics: fix variable declaration in header Bruce Richardson ` (7 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Cristian Dumitrescu The stdio.h header needs to be included to get the definition of the FILE type. Fixes: b32c0a2c5e4c ("pipeline: add SWX table update high level API") Fixes: 3ca60ceed79a ("pipeline: add SWX pipeline specification file") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_pipeline/rte_swx_ctl.h | 1 + lib/librte_pipeline/rte_swx_pipeline.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_pipeline/rte_swx_ctl.h b/lib/librte_pipeline/rte_swx_ctl.h index bab1894944..32815b69e2 100644 --- a/lib/librte_pipeline/rte_swx_ctl.h +++ b/lib/librte_pipeline/rte_swx_ctl.h @@ -15,6 +15,7 @@ extern "C" { #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <rte_compat.h> diff --git a/lib/librte_pipeline/rte_swx_pipeline.h b/lib/librte_pipeline/rte_swx_pipeline.h index d0a3439edf..f0a2cef777 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.h +++ b/lib/librte_pipeline/rte_swx_pipeline.h @@ -15,6 +15,7 @@ extern "C" { #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include <rte_compat.h> -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 13/19] metrics: fix variable declaration in header 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (11 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 12/19] pipeline: fix missing header includes Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 14/19] node: fix missing header include Bruce Richardson ` (6 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Ciara Power, Keith Wiles The global variable "tel_met_data" was declared in a header file, rather than in a C file, leading to duplicate definitions if more than one C file included the header. Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_metrics/rte_metrics_telemetry.c | 2 ++ lib/librte_metrics/rte_metrics_telemetry.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c index 901cbeb0a3..b8ee56ef01 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.c +++ b/lib/librte_metrics/rte_metrics_telemetry.c @@ -13,6 +13,8 @@ #include "rte_metrics.h" #include "rte_metrics_telemetry.h" +struct telemetry_metrics_data tel_met_data; + int metrics_log_level; /* Logging Macros */ diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h index 3435a55425..5dbb32ca0c 100644 --- a/lib/librte_metrics/rte_metrics_telemetry.h +++ b/lib/librte_metrics/rte_metrics_telemetry.h @@ -34,8 +34,6 @@ struct telemetry_metrics_data { int metrics_register_done; }; -struct telemetry_metrics_data tel_met_data; - __rte_experimental int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list); -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 14/19] node: fix missing header include 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (12 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 13/19] metrics: fix variable declaration in header Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 15/19] app: fix extra include paths for app builds Bruce Richardson ` (5 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Nithin Dabilpuram, Pavan Nikhilesh, Kiran Kumar K The rte_compat header file is needed for the '__rte_experimental' macro. Fixes: f00708c2aa53 ("node: add IPv4 rewrite and lookup control") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_node/rte_node_ip4_api.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_node/rte_node_ip4_api.h b/lib/librte_node/rte_node_ip4_api.h index eb9ebd5f89..46d0d8976b 100644 --- a/lib/librte_node/rte_node_ip4_api.h +++ b/lib/librte_node/rte_node_ip4_api.h @@ -21,6 +21,7 @@ extern "C" { #endif #include <rte_common.h> +#include <rte_compat.h> /** * IP4 lookup next nodes. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 15/19] app: fix extra include paths for app builds 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (13 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 14/19] node: fix missing header include Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers Bruce Richardson ` (4 subsequent siblings) 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Harry van Haaren The "includes" variable in the app/meson.build file was ignored when building the executable, meaning that apps couldn't pass additional include paths directly back. Fix this to align with drivers and libs. Fixes: fa036e70d794 ("app: generalize meson build") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/app/meson.build b/app/meson.build index 903117b866..87fc195dbf 100644 --- a/app/meson.build +++ b/app/meson.build @@ -66,6 +66,7 @@ foreach app:apps link_args: ldflags, link_whole: link_libs, dependencies: dep_objs, + include_directories: includes, install_rpath: join_paths(get_option('prefix'), driver_install_path), install: true) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (14 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 15/19] app: fix extra include paths for app builds Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:51 ` Ferruh Yigit 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock Bruce Richardson ` (3 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. The list of headers to check is based of the "headers" value returned from each library's meson.build file. However, since not all headers are for direct inclusion, add a build variable "headers_no_chkincs" to list those headers and skip checking them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- v2: * add maintainers entry * distribute exception list among meson.build files. MAINTAINERS | 4 ++++ app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ app/chkincs/main.c | 4 ++++ app/chkincs/meson.build | 28 ++++++++++++++++++++++++ app/meson.build | 1 + doc/guides/contributing/coding_style.rst | 12 ++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_ethdev/meson.build | 4 ++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++--- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 18 files changed, 85 insertions(+), 14 deletions(-) create mode 100755 app/chkincs/gen_c_file_for_header.py create mode 100644 app/chkincs/main.c create mode 100644 app/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 76ed473e44..49bb2aab2c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1561,6 +1561,10 @@ F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +Header build sanity checking +M: Bruce Richardson <bruce.richardson@intel.com> +F: app/chkincs/ + Sample packet helper functions for unit test M: Reshma Pattan <reshma.pattan@intel.com> F: app/test/sample_packet_forward.c diff --git a/app/chkincs/gen_c_file_for_header.py b/app/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..124cf96917 --- /dev/null +++ b/app/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020-2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/app/chkincs/main.c b/app/chkincs/main.c new file mode 100644 index 0000000000..ecdf641954 --- /dev/null +++ b/app/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2020-2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/app/chkincs/meson.build b/app/chkincs/meson.build new file mode 100644 index 0000000000..7fea11c506 --- /dev/null +++ b/app/chkincs/meson.build @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020-2021 Intel Corporation + +if not get_option('test_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "test_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags += '-Wno-unused-function' # needed if we include generic headers + +# some ethdev headers depend on bus headers +includes += include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources += files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = enabled_libs diff --git a/app/meson.build b/app/meson.build index 87fc195dbf..b8ee6d2e97 100644 --- a/app/meson.build +++ b/app/meson.build @@ -6,6 +6,7 @@ if is_windows endif apps = [ + 'chkincs', 'pdump', 'proc-info', 'test-acl', diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..041a3998ff 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``test_headers`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. These build + checks are done by the build of the ``dpdk-chkincs`` application, and + for header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + as part of the build of the ``dpdk-chkincs`` binary. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..449740e510 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +headers_no_chkincs += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..ab84869ea8 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -12,12 +12,10 @@ sources = files('ethdev_private.c', headers = files('rte_ethdev.h', 'rte_ethdev_driver.h', - 'rte_ethdev_core.h', 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', 'rte_ethdev_vdev.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -25,5 +23,7 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +headers_no_chkincs += files('rte_eth_ctrl.h', + 'rte_ethdev_core.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..b3ebc8b078 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +headers_no_chkincs += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..e24e6ed22b 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers_no_chkincs += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..3d3d515a4d 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1ab21bd4d8 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +headers_no_chkincs += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index 36fdcb6a57..1a95dae9e5 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +headers_no_chkincs += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_c11_mem.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..5d9b3601b3 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +headers_no_chkincs += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..a8b1c9a254 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +headers_no_chkincs += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index ed00f89146..404809bd44 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -65,6 +65,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + headers_no_chkincs = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) #old macro dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) # new macro install_headers(headers) + install_headers(headers_no_chkincs) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 45d974cd2c..7c9a8fce5f 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..37cd6e99ea 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -30,5 +30,7 @@ option('enable_trace_fp', type: 'boolean', value: false, description: 'enable fast path trace points.') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('test_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers Bruce Richardson @ 2021-01-15 11:51 ` Ferruh Yigit 2021-01-15 11:59 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Ferruh Yigit @ 2021-01-15 11:51 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, Thomas Monjalon, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu On 1/15/2021 11:10 AM, Bruce Richardson wrote: > To verify that all DPDK headers are ok for inclusion directly in a C > file, and are not missing any other pre-requisite headers, we can > auto-generate for each header an empty C file that includes that header. > Compiling these files will throw errors if any header has unmet > dependencies. > > The list of headers to check is based of the "headers" value returned from > each library's meson.build file. However, since not all headers are for > direct inclusion, add a build variable "headers_no_chkincs" to list those > headers and skip checking them. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > > v2: > * add maintainers entry > * distribute exception list among meson.build files. > > MAINTAINERS | 4 ++++ > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > app/chkincs/main.c | 4 ++++ > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ +1 to have this kind of tool to check, but it is not an application like others in the 'app' folder, what do you think placing it under 'devtools' or 'buildtools'? ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 11:51 ` Ferruh Yigit @ 2021-01-15 11:59 ` Bruce Richardson 2021-01-15 14:09 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:59 UTC (permalink / raw) To: Ferruh Yigit Cc: dev, david.marchand, Thomas Monjalon, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu On Fri, Jan 15, 2021 at 11:51:49AM +0000, Ferruh Yigit wrote: > On 1/15/2021 11:10 AM, Bruce Richardson wrote: > > To verify that all DPDK headers are ok for inclusion directly in a C > > file, and are not missing any other pre-requisite headers, we can > > auto-generate for each header an empty C file that includes that header. > > Compiling these files will throw errors if any header has unmet > > dependencies. > > > > The list of headers to check is based of the "headers" value returned from > > each library's meson.build file. However, since not all headers are for > > direct inclusion, add a build variable "headers_no_chkincs" to list those > > headers and skip checking them. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > > > v2: > > * add maintainers entry > > * distribute exception list among meson.build files. > > > > MAINTAINERS | 4 ++++ > > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > > app/chkincs/main.c | 4 ++++ > > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ > > +1 to have this kind of tool to check, but it is not an application like > others in the 'app' folder, what do you think placing it under 'devtools' or > 'buildtools'? Couple of reasons why it's placed in app. 1. We previously had a "chkincs" app in DPDK which was kept in the app folder 2. It allows us to reuse the build infrastructure for building apps, rather than reduplicating it. 3. We don't have any compilable code currently in the devtools folder, and even in buildtools the pmdinfogen app is going to go away. That being said, none of those reasons are major issues that can't be worked around if the consensus is to move it. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 11:59 ` Bruce Richardson @ 2021-01-15 14:09 ` Thomas Monjalon 2021-01-15 14:55 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-15 14:09 UTC (permalink / raw) To: Ferruh Yigit, Bruce Richardson Cc: dev, david.marchand, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu, adrien.mazarguil 15/01/2021 12:59, Bruce Richardson: > On Fri, Jan 15, 2021 at 11:51:49AM +0000, Ferruh Yigit wrote: > > On 1/15/2021 11:10 AM, Bruce Richardson wrote: > > > To verify that all DPDK headers are ok for inclusion directly in a C > > > file, and are not missing any other pre-requisite headers, we can > > > auto-generate for each header an empty C file that includes that header. > > > Compiling these files will throw errors if any header has unmet > > > dependencies. > > > > > > The list of headers to check is based of the "headers" value returned from > > > each library's meson.build file. However, since not all headers are for > > > direct inclusion, add a build variable "headers_no_chkincs" to list those > > > headers and skip checking them. > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > --- > > > > > > v2: > > > * add maintainers entry > > > * distribute exception list among meson.build files. > > > > > > MAINTAINERS | 4 ++++ > > > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > > > app/chkincs/main.c | 4 ++++ > > > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ > > > > +1 to have this kind of tool to check, but it is not an application like > > others in the 'app' folder, what do you think placing it under 'devtools' or > > 'buildtools'? > > Couple of reasons why it's placed in app. > > 1. We previously had a "chkincs" app in DPDK which was kept in the app > folder > 2. It allows us to reuse the build infrastructure for building apps, rather > than reduplicating it. > 3. We don't have any compilable code currently in the devtools folder, and > even in buildtools the pmdinfogen app is going to go away. > > That being said, none of those reasons are major issues that can't be > worked around if the consensus is to move it. It could be easily in devtools if it was a script. By the way, we already have devtools/check-includes.sh If your solution is better, please remove this script. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 14:09 ` Thomas Monjalon @ 2021-01-15 14:55 ` Bruce Richardson 2021-01-15 14:59 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 14:55 UTC (permalink / raw) To: Thomas Monjalon Cc: Ferruh Yigit, dev, david.marchand, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu, adrien.mazarguil On Fri, Jan 15, 2021 at 03:09:25PM +0100, Thomas Monjalon wrote: > 15/01/2021 12:59, Bruce Richardson: > > On Fri, Jan 15, 2021 at 11:51:49AM +0000, Ferruh Yigit wrote: > > > On 1/15/2021 11:10 AM, Bruce Richardson wrote: > > > > To verify that all DPDK headers are ok for inclusion directly in a C > > > > file, and are not missing any other pre-requisite headers, we can > > > > auto-generate for each header an empty C file that includes that header. > > > > Compiling these files will throw errors if any header has unmet > > > > dependencies. > > > > > > > > The list of headers to check is based of the "headers" value returned from > > > > each library's meson.build file. However, since not all headers are for > > > > direct inclusion, add a build variable "headers_no_chkincs" to list those > > > > headers and skip checking them. > > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > > --- > > > > > > > > v2: > > > > * add maintainers entry > > > > * distribute exception list among meson.build files. > > > > > > > > MAINTAINERS | 4 ++++ > > > > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > > > > app/chkincs/main.c | 4 ++++ > > > > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ > > > > > > +1 to have this kind of tool to check, but it is not an application like > > > others in the 'app' folder, what do you think placing it under 'devtools' or > > > 'buildtools'? > > > > Couple of reasons why it's placed in app. > > > > 1. We previously had a "chkincs" app in DPDK which was kept in the app > > folder > > 2. It allows us to reuse the build infrastructure for building apps, rather > > than reduplicating it. > > 3. We don't have any compilable code currently in the devtools folder, and > > even in buildtools the pmdinfogen app is going to go away. > > > > That being said, none of those reasons are major issues that can't be > > worked around if the consensus is to move it. > > It could be easily in devtools if it was a script. > By the way, we already have devtools/check-includes.sh > If your solution is better, please remove this script. > I only discovered the script existed when doing the v2 of this patchset, since it showed up in some grep calls I did for exception cases. I'm not sure that either approach is necessarily better, it's just right now that the script is unused (and also unknown) which is why I did this cleanup work. Here is how I see the current comparison between two approaches: * Script as advantage in that it performs C++ checks as well as C * Script also allows passing arbitrary additional C flags into checks for higher levels of compliance, but I'm not sure this is something I like as I'd rather have standardisation here across all headers than have some headers more pedantic-friendly than others. * Main downside of the script is that is works off directories rather than a list of files, which means it requires maintenance of the exception list in the script, rather than in the build definition files where we call out the headers to be installed I'm honestly fine either way on this (as with directory where implementation lives) - main thing is to have the checking done, rather than ignored. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 14:55 ` Bruce Richardson @ 2021-01-15 14:59 ` Bruce Richardson 2021-01-20 14:34 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 14:59 UTC (permalink / raw) To: Thomas Monjalon Cc: Ferruh Yigit, dev, david.marchand, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu, adrien.mazarguil On Fri, Jan 15, 2021 at 02:55:41PM +0000, Bruce Richardson wrote: > On Fri, Jan 15, 2021 at 03:09:25PM +0100, Thomas Monjalon wrote: > > 15/01/2021 12:59, Bruce Richardson: > > > On Fri, Jan 15, 2021 at 11:51:49AM +0000, Ferruh Yigit wrote: > > > > On 1/15/2021 11:10 AM, Bruce Richardson wrote: > > > > > To verify that all DPDK headers are ok for inclusion directly in a C > > > > > file, and are not missing any other pre-requisite headers, we can > > > > > auto-generate for each header an empty C file that includes that header. > > > > > Compiling these files will throw errors if any header has unmet > > > > > dependencies. > > > > > > > > > > The list of headers to check is based of the "headers" value returned from > > > > > each library's meson.build file. However, since not all headers are for > > > > > direct inclusion, add a build variable "headers_no_chkincs" to list those > > > > > headers and skip checking them. > > > > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > > > --- > > > > > > > > > > v2: > > > > > * add maintainers entry > > > > > * distribute exception list among meson.build files. > > > > > > > > > > MAINTAINERS | 4 ++++ > > > > > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > > > > > app/chkincs/main.c | 4 ++++ > > > > > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ > > > > > > > > +1 to have this kind of tool to check, but it is not an application like > > > > others in the 'app' folder, what do you think placing it under 'devtools' or > > > > 'buildtools'? > > > > > > Couple of reasons why it's placed in app. > > > > > > 1. We previously had a "chkincs" app in DPDK which was kept in the app > > > folder > > > 2. It allows us to reuse the build infrastructure for building apps, rather > > > than reduplicating it. > > > 3. We don't have any compilable code currently in the devtools folder, and > > > even in buildtools the pmdinfogen app is going to go away. > > > > > > That being said, none of those reasons are major issues that can't be > > > worked around if the consensus is to move it. > > > > It could be easily in devtools if it was a script. > > By the way, we already have devtools/check-includes.sh > > If your solution is better, please remove this script. > > > I only discovered the script existed when doing the v2 of this patchset, > since it showed up in some grep calls I did for exception cases. I'm not > sure that either approach is necessarily better, it's just right now that > the script is unused (and also unknown) which is why I did this cleanup > work. > > Here is how I see the current comparison between two approaches: > * Script as advantage in that it performs C++ checks as well as C > * Script also allows passing arbitrary additional C flags into checks for > higher levels of compliance, but I'm not sure this is something I like as > I'd rather have standardisation here across all headers than have some > headers more pedantic-friendly than others. > * Main downside of the script is that is works off directories rather than > a list of files, which means it requires maintenance of the exception > list in the script, rather than in the build definition files where we call > out the headers to be installed > > I'm honestly fine either way on this (as with directory where > implementation lives) - main thing is to have the checking done, rather > than ignored. > And I (obviously) forgot to mention that the existing script is not currently integrated into existing build or build-test scripts. I haven't looked into how complex this would be, but it would require investigation time. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-15 14:59 ` Bruce Richardson @ 2021-01-20 14:34 ` Bruce Richardson 2021-01-20 15:05 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-20 14:34 UTC (permalink / raw) To: Thomas Monjalon Cc: Ferruh Yigit, dev, david.marchand, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu, adrien.mazarguil On Fri, Jan 15, 2021 at 02:59:08PM +0000, Bruce Richardson wrote: > On Fri, Jan 15, 2021 at 02:55:41PM +0000, Bruce Richardson wrote: > > On Fri, Jan 15, 2021 at 03:09:25PM +0100, Thomas Monjalon wrote: > > > 15/01/2021 12:59, Bruce Richardson: > > > > On Fri, Jan 15, 2021 at 11:51:49AM +0000, Ferruh Yigit wrote: > > > > > On 1/15/2021 11:10 AM, Bruce Richardson wrote: > > > > > > To verify that all DPDK headers are ok for inclusion directly in a C > > > > > > file, and are not missing any other pre-requisite headers, we can > > > > > > auto-generate for each header an empty C file that includes that header. > > > > > > Compiling these files will throw errors if any header has unmet > > > > > > dependencies. > > > > > > > > > > > > The list of headers to check is based of the "headers" value returned from > > > > > > each library's meson.build file. However, since not all headers are for > > > > > > direct inclusion, add a build variable "headers_no_chkincs" to list those > > > > > > headers and skip checking them. > > > > > > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > > > > --- > > > > > > > > > > > > v2: > > > > > > * add maintainers entry > > > > > > * distribute exception list among meson.build files. > > > > > > > > > > > > MAINTAINERS | 4 ++++ > > > > > > app/chkincs/gen_c_file_for_header.py | 12 ++++++++++ > > > > > > app/chkincs/main.c | 4 ++++ > > > > > > app/chkincs/meson.build | 28 ++++++++++++++++++++++++ > > > > > > > > > > +1 to have this kind of tool to check, but it is not an application like > > > > > others in the 'app' folder, what do you think placing it under 'devtools' or > > > > > 'buildtools'? > > > > > > > > Couple of reasons why it's placed in app. > > > > > > > > 1. We previously had a "chkincs" app in DPDK which was kept in the app > > > > folder > > > > 2. It allows us to reuse the build infrastructure for building apps, rather > > > > than reduplicating it. > > > > 3. We don't have any compilable code currently in the devtools folder, and > > > > even in buildtools the pmdinfogen app is going to go away. > > > > > > > > That being said, none of those reasons are major issues that can't be > > > > worked around if the consensus is to move it. > > > > > > It could be easily in devtools if it was a script. > > > By the way, we already have devtools/check-includes.sh > > > If your solution is better, please remove this script. > > > > > I only discovered the script existed when doing the v2 of this patchset, > > since it showed up in some grep calls I did for exception cases. I'm not > > sure that either approach is necessarily better, it's just right now that > > the script is unused (and also unknown) which is why I did this cleanup > > work. > > > > Here is how I see the current comparison between two approaches: > > * Script as advantage in that it performs C++ checks as well as C > > * Script also allows passing arbitrary additional C flags into checks for > > higher levels of compliance, but I'm not sure this is something I like as > > I'd rather have standardisation here across all headers than have some > > headers more pedantic-friendly than others. > > * Main downside of the script is that is works off directories rather than > > a list of files, which means it requires maintenance of the exception > > list in the script, rather than in the build definition files where we call > > out the headers to be installed > > > > I'm honestly fine either way on this (as with directory where > > implementation lives) - main thing is to have the checking done, rather > > than ignored. > > > And I (obviously) forgot to mention that the existing script is not currently > integrated into existing build or build-test scripts. I haven't looked into > how complex this would be, but it would require investigation time. I do plan to look into re-using the script and other options around this area - hopefully in RC2 timeframe. However, to make the patchset rework a little easier, perhaps the small header fixes could be picked up for ahead of any rework? /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers 2021-01-20 14:34 ` Bruce Richardson @ 2021-01-20 15:05 ` David Marchand 0 siblings, 0 replies; 165+ messages in thread From: David Marchand @ 2021-01-20 15:05 UTC (permalink / raw) To: Bruce Richardson Cc: Thomas Monjalon, Ferruh Yigit, dev, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Konstantin Ananyev, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu, Adrien Mazarguil On Wed, Jan 20, 2021 at 3:34 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > On Fri, Jan 15, 2021 at 02:59:08PM +0000, Bruce Richardson wrote: > > On Fri, Jan 15, 2021 at 02:55:41PM +0000, Bruce Richardson wrote: > > > On Fri, Jan 15, 2021 at 03:09:25PM +0100, Thomas Monjalon wrote: > > > I'm honestly fine either way on this (as with directory where > > > implementation lives) - main thing is to have the checking done, rather > > > than ignored. > > > > > And I (obviously) forgot to mention that the existing script is not currently > > integrated into existing build or build-test scripts. I haven't looked into > > how complex this would be, but it would require investigation time. > > I do plan to look into re-using the script and other options around this > area - hopefully in RC2 timeframe. However, to make the patchset rework a > little easier, perhaps the small header fixes could be picked up for ahead > of any rework? I'll merge those fixes hopefully tomorrow. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (15 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 13:25 ` Honnappa Nagarahalli 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 18/19] eal/x86: add architecture-specific headers to chkincs Bruce Richardson ` (2 subsequent siblings) 19 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Honnappa Nagarahalli, Phil Yang, Gavin Hu, Steve Capper Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock Bruce Richardson @ 2021-01-15 13:25 ` Honnappa Nagarahalli 0 siblings, 0 replies; 165+ messages in thread From: Honnappa Nagarahalli @ 2021-01-15 13:25 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, stable, Phil Yang, Gavin Hu, Steve Capper, nd, Honnappa Nagarahalli, nd <snip> > > Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. > > Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> > --- > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_eal/include/generic/rte_mcslock.h > b/lib/librte_eal/include/generic/rte_mcslock.h > index d370bef17a..9f323bd2a2 100644 > --- a/lib/librte_eal/include/generic/rte_mcslock.h > +++ b/lib/librte_eal/include/generic/rte_mcslock.h > @@ -22,6 +22,7 @@ > #include <rte_lcore.h> > #include <rte_common.h> > #include <rte_pause.h> > +#include <rte_branch_prediction.h> > > /** > * The rte_mcslock_t type. > -- > 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 18/19] eal/x86: add architecture-specific headers to chkincs 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (16 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 19/19] test-meson-builds: add includes check to default x86 build Bruce Richardson 2021-01-21 9:25 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes David Marchand 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Konstantin Ananyev Ensure the architecture-specific header files for x86 have all necessary includes in them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..835ea22947 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_headers_no_chkincs = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_headers_no_chkincs, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v2 19/19] test-meson-builds: add includes check to default x86 build 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (17 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 18/19] eal/x86: add architecture-specific headers to chkincs Bruce Richardson @ 2021-01-15 11:10 ` Bruce Richardson 2021-01-21 9:25 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes David Marchand 19 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-15 11:10 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson Since the includes check is disabled by default, we need to explicitly enable it to have it run. To minimise any extra build time when running the test-meson-builds script, we just add it to the default x86 build. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- devtools/test-meson-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 00e3d0b443..5dca9b3bce 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -220,7 +220,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared +build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine -Dtest_includes=true $use_shared # 32-bit with default compiler if check_cc_flags '-m32' ; then -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson ` (18 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 19/19] test-meson-builds: add includes check to default x86 build Bruce Richardson @ 2021-01-21 9:25 ` David Marchand 2021-01-21 9:33 ` Bruce Richardson 19 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-21 9:25 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Fri, Jan 15, 2021 at 12:11 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > As a general principle, each header file should include any other > headers it needs to provide data type definitions or macros. For > example, any header using the uintX_t types in structures or function > prototypes should include "stdint.h" to provide those type definitions. > > In practice, while many, but not all, headers in DPDK did include all > necessary headers, it was never actually checked that each header could > be included in a C file and compiled without having any compiler errors > about missing definitions. This patchset fixes any missing includes in > public headers from the DPDK "lib" folder and then adds a "chkincs" app. > to verify this on an ongoing basis. > > This chkincs app does nothing when run, it's for build-time checking > only. Its source code consists of one C file per public DPDK header, > where that C file contains nothing except an include for that header. > Therefore, if any header is added to the lib folder which fails to > compile when included alone, the build of chkincs will fail with a > suitable error message. Since this compile checking is not needed on > most builds of DPDK, the building of chkincs is disabled by default, but > can be enabled by the "test_includes" meson option. To catch errors with > patch submissions, the final patch of this series enables it for a > single build in test-meson-builds script. > > Future work could involve doing similar checks on headers for C++ compatibility, > for example. > > V2: > * Add maintainers file entry for new app > * Drop patch for c11 ring header > * Use build variable "headers_no_chkincs" for tracking exceptions > > Bruce Richardson (19): > eal: fix missing header inclusion I split this as two patches since the rte_thread.h only applies to 21.02. > telemetry: fix missing header include > ethdev: fix missing header include Patch 3 seems unnecessary, we skip rte_eth_ctrl.h validation later but I took it anyway. > net: fix missing header include > mbuf: fix missing header include Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > bitratestats: fix missing header include > rib: fix missing header includes > vhost: fix missing header includes > ipsec: fix missing header include > fib: fix missing header includes > table: fix missing header include > pipeline: fix missing header includes > metrics: fix variable declaration in header > node: fix missing header include > app: fix extra include paths for app builds Reviewed and applied patches 1-15, thanks Bruce. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 9:25 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes David Marchand @ 2021-01-21 9:33 ` Bruce Richardson 2021-01-21 9:36 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-21 9:33 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > On Fri, Jan 15, 2021 at 12:11 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > As a general principle, each header file should include any other > > headers it needs to provide data type definitions or macros. For > > example, any header using the uintX_t types in structures or function > > prototypes should include "stdint.h" to provide those type definitions. > > > > In practice, while many, but not all, headers in DPDK did include all > > necessary headers, it was never actually checked that each header could > > be included in a C file and compiled without having any compiler errors > > about missing definitions. This patchset fixes any missing includes in > > public headers from the DPDK "lib" folder and then adds a "chkincs" app. > > to verify this on an ongoing basis. > > > > This chkincs app does nothing when run, it's for build-time checking > > only. Its source code consists of one C file per public DPDK header, > > where that C file contains nothing except an include for that header. > > Therefore, if any header is added to the lib folder which fails to > > compile when included alone, the build of chkincs will fail with a > > suitable error message. Since this compile checking is not needed on > > most builds of DPDK, the building of chkincs is disabled by default, but > > can be enabled by the "test_includes" meson option. To catch errors with > > patch submissions, the final patch of this series enables it for a > > single build in test-meson-builds script. > > > > Future work could involve doing similar checks on headers for C++ compatibility, > > for example. > > > > V2: > > * Add maintainers file entry for new app > > * Drop patch for c11 ring header > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > Bruce Richardson (19): > > eal: fix missing header inclusion > > I split this as two patches since the rte_thread.h only applies to 21.02. > > > > telemetry: fix missing header include > > ethdev: fix missing header include > > Patch 3 seems unnecessary, we skip rte_eth_ctrl.h validation later but > I took it anyway. > > > net: fix missing header include > > mbuf: fix missing header include > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > Good question. The checks I was doing were only for missing headers. Checking for superfluous headers is more complicated and not something I've looked at. I know it was previously suggested to use the "include-what-you-use" tool on DPDK, if anyone wants to attempt that. > > > bitratestats: fix missing header include > > rib: fix missing header includes > > vhost: fix missing header includes > > ipsec: fix missing header include > > fib: fix missing header includes > > table: fix missing header include > > pipeline: fix missing header includes > > metrics: fix variable declaration in header > > node: fix missing header include > > app: fix extra include paths for app builds > > Reviewed and applied patches 1-15, thanks Bruce. > Thanks for the bits of rework, David. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 9:33 ` Bruce Richardson @ 2021-01-21 9:36 ` Thomas Monjalon 2021-01-21 9:43 ` Bruce Richardson 2021-01-21 15:15 ` Bruce Richardson 0 siblings, 2 replies; 165+ messages in thread From: Thomas Monjalon @ 2021-01-21 9:36 UTC (permalink / raw) To: David Marchand, Bruce Richardson; +Cc: dev 21/01/2021 10:33, Bruce Richardson: > On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > > > Good question. The checks I was doing were only for missing headers. > Checking for superfluous headers is more complicated and not something I've > looked at. I know it was previously suggested to use the > "include-what-you-use" tool on DPDK, if anyone wants to attempt that. I would love having an integration of include-what-you-use in our build system. I don't know whether it's trivial or difficult with meson. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 9:36 ` Thomas Monjalon @ 2021-01-21 9:43 ` Bruce Richardson 2021-01-21 15:15 ` Bruce Richardson 1 sibling, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-21 9:43 UTC (permalink / raw) To: Thomas Monjalon; +Cc: David Marchand, dev On Thu, Jan 21, 2021 at 10:36:18AM +0100, Thomas Monjalon wrote: > 21/01/2021 10:33, Bruce Richardson: > > On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > > > > > Good question. The checks I was doing were only for missing headers. > > Checking for superfluous headers is more complicated and not something I've > > looked at. I know it was previously suggested to use the > > "include-what-you-use" tool on DPDK, if anyone wants to attempt that. > > I would love having an integration of include-what-you-use in our build system. > I don't know whether it's trivial or difficult with meson. > +1 to that. I'm not familiar enough with the tool to comment on how hard or difficult it would be. I try it once a few years ago, and I don't think I managed to get it working successfully standalone, let alone as part of a build system. However, I'm sure IWYU has moved on quite a bit since then... ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 9:36 ` Thomas Monjalon 2021-01-21 9:43 ` Bruce Richardson @ 2021-01-21 15:15 ` Bruce Richardson 2021-01-21 23:20 ` Thomas Monjalon 1 sibling, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-21 15:15 UTC (permalink / raw) To: Thomas Monjalon; +Cc: David Marchand, dev On Thu, Jan 21, 2021 at 10:36:18AM +0100, Thomas Monjalon wrote: > 21/01/2021 10:33, Bruce Richardson: > > On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > > > > > Good question. The checks I was doing were only for missing headers. > > Checking for superfluous headers is more complicated and not something I've > > looked at. I know it was previously suggested to use the > > "include-what-you-use" tool on DPDK, if anyone wants to attempt that. > > I would love having an integration of include-what-you-use in our build system. > I don't know whether it's trivial or difficult with meson. > Did some initial investigation here, and here are some basic instructions based on how I got it running on my Ubuntu 20.10 system. The positive is that "iwyu_tool" can run on DPDK build dirs without any extra work on our part. 1. Install iwyu from Ubuntu packaging. 2. Install clang-9 package: * This is not a dependency of iwyu, but probably should be * The version of clang installed *must* match that used to build iwyu [I had clang-10 installed which didn't work for this] * If you get errors about missing standard headers e.g. stddef.h, the version mismatch is likely the issue. 3. Configure a clang build of DPDK: * CC=clang meson <args> build-clang 4. "iwyu_tool" supports the build database format used by meson, so just run: "iwyu_tool -p build-clang" Be warned, this runs really slowly and produces lots of output! Regards, /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 15:15 ` Bruce Richardson @ 2021-01-21 23:20 ` Thomas Monjalon 2021-01-22 10:44 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-21 23:20 UTC (permalink / raw) To: Bruce Richardson; +Cc: David Marchand, dev 21/01/2021 16:15, Bruce Richardson: > On Thu, Jan 21, 2021 at 10:36:18AM +0100, Thomas Monjalon wrote: > > 21/01/2021 10:33, Bruce Richardson: > > > On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > > > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > > > > > > > Good question. The checks I was doing were only for missing headers. > > > Checking for superfluous headers is more complicated and not something I've > > > looked at. I know it was previously suggested to use the > > > "include-what-you-use" tool on DPDK, if anyone wants to attempt that. > > > > I would love having an integration of include-what-you-use in our build system. > > I don't know whether it's trivial or difficult with meson. > > > > Did some initial investigation here, and here are some basic instructions > based on how I got it running on my Ubuntu 20.10 system. The positive is > that "iwyu_tool" can run on DPDK build dirs without any extra work on our > part. I had looked at it recently but didn't try thinking meson was not compatible. Thank you, it works :) > 1. Install iwyu from Ubuntu packaging. > 2. Install clang-9 package: > * This is not a dependency of iwyu, but probably should be > * The version of clang installed *must* match that used to build iwyu > [I had clang-10 installed which didn't work for this] > * If you get errors about missing standard headers e.g. stddef.h, > the version mismatch is likely the issue. > 3. Configure a clang build of DPDK: > * CC=clang meson <args> build-clang > 4. "iwyu_tool" supports the build database format used by meson, so just > run: "iwyu_tool -p build-clang" > > Be warned, this runs really slowly and produces lots of output! We need to filter only reports of useless includes and do the cleaning... The difficult part is that some includes may be useless on Linux but required on FreeBSD. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 2021-01-21 23:20 ` Thomas Monjalon @ 2021-01-22 10:44 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-22 10:44 UTC (permalink / raw) To: Thomas Monjalon; +Cc: David Marchand, dev On Fri, Jan 22, 2021 at 12:20:55AM +0100, Thomas Monjalon wrote: > 21/01/2021 16:15, Bruce Richardson: > > On Thu, Jan 21, 2021 at 10:36:18AM +0100, Thomas Monjalon wrote: > > > 21/01/2021 10:33, Bruce Richardson: > > > > On Thu, Jan 21, 2021 at 10:25:07AM +0100, David Marchand wrote: > > > > > Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > > > > > > > > > Good question. The checks I was doing were only for missing headers. > > > > Checking for superfluous headers is more complicated and not something I've > > > > looked at. I know it was previously suggested to use the > > > > "include-what-you-use" tool on DPDK, if anyone wants to attempt that. > > > > > > I would love having an integration of include-what-you-use in our build system. > > > I don't know whether it's trivial or difficult with meson. > > > > > > > Did some initial investigation here, and here are some basic instructions > > based on how I got it running on my Ubuntu 20.10 system. The positive is > > that "iwyu_tool" can run on DPDK build dirs without any extra work on our > > part. > > I had looked at it recently but didn't try thinking meson was not compatible. > Thank you, it works :) > > > 1. Install iwyu from Ubuntu packaging. > > 2. Install clang-9 package: > > * This is not a dependency of iwyu, but probably should be > > * The version of clang installed *must* match that used to build iwyu > > [I had clang-10 installed which didn't work for this] > > * If you get errors about missing standard headers e.g. stddef.h, > > the version mismatch is likely the issue. > > 3. Configure a clang build of DPDK: > > * CC=clang meson <args> build-clang > > 4. "iwyu_tool" supports the build database format used by meson, so just > > run: "iwyu_tool -p build-clang" > > > > Be warned, this runs really slowly and produces lots of output! > > We need to filter only reports of useless includes > and do the cleaning... > > The difficult part is that some includes may be useless on Linux > but required on FreeBSD. > And that some "useless" includes in headers are required by the corresponding C file which then needs the include added there. :-( However, thinking a bit more after sending that email yesterday and looking at the results, I came to the same conclusion as you - we should use it to primarily remove unused headers. That will be slowed down by the need for additional fixup, but it's doable if someone has a bit of time. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (20 preceding siblings ...) 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson @ 2021-01-25 14:11 ` Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 1/4] eal: add missing include to mcslock Bruce Richardson ` (4 more replies) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson ` (3 subsequent siblings) 25 siblings, 5 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 14:11 UTC (permalink / raw) To: dev; +Cc: david.marchand, thomas, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. The script "check-includes.sh" could be used for this job, but it was not called out in the documentation, so many contributors may not have been aware of it's existance. It also was difficult to run from a source-code directory, as the script did not automatically allow finding of headers from one DPDK library directory to another [this was probably based on running it on a build created by the "make" build system, where all headers were in a single directory]. To attempt to have a build-system integrated replacement, this patchset adds a "chkincs" app in the buildtools directory to verify this on an ongoing basis. This chkincs app does nothing when run, and is not installed as part of a DPDK "ninja install", it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, which was something done by the check-includes.sh script but which is missing here.. V3: * Shrunk patchset as most header fixes already applied * Moved chkincs from "apps" to the "buildtools" directory, which is a better location for something not for installation for end-user use. * Added patch to drop check-includes script. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions Bruce Richardson (4): eal: add missing include to mcslock build: separate out headers for include checking buildtools/chkincs: add app to verify header includes devtools: remove check-includes script MAINTAINERS | 5 +- buildtools/chkincs/gen_c_file_for_header.py | 12 + buildtools/chkincs/main.c | 4 + buildtools/chkincs/meson.build | 40 +++ devtools/check-includes.sh | 259 ------------------- devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 + lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +- lib/librte_ethdev/meson.build | 4 +- lib/librte_hash/meson.build | 4 +- lib/librte_ipsec/meson.build | 3 +- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +- lib/librte_stack/meson.build | 4 +- lib/librte_table/meson.build | 7 +- lib/meson.build | 3 + meson.build | 6 + meson_options.txt | 2 + 21 files changed, 112 insertions(+), 280 deletions(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build delete mode 100755 devtools/check-includes.sh -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v3 1/4] eal: add missing include to mcslock 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson @ 2021-01-25 14:11 ` Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 2/4] build: separate out headers for include checking Bruce Richardson ` (3 subsequent siblings) 4 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 14:11 UTC (permalink / raw) To: dev Cc: david.marchand, thomas, Bruce Richardson, stable, Honnappa Nagarahalli, Steve Capper, Phil Yang, Gavin Hu Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] build: separate out headers for include checking 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 1/4] eal: add missing include to mcslock Bruce Richardson @ 2021-01-25 14:11 ` Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 3/4] buildtools/chkincs: add app to verify header includes Bruce Richardson ` (2 subsequent siblings) 4 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 14:11 UTC (permalink / raw) To: dev Cc: david.marchand, thomas, Bruce Richardson, Konstantin Ananyev, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu For some libraries, there may be some header files which are not for direct inclusion, but rather are to be included via other header files. To allow later checking of these files for missing includes, we separate out the indirect include files from the direct ones. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/contributing/coding_style.rst | 12 ++++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- lib/librte_ethdev/meson.build | 4 ++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++---- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 14 files changed, 45 insertions(+), 19 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..dba4145228 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..449740e510 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +headers_no_chkincs += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..835ea22947 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_headers_no_chkincs = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_headers_no_chkincs, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..ab84869ea8 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -12,12 +12,10 @@ sources = files('ethdev_private.c', headers = files('rte_ethdev.h', 'rte_ethdev_driver.h', - 'rte_ethdev_core.h', 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', 'rte_ethdev_vdev.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -25,5 +23,7 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +headers_no_chkincs += files('rte_eth_ctrl.h', + 'rte_ethdev_core.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..b3ebc8b078 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +headers_no_chkincs += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..e24e6ed22b 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers_no_chkincs += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..3d3d515a4d 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1ab21bd4d8 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +headers_no_chkincs += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index 36fdcb6a57..1a95dae9e5 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +headers_no_chkincs += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_c11_mem.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..5d9b3601b3 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +headers_no_chkincs += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..a8b1c9a254 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +headers_no_chkincs += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index 44f0a62142..aa0a5ac8fc 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -66,6 +66,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + headers_no_chkincs = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) + install_headers(headers_no_chkincs) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 45d974cd2c..7c9a8fce5f 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..5c382487da 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v3 3/4] buildtools/chkincs: add app to verify header includes 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 1/4] eal: add missing include to mcslock Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 2/4] build: separate out headers for include checking Bruce Richardson @ 2021-01-25 14:11 ` Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 4/4] devtools: remove check-includes script Bruce Richardson 2021-01-25 15:51 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes David Marchand 4 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 14:11 UTC (permalink / raw) To: dev; +Cc: david.marchand, thomas, Bruce Richardson To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. To ensure ongoing compliance, we enable this build test as part of the default x86 build in "test-meson-builds.sh". Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 4 +++ buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ buildtools/chkincs/main.c | 4 +++ buildtools/chkincs/meson.build | 40 +++++++++++++++++++++ devtools/test-meson-builds.sh | 2 +- meson.build | 5 +++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index aa973a3960..6df494e367 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1560,6 +1560,10 @@ F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +Header build sanity checking +M: Bruce Richardson <bruce.richardson@intel.com> +F: buildtools/chkincs/ + Sample packet helper functions for unit test M: Reshma Pattan <reshma.pattan@intel.com> F: app/test/sample_packet_forward.c diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..ed46948aea --- /dev/null +++ b/buildtools/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c new file mode 100644 index 0000000000..d25bb8852a --- /dev/null +++ b/buildtools/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build new file mode 100644 index 0000000000..5dc43283e0 --- /dev/null +++ b/buildtools/chkincs/meson.build @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +if not get_option('check_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "check_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags = machine_args +cflags += '-Wno-unused-function' # needed if we include generic headers +cflags += '-DALLOW_EXPERIMENTAL_API' + +# some ethdev headers depend on bus headers +includes = include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources = files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = [] +foreach l:enabled_libs + deps += get_variable('static_rte_' + l) +endforeach + +executable('chkincs', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + link_whole: dpdk_static_libraries + dpdk_drivers, + install: false) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index efa91e0e40..07b5e6aeca 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,7 +227,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc skipABI \ +build build-x86-default cc skipABI -Dcheck_includes=true\ -Dlibdir=lib -Dmachine=$default_machine $use_shared # 32-bit with default compiler diff --git a/meson.build b/meson.build index 7c9a8fce5f..9aa7882911 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,11 @@ if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v3 4/4] devtools: remove check-includes script 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson ` (2 preceding siblings ...) 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 3/4] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-25 14:11 ` Bruce Richardson 2021-01-25 15:51 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes David Marchand 4 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 14:11 UTC (permalink / raw) To: dev; +Cc: david.marchand, thomas, Bruce Richardson The check-includes script allowed checking header files in a given directory to ensure that each header compiled alone without requiring any other header inclusions. With header checking now being done by the chkincs app in the build system this script can be removed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 - devtools/check-includes.sh | 259 ------------------------------------- 2 files changed, 260 deletions(-) delete mode 100755 devtools/check-includes.sh diff --git a/MAINTAINERS b/MAINTAINERS index 6df494e367..30721f8561 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -81,7 +81,6 @@ F: devtools/check-dup-includes.sh F: devtools/check-maintainers.sh F: devtools/check-forbidden-tokens.awk F: devtools/check-git-log.sh -F: devtools/check-includes.sh F: devtools/check-spdx-tag.sh F: devtools/check-symbol-maps.sh F: devtools/checkpatches.sh diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh deleted file mode 100755 index 940cf0eb2a..0000000000 --- a/devtools/check-includes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016 6WIND S.A. - -# This script checks that header files in a given directory do not miss -# dependencies when included on their own, do not conflict and accept being -# compiled with the strictest possible flags. -# -# Files are looked up in the directory provided as the first argument, -# otherwise build/include by default. -# -# Recognized environment variables: -# -# VERBOSE=1 is the same as -v. -# -# QUIET=1 is the same as -q. -# -# SUMMARY=1 is the same as -s. -# -# CC, CPPFLAGS, CFLAGS, CXX, CXXFLAGS are taken into account. -# -# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict -# C/C++ compilation flags. -# -# IGNORE contains a list of globbing patterns matching files (relative to the -# include directory) to avoid. It is set by default to known DPDK headers -# which must not be included on their own. -# -# IGNORE_CXX provides additional files for C++. - -while getopts hqvs arg; do - case $arg in - h) - cat <<EOF -usage: $0 [-h] [-q] [-v] [-s] [DIR] - -This script checks that header files in a given directory do not miss -dependencies when included on their own, do not conflict and accept being -compiled with the strictest possible flags. - - -h display this help and exit - -q quiet mode, disable normal output - -v show command lines being executed - -s show summary - -With no DIR, default to build/include. - -Any failed header check yields a nonzero exit status. -EOF - exit - ;; - q) - QUIET=1 - ;; - v) - VERBOSE=1 - ;; - s) - SUMMARY=1 - ;; - *) - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -include_dir=${1:-build/include} - -: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror} -: ${PEDANTIC_CXXFLAGS=} -: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600} -: ${CC:=cc} -: ${CXX:=c++} -: ${IGNORE= \ - 'rte_atomic_32.h' \ - 'rte_atomic_64.h' \ - 'rte_byteorder_32.h' \ - 'rte_byteorder_64.h' \ - 'generic/*' \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ - 'rte_eal_interrupts.h' \ -} -: ${IGNORE_CXX= \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ -} - -temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) -pass_cc= -failures_cc=0 - -temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) -pass_cxx= -failures_cxx=0 - -# Process output parameters. - -[ "$QUIET" = 1 ] && -exec 1> /dev/null - -[ "$VERBOSE" = 1 ] && -output () -{ - local CCV - local CXXV - - shift - CCV=$CC - CXXV=$CXX - CC="echo $CC" CXX="echo $CXX" "$@" - CC=$CCV - CXX=$CXXV - - "$@" -} || -output () -{ - - printf ' %s\n' "$1" - shift - "$@" -} - -trap 'rm -f "$temp_cc" "$temp_cxx"' EXIT - -compile_cc () -{ - ${CC} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CFLAGS} ${CFLAGS} \ - -c -o /dev/null "${temp_cc}" -} - -compile_cxx () -{ - ${CXX} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CXXFLAGS} ${CXXFLAGS} \ - -c -o /dev/null "${temp_cxx}" -} - -ignore () -{ - file="$1" - shift - while [ $# -ne 0 ]; do - case "$file" in - $1) - return 0 - ;; - esac - shift - done - return 1 -} - -# Check C/C++ compilation for each header file. - -while read -r path -do - file=${path#$include_dir} - file=${file##/} - if ignore "$file" $IGNORE; then - output "SKIP $file" : - continue - fi - if printf "\ -#include <%s> - -int main(void) -{ - return 0; -} -" "$file" > "$temp_cc" && - output "CC $file" compile_cc - then - pass_cc="$pass_cc $file" - else - failures_cc=$(($failures_cc + 1)) - fi - if ignore "$file" $IGNORE_CXX; then - output "SKIP CXX $file" : - continue - fi - if printf "\ -#include <%s> - -int main() -{ -} -" "$file" > "$temp_cxx" && - output "CXX $file" compile_cxx - then - pass_cxx="$pass_cxx $file" - else - failures_cxx=$(($failures_cxx + 1)) - fi -done <<EOF -$(find "$include_dir" -name '*.h') -EOF - -# Check C compilation with all includes. - -: > "$temp_cc" && -for file in $pass_cc; do - printf "\ -#include <%s> -" "$file" >> $temp_cc -done -if printf "\ -int main(void) -{ - return 0; -} -" >> "$temp_cc" && - output "CC (all includes that did not fail)" compile_cc -then - : -else - failures_cc=$(($failures_cc + 1)) -fi - -# Check C++ compilation with all includes. - -: > "$temp_cxx" && -for file in $pass_cxx; do - printf "\ -#include <%s> -" "$file" >> $temp_cxx -done -if printf "\ -int main() -{ -} -" >> "$temp_cxx" && - output "CXX (all includes that did not fail)" compile_cxx -then - : -else - failures_cxx=$(($failures_cxx + 1)) -fi - -# Report results. - -if [ "$SUMMARY" = 1 ]; then - printf "\ -Summary: - %u failure(s) for C using '%s'. - %u failure(s) for C++ using '%s'. -" $failures_cc "$CC" $failures_cxx "$CXX" 1>&2 -fi - -# Exit with nonzero status if there are failures. - -[ $failures_cc -eq 0 ] && -[ $failures_cxx -eq 0 ] -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson ` (3 preceding siblings ...) 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 4/4] devtools: remove check-includes script Bruce Richardson @ 2021-01-25 15:51 ` David Marchand 2021-01-25 18:17 ` Bruce Richardson 2021-01-26 11:15 ` Bruce Richardson 4 siblings, 2 replies; 165+ messages in thread From: David Marchand @ 2021-01-25 15:51 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > As a general principle, each header file should include any other > headers it needs to provide data type definitions or macros. For > example, any header using the uintX_t types in structures or function > prototypes should include "stdint.h" to provide those type definitions. > > In practice, while many, but not all, headers in DPDK did include all > necessary headers, it was never actually checked that each header could > be included in a C file and compiled without having any compiler errors > about missing definitions. The script "check-includes.sh" could be used > for this job, but it was not called out in the documentation, so many > contributors may not have been aware of it's existance. It also was > difficult to run from a source-code directory, as the script did not > automatically allow finding of headers from one DPDK library directory > to another [this was probably based on running it on a build created by > the "make" build system, where all headers were in a single directory]. > To attempt to have a build-system integrated replacement, this patchset > adds a "chkincs" app in the buildtools directory to verify this on an > ongoing basis. > > This chkincs app does nothing when run, and is not installed as part of > a DPDK "ninja install", it's for build-time checking only. Its source > code consists of one C file per public DPDK header, where that C file > contains nothing except an include for that header. Therefore, if any > header is added to the lib folder which fails to compile when included > alone, the build of chkincs will fail with a suitable error message. > Since this compile checking is not needed on most builds of DPDK, the > building of chkincs is disabled by default, but can be enabled by the > "test_includes" meson option. To catch errors with patch submissions, > the final patch of this series enables it for a single build in > test-meson-builds script. > > Future work could involve doing similar checks on headers for C++ > compatibility, which was something done by the check-includes.sh script > but which is missing here.. > > V3: > * Shrunk patchset as most header fixes already applied > * Moved chkincs from "apps" to the "buildtools" directory, which is a > better location for something not for installation for end-user use. > * Added patch to drop check-includes script. > > V2: > * Add maintainers file entry for new app > * Drop patch for c11 ring header > * Use build variable "headers_no_chkincs" for tracking exceptions > > Bruce Richardson (4): > eal: add missing include to mcslock > build: separate out headers for include checking > buildtools/chkincs: add app to verify header includes > devtools: remove check-includes script > > MAINTAINERS | 5 +- > buildtools/chkincs/gen_c_file_for_header.py | 12 + > buildtools/chkincs/main.c | 4 + > buildtools/chkincs/meson.build | 40 +++ > devtools/check-includes.sh | 259 ------------------- > devtools/test-meson-builds.sh | 2 +- > doc/guides/contributing/coding_style.rst | 12 + > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > lib/librte_eal/include/meson.build | 2 +- > lib/librte_eal/x86/include/meson.build | 14 +- > lib/librte_ethdev/meson.build | 4 +- > lib/librte_hash/meson.build | 4 +- > lib/librte_ipsec/meson.build | 3 +- > lib/librte_lpm/meson.build | 2 +- > lib/librte_regexdev/meson.build | 2 +- > lib/librte_ring/meson.build | 4 +- > lib/librte_stack/meson.build | 4 +- > lib/librte_table/meson.build | 7 +- > lib/meson.build | 3 + > meson.build | 6 + > meson_options.txt | 2 + > 21 files changed, 112 insertions(+), 280 deletions(-) > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > create mode 100644 buildtools/chkincs/main.c > create mode 100644 buildtools/chkincs/meson.build > delete mode 100755 devtools/check-includes.sh - clang is not happy when enabling the check: $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true $ devtools/test-meson-builds.sh ... [362/464] Compiling C object buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig -I../../dpdk/config -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_ring -I../../dpdk/lib/librte_ring -Ilib/librte_rcu -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf -I../../dpdk/lib/librte_mbuf -Ilib/librte_net -I../../dpdk/lib/librte_net -Ilib/librte_meter -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash -I../../dpdk/lib/librte_hash -Ilib/librte_timer -I../../dpdk/lib/librte_timer -Ilib/librte_acl -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor -I../../dpdk/lib/librte_distributor -Ilib/librte_efd -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro -I../../dpdk/lib/librte_gro -Ilib/librte_gso -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm -I../../dpdk/lib/librte_lpm -Ilib/librte_member -I../../dpdk/lib/librte_member -Ilib/librte_power -I../../dpdk/lib/librte_power -Ilib/librte_pdump -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib -I../../dpdk/lib/librte_rib -Ilib/librte_reorder -I../../dpdk/lib/librte_reorder -Ilib/librte_sched -I../../dpdk/lib/librte_sched -Ilib/librte_security -I../../dpdk/lib/librte_security -Ilib/librte_stack -I../../dpdk/lib/librte_stack -Ilib/librte_vhost -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib -I../../dpdk/lib/librte_fib -Ilib/librte_port -I../../dpdk/lib/librte_port -Ilib/librte_table -I../../dpdk/lib/librte_table -Ilib/librte_pipeline -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf -I../../dpdk/lib/librte_bpf -Ilib/librte_graph -I../../dpdk/lib/librte_graph -Ilib/librte_node -I../../dpdk/lib/librte_node -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-missing-field-initializers -D_GNU_SOURCE -march=native -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: In file included from /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown attribute 'error' ignored [-Werror,-Wunknown-attributes] __rte_internal ^ ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded from macro '__rte_internal' __attribute__((error("Symbol is not public ABI"), \ ^ - Other issues with ARM builds (arch-specific headers probably the reason): $ meson configure $HOME/builds/build-arm64-bluefield -Dcheck_includes=true $ devtools/test-meson-builds.sh ... In file included from buildtools/chkincs/chkincs.p/rte_rib6.c:1: /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h: In function ‘get_msk_part’: /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:112:10: error: implicit declaration of function ‘RTE_MIN’; did you mean ‘INT8_MIN’? [-Werror=implicit-function-declaration] depth = RTE_MIN(depth, 128); ^~~~~~~ INT8_MIN /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:112:10: error: nested extern declaration of ‘RTE_MIN’ [-Werror=nested-externs] /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:113:9: error: implicit declaration of function ‘RTE_MAX’; did you mean ‘INT8_MAX’? [-Werror=implicit-function-declaration] part = RTE_MAX((int16_t)depth - (byte * 8), 0); ^~~~~~~ INT8_MAX /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:113:9: error: nested extern declaration of ‘RTE_MAX’ [-Werror=nested-externs] cc1: all warnings being treated as errors - This check should be enabled for x86 and aarch cross build in GHA. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-25 15:51 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes David Marchand @ 2021-01-25 18:17 ` Bruce Richardson 2021-01-26 11:15 ` Bruce Richardson 1 sibling, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-25 18:17 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Mon, Jan 25, 2021 at 04:51:19PM +0100, David Marchand wrote: > On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > As a general principle, each header file should include any other > > headers it needs to provide data type definitions or macros. For > > example, any header using the uintX_t types in structures or function > > prototypes should include "stdint.h" to provide those type definitions. > > > > In practice, while many, but not all, headers in DPDK did include all > > necessary headers, it was never actually checked that each header could > > be included in a C file and compiled without having any compiler errors > > about missing definitions. The script "check-includes.sh" could be used > > for this job, but it was not called out in the documentation, so many > > contributors may not have been aware of it's existance. It also was > > difficult to run from a source-code directory, as the script did not > > automatically allow finding of headers from one DPDK library directory > > to another [this was probably based on running it on a build created by > > the "make" build system, where all headers were in a single directory]. > > To attempt to have a build-system integrated replacement, this patchset > > adds a "chkincs" app in the buildtools directory to verify this on an > > ongoing basis. > > > > This chkincs app does nothing when run, and is not installed as part of > > a DPDK "ninja install", it's for build-time checking only. Its source > > code consists of one C file per public DPDK header, where that C file > > contains nothing except an include for that header. Therefore, if any > > header is added to the lib folder which fails to compile when included > > alone, the build of chkincs will fail with a suitable error message. > > Since this compile checking is not needed on most builds of DPDK, the > > building of chkincs is disabled by default, but can be enabled by the > > "test_includes" meson option. To catch errors with patch submissions, > > the final patch of this series enables it for a single build in > > test-meson-builds script. > > > > Future work could involve doing similar checks on headers for C++ > > compatibility, which was something done by the check-includes.sh script > > but which is missing here.. > > > > V3: > > * Shrunk patchset as most header fixes already applied > > * Moved chkincs from "apps" to the "buildtools" directory, which is a > > better location for something not for installation for end-user use. > > * Added patch to drop check-includes script. > > > > V2: > > * Add maintainers file entry for new app > > * Drop patch for c11 ring header > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > Bruce Richardson (4): > > eal: add missing include to mcslock > > build: separate out headers for include checking > > buildtools/chkincs: add app to verify header includes > > devtools: remove check-includes script > > > > MAINTAINERS | 5 +- > > buildtools/chkincs/gen_c_file_for_header.py | 12 + > > buildtools/chkincs/main.c | 4 + > > buildtools/chkincs/meson.build | 40 +++ > > devtools/check-includes.sh | 259 ------------------- > > devtools/test-meson-builds.sh | 2 +- > > doc/guides/contributing/coding_style.rst | 12 + > > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > > lib/librte_eal/include/meson.build | 2 +- > > lib/librte_eal/x86/include/meson.build | 14 +- > > lib/librte_ethdev/meson.build | 4 +- > > lib/librte_hash/meson.build | 4 +- > > lib/librte_ipsec/meson.build | 3 +- > > lib/librte_lpm/meson.build | 2 +- > > lib/librte_regexdev/meson.build | 2 +- > > lib/librte_ring/meson.build | 4 +- > > lib/librte_stack/meson.build | 4 +- > > lib/librte_table/meson.build | 7 +- > > lib/meson.build | 3 + > > meson.build | 6 + > > meson_options.txt | 2 + > > 21 files changed, 112 insertions(+), 280 deletions(-) > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > create mode 100644 buildtools/chkincs/main.c > > create mode 100644 buildtools/chkincs/meson.build > > delete mode 100755 devtools/check-includes.sh > > - clang is not happy when enabling the check: > $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true > $ devtools/test-meson-builds.sh > ... > [362/464] Compiling C object > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > -I../../dpdk/config -Ilib/librte_eal/include > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > -I../../dpdk/lib/librte_net -Ilib/librte_meter > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > -I../../dpdk/lib/librte_member -Ilib/librte_power > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > -I../../dpdk/lib/librte_sched -Ilib/librte_security > -I../../dpdk/lib/librte_security -Ilib/librte_stack > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > -I../../dpdk/lib/librte_fib -Ilib/librte_port > -I../../dpdk/lib/librte_port -Ilib/librte_table > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > -I../../dpdk/lib/librte_graph -Ilib/librte_node > -I../../dpdk/lib/librte_node > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > -Wwrite-strings -Wno-address-of-packed-member > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c > buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: > In file included from > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown > attribute 'error' ignored [-Werror,-Wunknown-attributes] > __rte_internal > ^ > ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded > from macro '__rte_internal' > __attribute__((error("Symbol is not public ABI"), \ > ^ > > > - Other issues with ARM builds (arch-specific headers probably the reason): > $ meson configure $HOME/builds/build-arm64-bluefield -Dcheck_includes=true > $ devtools/test-meson-builds.sh > ... > In file included from buildtools/chkincs/chkincs.p/rte_rib6.c:1: > /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h: In function ‘get_msk_part’: > /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:112:10: error: implicit > declaration of function ‘RTE_MIN’; did you mean ‘INT8_MIN’? > [-Werror=implicit-function-declaration] > depth = RTE_MIN(depth, 128); > ^~~~~~~ > INT8_MIN > /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:112:10: error: nested > extern declaration of ‘RTE_MIN’ [-Werror=nested-externs] > /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:113:9: error: implicit > declaration of function ‘RTE_MAX’; did you mean ‘INT8_MAX’? > [-Werror=implicit-function-declaration] > part = RTE_MAX((int16_t)depth - (byte * 8), 0); > ^~~~~~~ > INT8_MAX > /home/dmarchan/dpdk/lib/librte_rib/rte_rib6.h:113:9: error: nested > extern declaration of ‘RTE_MAX’ [-Werror=nested-externs] > cc1: all warnings being treated as errors > > > - This check should be enabled for x86 and aarch cross build in GHA. > Sure, will look into all of these. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-25 15:51 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes David Marchand 2021-01-25 18:17 ` Bruce Richardson @ 2021-01-26 11:15 ` Bruce Richardson 2021-01-26 14:04 ` David Marchand 1 sibling, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 11:15 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Mon, Jan 25, 2021 at 04:51:19PM +0100, David Marchand wrote: > On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > As a general principle, each header file should include any other > > headers it needs to provide data type definitions or macros. For > > example, any header using the uintX_t types in structures or function > > prototypes should include "stdint.h" to provide those type definitions. > > > > In practice, while many, but not all, headers in DPDK did include all > > necessary headers, it was never actually checked that each header could > > be included in a C file and compiled without having any compiler errors > > about missing definitions. The script "check-includes.sh" could be used > > for this job, but it was not called out in the documentation, so many > > contributors may not have been aware of it's existance. It also was > > difficult to run from a source-code directory, as the script did not > > automatically allow finding of headers from one DPDK library directory > > to another [this was probably based on running it on a build created by > > the "make" build system, where all headers were in a single directory]. > > To attempt to have a build-system integrated replacement, this patchset > > adds a "chkincs" app in the buildtools directory to verify this on an > > ongoing basis. > > > > This chkincs app does nothing when run, and is not installed as part of > > a DPDK "ninja install", it's for build-time checking only. Its source > > code consists of one C file per public DPDK header, where that C file > > contains nothing except an include for that header. Therefore, if any > > header is added to the lib folder which fails to compile when included > > alone, the build of chkincs will fail with a suitable error message. > > Since this compile checking is not needed on most builds of DPDK, the > > building of chkincs is disabled by default, but can be enabled by the > > "test_includes" meson option. To catch errors with patch submissions, > > the final patch of this series enables it for a single build in > > test-meson-builds script. > > > > Future work could involve doing similar checks on headers for C++ > > compatibility, which was something done by the check-includes.sh script > > but which is missing here.. > > > > V3: > > * Shrunk patchset as most header fixes already applied > > * Moved chkincs from "apps" to the "buildtools" directory, which is a > > better location for something not for installation for end-user use. > > * Added patch to drop check-includes script. > > > > V2: > > * Add maintainers file entry for new app > > * Drop patch for c11 ring header > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > Bruce Richardson (4): > > eal: add missing include to mcslock > > build: separate out headers for include checking > > buildtools/chkincs: add app to verify header includes > > devtools: remove check-includes script > > > > MAINTAINERS | 5 +- > > buildtools/chkincs/gen_c_file_for_header.py | 12 + > > buildtools/chkincs/main.c | 4 + > > buildtools/chkincs/meson.build | 40 +++ > > devtools/check-includes.sh | 259 ------------------- > > devtools/test-meson-builds.sh | 2 +- > > doc/guides/contributing/coding_style.rst | 12 + > > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > > lib/librte_eal/include/meson.build | 2 +- > > lib/librte_eal/x86/include/meson.build | 14 +- > > lib/librte_ethdev/meson.build | 4 +- > > lib/librte_hash/meson.build | 4 +- > > lib/librte_ipsec/meson.build | 3 +- > > lib/librte_lpm/meson.build | 2 +- > > lib/librte_regexdev/meson.build | 2 +- > > lib/librte_ring/meson.build | 4 +- > > lib/librte_stack/meson.build | 4 +- > > lib/librte_table/meson.build | 7 +- > > lib/meson.build | 3 + > > meson.build | 6 + > > meson_options.txt | 2 + > > 21 files changed, 112 insertions(+), 280 deletions(-) > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > create mode 100644 buildtools/chkincs/main.c > > create mode 100644 buildtools/chkincs/meson.build > > delete mode 100755 devtools/check-includes.sh > > - clang is not happy when enabling the check: > $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true > $ devtools/test-meson-builds.sh > ... > [362/464] Compiling C object > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > -I../../dpdk/config -Ilib/librte_eal/include > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > -I../../dpdk/lib/librte_net -Ilib/librte_meter > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > -I../../dpdk/lib/librte_member -Ilib/librte_power > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > -I../../dpdk/lib/librte_sched -Ilib/librte_security > -I../../dpdk/lib/librte_security -Ilib/librte_stack > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > -I../../dpdk/lib/librte_fib -Ilib/librte_port > -I../../dpdk/lib/librte_port -Ilib/librte_table > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > -I../../dpdk/lib/librte_graph -Ilib/librte_node > -I../../dpdk/lib/librte_node > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > -Wwrite-strings -Wno-address-of-packed-member > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c > buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: > In file included from > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown > attribute 'error' ignored [-Werror,-Wunknown-attributes] > __rte_internal > ^ > ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded > from macro '__rte_internal' > __attribute__((error("Symbol is not public ABI"), \ > ^ > This looks to be a real issue with our header file - clang does not have an "error" attribute. The closest equivalent I can see is "diagnose_if". Therefore, I'd suggest we need to change compat.h to be something like: #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ #define __rte_internal \ __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ section(".text.internal"))) #else #define __rte_internal \ __attribute__((section(".text.internal"))) #endif Any thoughts or suggestions for better alternatives here? /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 11:15 ` Bruce Richardson @ 2021-01-26 14:04 ` David Marchand 2021-01-26 14:24 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-26 14:04 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Tue, Jan 26, 2021 at 12:15 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > On Mon, Jan 25, 2021 at 04:51:19PM +0100, David Marchand wrote: > > On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson > > <bruce.richardson@intel.com> wrote: > > > > > > As a general principle, each header file should include any other > > > headers it needs to provide data type definitions or macros. For > > > example, any header using the uintX_t types in structures or function > > > prototypes should include "stdint.h" to provide those type definitions. > > > > > > In practice, while many, but not all, headers in DPDK did include all > > > necessary headers, it was never actually checked that each header could > > > be included in a C file and compiled without having any compiler errors > > > about missing definitions. The script "check-includes.sh" could be used > > > for this job, but it was not called out in the documentation, so many > > > contributors may not have been aware of it's existance. It also was > > > difficult to run from a source-code directory, as the script did not > > > automatically allow finding of headers from one DPDK library directory > > > to another [this was probably based on running it on a build created by > > > the "make" build system, where all headers were in a single directory]. > > > To attempt to have a build-system integrated replacement, this patchset > > > adds a "chkincs" app in the buildtools directory to verify this on an > > > ongoing basis. > > > > > > This chkincs app does nothing when run, and is not installed as part of > > > a DPDK "ninja install", it's for build-time checking only. Its source > > > code consists of one C file per public DPDK header, where that C file > > > contains nothing except an include for that header. Therefore, if any > > > header is added to the lib folder which fails to compile when included > > > alone, the build of chkincs will fail with a suitable error message. > > > Since this compile checking is not needed on most builds of DPDK, the > > > building of chkincs is disabled by default, but can be enabled by the > > > "test_includes" meson option. To catch errors with patch submissions, > > > the final patch of this series enables it for a single build in > > > test-meson-builds script. > > > > > > Future work could involve doing similar checks on headers for C++ > > > compatibility, which was something done by the check-includes.sh script > > > but which is missing here.. > > > > > > V3: > > > * Shrunk patchset as most header fixes already applied > > > * Moved chkincs from "apps" to the "buildtools" directory, which is a > > > better location for something not for installation for end-user use. > > > * Added patch to drop check-includes script. > > > > > > V2: > > > * Add maintainers file entry for new app > > > * Drop patch for c11 ring header > > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > > > Bruce Richardson (4): > > > eal: add missing include to mcslock > > > build: separate out headers for include checking > > > buildtools/chkincs: add app to verify header includes > > > devtools: remove check-includes script > > > > > > MAINTAINERS | 5 +- > > > buildtools/chkincs/gen_c_file_for_header.py | 12 + > > > buildtools/chkincs/main.c | 4 + > > > buildtools/chkincs/meson.build | 40 +++ > > > devtools/check-includes.sh | 259 ------------------- > > > devtools/test-meson-builds.sh | 2 +- > > > doc/guides/contributing/coding_style.rst | 12 + > > > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > > > lib/librte_eal/include/meson.build | 2 +- > > > lib/librte_eal/x86/include/meson.build | 14 +- > > > lib/librte_ethdev/meson.build | 4 +- > > > lib/librte_hash/meson.build | 4 +- > > > lib/librte_ipsec/meson.build | 3 +- > > > lib/librte_lpm/meson.build | 2 +- > > > lib/librte_regexdev/meson.build | 2 +- > > > lib/librte_ring/meson.build | 4 +- > > > lib/librte_stack/meson.build | 4 +- > > > lib/librte_table/meson.build | 7 +- > > > lib/meson.build | 3 + > > > meson.build | 6 + > > > meson_options.txt | 2 + > > > 21 files changed, 112 insertions(+), 280 deletions(-) > > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > > create mode 100644 buildtools/chkincs/main.c > > > create mode 100644 buildtools/chkincs/meson.build > > > delete mode 100755 devtools/check-includes.sh > > > > - clang is not happy when enabling the check: > > $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true > > $ devtools/test-meson-builds.sh > > ... > > [362/464] Compiling C object > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > > -I../../dpdk/config -Ilib/librte_eal/include > > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > > -I../../dpdk/lib/librte_net -Ilib/librte_meter > > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > > -I../../dpdk/lib/librte_member -Ilib/librte_power > > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > > -I../../dpdk/lib/librte_sched -Ilib/librte_security > > -I../../dpdk/lib/librte_security -Ilib/librte_stack > > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > > -I../../dpdk/lib/librte_fib -Ilib/librte_port > > -I../../dpdk/lib/librte_port -Ilib/librte_table > > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > > -I../../dpdk/lib/librte_graph -Ilib/librte_node > > -I../../dpdk/lib/librte_node > > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > > -Wwrite-strings -Wno-address-of-packed-member > > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c > > buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c > > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: > > In file included from > > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: > > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown > > attribute 'error' ignored [-Werror,-Wunknown-attributes] > > __rte_internal > > ^ > > ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded > > from macro '__rte_internal' > > __attribute__((error("Symbol is not public ABI"), \ > > ^ > > > > This looks to be a real issue with our header file - clang does not have an > "error" attribute. The closest equivalent I can see is "diagnose_if". Indeed, it does trigger a build error, so it works as expected ;-). On the header check itself, even if we find a way to properly tag those symbols with the macro in rte_compat.h, the next issue is that clang complains about such marked symbols without the ALLOW_INTERNAL_API build flag. FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig -I../../dpdk/config -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_ring -I../../dpdk/lib/librte_ring -Ilib/librte_rcu -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf -I../../dpdk/lib/librte_mbuf -Ilib/librte_net -I../../dpdk/lib/librte_net -Ilib/librte_meter -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash -I../../dpdk/lib/librte_hash -Ilib/librte_timer -I../../dpdk/lib/librte_timer -Ilib/librte_acl -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor -I../../dpdk/lib/librte_distributor -Ilib/librte_efd -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro -I../../dpdk/lib/librte_gro -Ilib/librte_gso -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm -I../../dpdk/lib/librte_lpm -Ilib/librte_member -I../../dpdk/lib/librte_member -Ilib/librte_power -I../../dpdk/lib/librte_power -Ilib/librte_pdump -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib -I../../dpdk/lib/librte_rib -Ilib/librte_reorder -I../../dpdk/lib/librte_reorder -Ilib/librte_sched -I../../dpdk/lib/librte_sched -Ilib/librte_security -I../../dpdk/lib/librte_security -Ilib/librte_stack -I../../dpdk/lib/librte_stack -Ilib/librte_vhost -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib -I../../dpdk/lib/librte_fib -Ilib/librte_port -I../../dpdk/lib/librte_port -Ilib/librte_table -I../../dpdk/lib/librte_table -Ilib/librte_pipeline -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf -I../../dpdk/lib/librte_bpf -Ilib/librte_graph -I../../dpdk/lib/librte_graph -Ilib/librte_node -I../../dpdk/lib/librte_node -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-missing-field-initializers -D_GNU_SOURCE -march=native -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -MF buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o.d -o buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -c buildtools/chkincs/chkincs.p/rte_ethdev_pci.c In file included from buildtools/chkincs/chkincs.p/rte_ethdev_pci.c:1: /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_pci.h:86:13: error: Symbol is not public ABI eth_dev = rte_eth_dev_allocate(name); ^ ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:1003:1: note: from 'diagnose_if' attribute on 'rte_eth_dev_allocate': __rte_internal ^~~~~~~~~~~~~~ ../../dpdk/lib/librte_eal/include/rte_compat.h:30:16: note: expanded from macro '__rte_internal' __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ ^ ~ [...] gcc seems more lenient about this. > Therefore, I'd suggest we need to change compat.h to be something like: > > #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > > #define __rte_internal \ > __attribute__((error("Symbol is not public ABI"), \ > section(".text.internal"))) > > #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ > > #define __rte_internal \ > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > section(".text.internal"))) > > #else > > #define __rte_internal \ > __attribute__((section(".text.internal"))) > > #endif > > Any thoughts or suggestions for better alternatives here? I'd rather leave a build error on an unknown attribute than silence this check (which happens in your snippet, where it falls back to the #else part). Did you consider the deprecated() like for the experimental tag? -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 14:04 ` David Marchand @ 2021-01-26 14:24 ` Bruce Richardson 2021-01-26 14:39 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:24 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Tue, Jan 26, 2021 at 03:04:25PM +0100, David Marchand wrote: > On Tue, Jan 26, 2021 at 12:15 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > On Mon, Jan 25, 2021 at 04:51:19PM +0100, David Marchand wrote: > > > On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson > > > <bruce.richardson@intel.com> wrote: > > > > > > > > As a general principle, each header file should include any other > > > > headers it needs to provide data type definitions or macros. For > > > > example, any header using the uintX_t types in structures or function > > > > prototypes should include "stdint.h" to provide those type definitions. > > > > > > > > In practice, while many, but not all, headers in DPDK did include all > > > > necessary headers, it was never actually checked that each header could > > > > be included in a C file and compiled without having any compiler errors > > > > about missing definitions. The script "check-includes.sh" could be used > > > > for this job, but it was not called out in the documentation, so many > > > > contributors may not have been aware of it's existance. It also was > > > > difficult to run from a source-code directory, as the script did not > > > > automatically allow finding of headers from one DPDK library directory > > > > to another [this was probably based on running it on a build created by > > > > the "make" build system, where all headers were in a single directory]. > > > > To attempt to have a build-system integrated replacement, this patchset > > > > adds a "chkincs" app in the buildtools directory to verify this on an > > > > ongoing basis. > > > > > > > > This chkincs app does nothing when run, and is not installed as part of > > > > a DPDK "ninja install", it's for build-time checking only. Its source > > > > code consists of one C file per public DPDK header, where that C file > > > > contains nothing except an include for that header. Therefore, if any > > > > header is added to the lib folder which fails to compile when included > > > > alone, the build of chkincs will fail with a suitable error message. > > > > Since this compile checking is not needed on most builds of DPDK, the > > > > building of chkincs is disabled by default, but can be enabled by the > > > > "test_includes" meson option. To catch errors with patch submissions, > > > > the final patch of this series enables it for a single build in > > > > test-meson-builds script. > > > > > > > > Future work could involve doing similar checks on headers for C++ > > > > compatibility, which was something done by the check-includes.sh script > > > > but which is missing here.. > > > > > > > > V3: > > > > * Shrunk patchset as most header fixes already applied > > > > * Moved chkincs from "apps" to the "buildtools" directory, which is a > > > > better location for something not for installation for end-user use. > > > > * Added patch to drop check-includes script. > > > > > > > > V2: > > > > * Add maintainers file entry for new app > > > > * Drop patch for c11 ring header > > > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > > > > > Bruce Richardson (4): > > > > eal: add missing include to mcslock > > > > build: separate out headers for include checking > > > > buildtools/chkincs: add app to verify header includes > > > > devtools: remove check-includes script > > > > > > > > MAINTAINERS | 5 +- > > > > buildtools/chkincs/gen_c_file_for_header.py | 12 + > > > > buildtools/chkincs/main.c | 4 + > > > > buildtools/chkincs/meson.build | 40 +++ > > > > devtools/check-includes.sh | 259 ------------------- > > > > devtools/test-meson-builds.sh | 2 +- > > > > doc/guides/contributing/coding_style.rst | 12 + > > > > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > > > > lib/librte_eal/include/meson.build | 2 +- > > > > lib/librte_eal/x86/include/meson.build | 14 +- > > > > lib/librte_ethdev/meson.build | 4 +- > > > > lib/librte_hash/meson.build | 4 +- > > > > lib/librte_ipsec/meson.build | 3 +- > > > > lib/librte_lpm/meson.build | 2 +- > > > > lib/librte_regexdev/meson.build | 2 +- > > > > lib/librte_ring/meson.build | 4 +- > > > > lib/librte_stack/meson.build | 4 +- > > > > lib/librte_table/meson.build | 7 +- > > > > lib/meson.build | 3 + > > > > meson.build | 6 + > > > > meson_options.txt | 2 + > > > > 21 files changed, 112 insertions(+), 280 deletions(-) > > > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > > > create mode 100644 buildtools/chkincs/main.c > > > > create mode 100644 buildtools/chkincs/meson.build > > > > delete mode 100755 devtools/check-includes.sh > > > > > > - clang is not happy when enabling the check: > > > $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true > > > $ devtools/test-meson-builds.sh > > > ... > > > [362/464] Compiling C object > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > > > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > > > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > > > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > > > -I../../dpdk/config -Ilib/librte_eal/include > > > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > > > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > > > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > > > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > > > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > > > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > > > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > > > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > > > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > > > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > > > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > > > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > > > -I../../dpdk/lib/librte_net -Ilib/librte_meter > > > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > > > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > > > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > > > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > > > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > > > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > > > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > > > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > > > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > > > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > > > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > > > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > > > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > > > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > > > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > > > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > > > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > > > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > > > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > > > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > > > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > > > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > > > -I../../dpdk/lib/librte_member -Ilib/librte_power > > > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > > > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > > > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > > > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > > > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > > > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > > > -I../../dpdk/lib/librte_sched -Ilib/librte_security > > > -I../../dpdk/lib/librte_security -Ilib/librte_stack > > > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > > > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > > > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > > > -I../../dpdk/lib/librte_fib -Ilib/librte_port > > > -I../../dpdk/lib/librte_port -Ilib/librte_table > > > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > > > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > > > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > > > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > > > -I../../dpdk/lib/librte_graph -Ilib/librte_node > > > -I../../dpdk/lib/librte_node > > > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > > > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > > > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > > > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > > > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > > > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > > > -Wwrite-strings -Wno-address-of-packed-member > > > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > > > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c > > > buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c > > > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: > > > In file included from > > > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: > > > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown > > > attribute 'error' ignored [-Werror,-Wunknown-attributes] > > > __rte_internal > > > ^ > > > ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded > > > from macro '__rte_internal' > > > __attribute__((error("Symbol is not public ABI"), \ > > > ^ > > > > > > > This looks to be a real issue with our header file - clang does not have an > > "error" attribute. The closest equivalent I can see is "diagnose_if". > > Indeed, it does trigger a build error, so it works as expected ;-). > > > On the header check itself, even if we find a way to properly tag > those symbols with the macro in rte_compat.h, the next issue is that > clang complains about such marked symbols without the > ALLOW_INTERNAL_API build flag. > > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > -I../../dpdk/config -Ilib/librte_eal/include > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > -I../../dpdk/lib/librte_net -Ilib/librte_meter > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > -I../../dpdk/lib/librte_member -Ilib/librte_power > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > -I../../dpdk/lib/librte_sched -Ilib/librte_security > -I../../dpdk/lib/librte_security -Ilib/librte_stack > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > -I../../dpdk/lib/librte_fib -Ilib/librte_port > -I../../dpdk/lib/librte_port -Ilib/librte_table > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > -I../../dpdk/lib/librte_graph -Ilib/librte_node > -I../../dpdk/lib/librte_node > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > -Wwrite-strings -Wno-address-of-packed-member > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -MF > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o.d -o > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -c > buildtools/chkincs/chkincs.p/rte_ethdev_pci.c > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_pci.c:1: > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_pci.h:86:13: error: > Symbol is not public ABI > eth_dev = rte_eth_dev_allocate(name); > ^ > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:1003:1: note: from > 'diagnose_if' attribute on 'rte_eth_dev_allocate': > __rte_internal > ^~~~~~~~~~~~~~ > ../../dpdk/lib/librte_eal/include/rte_compat.h:30:16: note: expanded > from macro '__rte_internal' > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > ^ ~ > [...] > > > gcc seems more lenient about this. > > > > > Therefore, I'd suggest we need to change compat.h to be something like: > > > > #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > > > > #define __rte_internal \ > > __attribute__((error("Symbol is not public ABI"), \ > > section(".text.internal"))) > > > > #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ > > > > #define __rte_internal \ > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > section(".text.internal"))) > > > > #else > > > > #define __rte_internal \ > > __attribute__((section(".text.internal"))) > > > > #endif > > > > Any thoughts or suggestions for better alternatives here? > > I'd rather leave a build error on an unknown attribute than silence > this check (which happens in your snippet, where it falls back to the > #else part). > > Did you consider the deprecated() like for the experimental tag? > I've added the ALLOW_INTERNAL_API define to the build of these headers in v4. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 14:24 ` Bruce Richardson @ 2021-01-26 14:39 ` Bruce Richardson 2021-01-26 15:31 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:39 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon, ferruh.yigit On Tue, Jan 26, 2021 at 02:24:02PM +0000, Bruce Richardson wrote: > On Tue, Jan 26, 2021 at 03:04:25PM +0100, David Marchand wrote: > > On Tue, Jan 26, 2021 at 12:15 PM Bruce Richardson > > <bruce.richardson@intel.com> wrote: > > > > > > On Mon, Jan 25, 2021 at 04:51:19PM +0100, David Marchand wrote: > > > > On Mon, Jan 25, 2021 at 3:11 PM Bruce Richardson > > > > <bruce.richardson@intel.com> wrote: > > > > > > > > > > As a general principle, each header file should include any other > > > > > headers it needs to provide data type definitions or macros. For > > > > > example, any header using the uintX_t types in structures or function > > > > > prototypes should include "stdint.h" to provide those type definitions. > > > > > > > > > > In practice, while many, but not all, headers in DPDK did include all > > > > > necessary headers, it was never actually checked that each header could > > > > > be included in a C file and compiled without having any compiler errors > > > > > about missing definitions. The script "check-includes.sh" could be used > > > > > for this job, but it was not called out in the documentation, so many > > > > > contributors may not have been aware of it's existance. It also was > > > > > difficult to run from a source-code directory, as the script did not > > > > > automatically allow finding of headers from one DPDK library directory > > > > > to another [this was probably based on running it on a build created by > > > > > the "make" build system, where all headers were in a single directory]. > > > > > To attempt to have a build-system integrated replacement, this patchset > > > > > adds a "chkincs" app in the buildtools directory to verify this on an > > > > > ongoing basis. > > > > > > > > > > This chkincs app does nothing when run, and is not installed as part of > > > > > a DPDK "ninja install", it's for build-time checking only. Its source > > > > > code consists of one C file per public DPDK header, where that C file > > > > > contains nothing except an include for that header. Therefore, if any > > > > > header is added to the lib folder which fails to compile when included > > > > > alone, the build of chkincs will fail with a suitable error message. > > > > > Since this compile checking is not needed on most builds of DPDK, the > > > > > building of chkincs is disabled by default, but can be enabled by the > > > > > "test_includes" meson option. To catch errors with patch submissions, > > > > > the final patch of this series enables it for a single build in > > > > > test-meson-builds script. > > > > > > > > > > Future work could involve doing similar checks on headers for C++ > > > > > compatibility, which was something done by the check-includes.sh script > > > > > but which is missing here.. > > > > > > > > > > V3: > > > > > * Shrunk patchset as most header fixes already applied > > > > > * Moved chkincs from "apps" to the "buildtools" directory, which is a > > > > > better location for something not for installation for end-user use. > > > > > * Added patch to drop check-includes script. > > > > > > > > > > V2: > > > > > * Add maintainers file entry for new app > > > > > * Drop patch for c11 ring header > > > > > * Use build variable "headers_no_chkincs" for tracking exceptions > > > > > > > > > > Bruce Richardson (4): > > > > > eal: add missing include to mcslock > > > > > build: separate out headers for include checking > > > > > buildtools/chkincs: add app to verify header includes > > > > > devtools: remove check-includes script > > > > > > > > > > MAINTAINERS | 5 +- > > > > > buildtools/chkincs/gen_c_file_for_header.py | 12 + > > > > > buildtools/chkincs/main.c | 4 + > > > > > buildtools/chkincs/meson.build | 40 +++ > > > > > devtools/check-includes.sh | 259 ------------------- > > > > > devtools/test-meson-builds.sh | 2 +- > > > > > doc/guides/contributing/coding_style.rst | 12 + > > > > > lib/librte_eal/include/generic/rte_mcslock.h | 1 + > > > > > lib/librte_eal/include/meson.build | 2 +- > > > > > lib/librte_eal/x86/include/meson.build | 14 +- > > > > > lib/librte_ethdev/meson.build | 4 +- > > > > > lib/librte_hash/meson.build | 4 +- > > > > > lib/librte_ipsec/meson.build | 3 +- > > > > > lib/librte_lpm/meson.build | 2 +- > > > > > lib/librte_regexdev/meson.build | 2 +- > > > > > lib/librte_ring/meson.build | 4 +- > > > > > lib/librte_stack/meson.build | 4 +- > > > > > lib/librte_table/meson.build | 7 +- > > > > > lib/meson.build | 3 + > > > > > meson.build | 6 + > > > > > meson_options.txt | 2 + > > > > > 21 files changed, 112 insertions(+), 280 deletions(-) > > > > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > > > > create mode 100644 buildtools/chkincs/main.c > > > > > create mode 100644 buildtools/chkincs/meson.build > > > > > delete mode 100755 devtools/check-includes.sh > > > > > > > > - clang is not happy when enabling the check: > > > > $ meson configure $HOME/builds/build-clang-static -Dcheck_includes=true > > > > $ devtools/test-meson-builds.sh > > > > ... > > > > [362/464] Compiling C object > > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > > > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o > > > > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > > > > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > > > > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > > > > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > > > > -I../../dpdk/config -Ilib/librte_eal/include > > > > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > > > > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > > > > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > > > > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > > > > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > > > > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > > > > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > > > > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > > > > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > > > > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > > > > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > > > > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > > > > -I../../dpdk/lib/librte_net -Ilib/librte_meter > > > > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > > > > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > > > > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > > > > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > > > > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > > > > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > > > > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > > > > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > > > > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > > > > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > > > > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > > > > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > > > > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > > > > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > > > > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > > > > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > > > > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > > > > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > > > > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > > > > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > > > > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > > > > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > > > > -I../../dpdk/lib/librte_member -Ilib/librte_power > > > > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > > > > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > > > > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > > > > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > > > > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > > > > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > > > > -I../../dpdk/lib/librte_sched -Ilib/librte_security > > > > -I../../dpdk/lib/librte_security -Ilib/librte_stack > > > > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > > > > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > > > > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > > > > -I../../dpdk/lib/librte_fib -Ilib/librte_port > > > > -I../../dpdk/lib/librte_port -Ilib/librte_table > > > > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > > > > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > > > > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > > > > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > > > > -I../../dpdk/lib/librte_graph -Ilib/librte_node > > > > -I../../dpdk/lib/librte_node > > > > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > > > > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > > > > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > > > > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > > > > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > > > > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > > > > -Wwrite-strings -Wno-address-of-packed-member > > > > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > > > > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -MF > > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o.d -o > > > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_vdev.c.o -c > > > > buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c > > > > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_vdev.c:1: > > > > In file included from > > > > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_vdev.h:12: > > > > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:964:1: error: unknown > > > > attribute 'error' ignored [-Werror,-Wunknown-attributes] > > > > __rte_internal > > > > ^ > > > > ../../dpdk/lib/librte_eal/include/rte_compat.h:25:16: note: expanded > > > > from macro '__rte_internal' > > > > __attribute__((error("Symbol is not public ABI"), \ > > > > ^ > > > > > > > > > > This looks to be a real issue with our header file - clang does not have an > > > "error" attribute. The closest equivalent I can see is "diagnose_if". > > > > Indeed, it does trigger a build error, so it works as expected ;-). > > > > > > On the header check itself, even if we find a way to properly tag > > those symbols with the macro in rte_compat.h, the next issue is that > > clang complains about such marked symbols without the > > ALLOW_INTERNAL_API build flag. > > > > FAILED: buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o > > clang -Ibuildtools/chkincs/chkincs.p -Ibuildtools/chkincs > > -I../../dpdk/buildtools/chkincs -Idrivers/bus/pci > > -I../../dpdk/drivers/bus/pci -Idrivers/bus/vdev > > -I../../dpdk/drivers/bus/vdev -I. -I../../dpdk -Iconfig > > -I../../dpdk/config -Ilib/librte_eal/include > > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > > -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include > > -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_kvargs > > -I../../dpdk/lib/librte_kvargs -Ilib/librte_metrics > > -I../../dpdk/lib/librte_metrics -Ilib/librte_telemetry > > -I../../dpdk/lib/librte_telemetry -Ilib/librte_eal/common > > -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal > > -I../../dpdk/lib/librte_eal -Ilib/librte_ring > > -I../../dpdk/lib/librte_ring -Ilib/librte_rcu > > -I../../dpdk/lib/librte_rcu -Ilib/librte_mempool > > -I../../dpdk/lib/librte_mempool -Ilib/librte_mbuf > > -I../../dpdk/lib/librte_mbuf -Ilib/librte_net > > -I../../dpdk/lib/librte_net -Ilib/librte_meter > > -I../../dpdk/lib/librte_meter -Ilib/librte_ethdev > > -I../../dpdk/lib/librte_ethdev -Ilib/librte_pci > > -I../../dpdk/lib/librte_pci -Ilib/librte_cmdline > > -I../../dpdk/lib/librte_cmdline -Ilib/librte_hash > > -I../../dpdk/lib/librte_hash -Ilib/librte_timer > > -I../../dpdk/lib/librte_timer -Ilib/librte_acl > > -I../../dpdk/lib/librte_acl -Ilib/librte_bbdev > > -I../../dpdk/lib/librte_bbdev -Ilib/librte_bitratestats > > -I../../dpdk/lib/librte_bitratestats -Ilib/librte_cfgfile > > -I../../dpdk/lib/librte_cfgfile -Ilib/librte_compressdev > > -I../../dpdk/lib/librte_compressdev -Ilib/librte_cryptodev > > -I../../dpdk/lib/librte_cryptodev -Ilib/librte_distributor > > -I../../dpdk/lib/librte_distributor -Ilib/librte_efd > > -I../../dpdk/lib/librte_efd -Ilib/librte_eventdev > > -I../../dpdk/lib/librte_eventdev -Ilib/librte_gro > > -I../../dpdk/lib/librte_gro -Ilib/librte_gso > > -I../../dpdk/lib/librte_gso -Ilib/librte_ip_frag > > -I../../dpdk/lib/librte_ip_frag -Ilib/librte_jobstats > > -I../../dpdk/lib/librte_jobstats -Ilib/librte_kni > > -I../../dpdk/lib/librte_kni -Ilib/librte_latencystats > > -I../../dpdk/lib/librte_latencystats -Ilib/librte_lpm > > -I../../dpdk/lib/librte_lpm -Ilib/librte_member > > -I../../dpdk/lib/librte_member -Ilib/librte_power > > -I../../dpdk/lib/librte_power -Ilib/librte_pdump > > -I../../dpdk/lib/librte_pdump -Ilib/librte_rawdev > > -I../../dpdk/lib/librte_rawdev -Ilib/librte_regexdev > > -I../../dpdk/lib/librte_regexdev -Ilib/librte_rib > > -I../../dpdk/lib/librte_rib -Ilib/librte_reorder > > -I../../dpdk/lib/librte_reorder -Ilib/librte_sched > > -I../../dpdk/lib/librte_sched -Ilib/librte_security > > -I../../dpdk/lib/librte_security -Ilib/librte_stack > > -I../../dpdk/lib/librte_stack -Ilib/librte_vhost > > -I../../dpdk/lib/librte_vhost -Ilib/librte_ipsec > > -I../../dpdk/lib/librte_ipsec -Ilib/librte_fib > > -I../../dpdk/lib/librte_fib -Ilib/librte_port > > -I../../dpdk/lib/librte_port -Ilib/librte_table > > -I../../dpdk/lib/librte_table -Ilib/librte_pipeline > > -I../../dpdk/lib/librte_pipeline -Ilib/librte_flow_classify > > -I../../dpdk/lib/librte_flow_classify -Ilib/librte_bpf > > -I../../dpdk/lib/librte_bpf -Ilib/librte_graph > > -I../../dpdk/lib/librte_graph -Ilib/librte_node > > -I../../dpdk/lib/librte_node > > -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang > > -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > > -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated > > -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations > > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > > -Wwrite-strings -Wno-address-of-packed-member > > -Wno-missing-field-initializers -D_GNU_SOURCE -march=native > > -Wno-unused-function -DALLOW_EXPERIMENTAL_API -MD -MQ > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -MF > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o.d -o > > buildtools/chkincs/chkincs.p/meson-generated_rte_ethdev_pci.c.o -c > > buildtools/chkincs/chkincs.p/rte_ethdev_pci.c > > In file included from buildtools/chkincs/chkincs.p/rte_ethdev_pci.c:1: > > /home/dmarchan/dpdk/lib/librte_ethdev/rte_ethdev_pci.h:86:13: error: > > Symbol is not public ABI > > eth_dev = rte_eth_dev_allocate(name); > > ^ > > ../../dpdk/lib/librte_ethdev/rte_ethdev_driver.h:1003:1: note: from > > 'diagnose_if' attribute on 'rte_eth_dev_allocate': > > __rte_internal > > ^~~~~~~~~~~~~~ > > ../../dpdk/lib/librte_eal/include/rte_compat.h:30:16: note: expanded > > from macro '__rte_internal' > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > ^ ~ > > [...] > > > > > > gcc seems more lenient about this. > > > > > > > > > Therefore, I'd suggest we need to change compat.h to be something like: > > > > > > #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > > > > > > #define __rte_internal \ > > > __attribute__((error("Symbol is not public ABI"), \ > > > section(".text.internal"))) > > > > > > #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ > > > > > > #define __rte_internal \ > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > section(".text.internal"))) > > > > > > #else > > > > > > #define __rte_internal \ > > > __attribute__((section(".text.internal"))) > > > > > > #endif > > > > > > Any thoughts or suggestions for better alternatives here? > > > > I'd rather leave a build error on an unknown attribute than silence > > this check (which happens in your snippet, where it falls back to the > > #else part). > > > > Did you consider the deprecated() like for the experimental tag? > > > > I've added the ALLOW_INTERNAL_API define to the build of these headers in > v4. +Ferruh, Thomas Removing the ALLOW_INTERNAL_API is probably a good idea, but it does indeed throw up the errors with clang - but not gcc, which is strange. The offending headers seem to be (initially): * rte_ethdev_vdev.h * rte_ethdev_pci.h Are these public header files, or should they skip header checking - and installation - as internal-only? /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 14:39 ` Bruce Richardson @ 2021-01-26 15:31 ` Thomas Monjalon 2021-01-26 15:42 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-26 15:31 UTC (permalink / raw) To: David Marchand, Bruce Richardson; +Cc: dev, ferruh.yigit 26/01/2021 15:39, Bruce Richardson: > Removing the ALLOW_INTERNAL_API is probably a good idea, but it does indeed > throw up the errors with clang - but not gcc, which is strange. The > offending headers seem to be (initially): > > * rte_ethdev_vdev.h > * rte_ethdev_pci.h > > Are these public header files, or should they skip header checking - and > installation - as internal-only? They are helpers for the drivers, so should be internal. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 15:31 ` Thomas Monjalon @ 2021-01-26 15:42 ` Bruce Richardson 2021-01-26 15:50 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 15:42 UTC (permalink / raw) To: Thomas Monjalon; +Cc: David Marchand, dev, ferruh.yigit On Tue, Jan 26, 2021 at 04:31:36PM +0100, Thomas Monjalon wrote: > 26/01/2021 15:39, Bruce Richardson: > > Removing the ALLOW_INTERNAL_API is probably a good idea, but it does indeed > > throw up the errors with clang - but not gcc, which is strange. The > > offending headers seem to be (initially): > > > > * rte_ethdev_vdev.h > > * rte_ethdev_pci.h > > > > Are these public header files, or should they skip header checking - and > > installation - as internal-only? > > They are helpers for the drivers, so should be internal. > Just to confirm, by that you mean that they should not be installed for end-application use? In which case, I believe that "rte_ethdev_driver", "rte_ethdev_vdev" and "rte_ethdev_pci" should be removed from the "headers" list in "librte_ethdev/meson.build". Current file list there is: headers = files('rte_ethdev.h', 'rte_ethdev_driver.h', 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', 'rte_ethdev_vdev.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', 'rte_mtr.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') headers_no_chkincs += files('rte_eth_ctrl.h', 'rte_ethdev_core.h') [Note that the "headers_no_chkincs" files still get installed, they just skip header checking as indirect includes.] Anything else that should be removed. Also, tangential to this, it would probably be good if we could come up with a different naming scheme for internal-only headers, to make the difference between what is to be installed or not, a lot clearer! /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] add checking of header includes 2021-01-26 15:42 ` Bruce Richardson @ 2021-01-26 15:50 ` Thomas Monjalon 0 siblings, 0 replies; 165+ messages in thread From: Thomas Monjalon @ 2021-01-26 15:50 UTC (permalink / raw) To: Bruce Richardson; +Cc: David Marchand, dev, ferruh.yigit 26/01/2021 16:42, Bruce Richardson: > On Tue, Jan 26, 2021 at 04:31:36PM +0100, Thomas Monjalon wrote: > > 26/01/2021 15:39, Bruce Richardson: > > > Removing the ALLOW_INTERNAL_API is probably a good idea, but it does indeed > > > throw up the errors with clang - but not gcc, which is strange. The > > > offending headers seem to be (initially): > > > > > > * rte_ethdev_vdev.h > > > * rte_ethdev_pci.h > > > > > > Are these public header files, or should they skip header checking - and > > > installation - as internal-only? > > > > They are helpers for the drivers, so should be internal. > > > Just to confirm, by that you mean that they should not be installed for > end-application use? I think yes they are not needed to be installed. > In which case, I believe that "rte_ethdev_driver", "rte_ethdev_vdev" and > "rte_ethdev_pci" should be removed from the "headers" list in > "librte_ethdev/meson.build". Current file list there is: > > headers = files('rte_ethdev.h', > 'rte_ethdev_driver.h', > 'rte_ethdev_pci.h', > 'rte_ethdev_trace.h', > 'rte_ethdev_trace_fp.h', > 'rte_ethdev_vdev.h', > 'rte_dev_info.h', > 'rte_flow.h', > 'rte_flow_driver.h', > 'rte_mtr.h', > 'rte_mtr_driver.h', > 'rte_tm.h', > 'rte_tm_driver.h') > headers_no_chkincs += files('rte_eth_ctrl.h', > 'rte_ethdev_core.h') > > [Note that the "headers_no_chkincs" files still get installed, they just > skip header checking as indirect includes.] > Anything else that should be removed. > > Also, tangential to this, it would probably be good if we could come up > with a different naming scheme for internal-only headers, to make the > difference between what is to be installed or not, a lot clearer! The difference is supposed to be the rte_ prefix in the file name. Doxygen will parse only these files: FILE_PATTERNS = rte_*.h cmdline.h I agree we should fix the internal filenames and not install them. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 0/7] add checking of header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (21 preceding siblings ...) 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 1/7] eal: add missing include to mcslock Bruce Richardson ` (6 more replies) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (2 subsequent siblings) 25 siblings, 7 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. The script "check-includes.sh" could be used for this job, but it was not called out in the documentation, so many contributors may not have been aware of it's existance. It also was difficult to run from a source-code directory, as the script did not automatically allow finding of headers from one DPDK library directory to another [this was probably based on running it on a build created by the "make" build system, where all headers were in a single directory]. To attempt to have a build-system integrated replacement, this patchset adds a "chkincs" app in the buildtools directory to verify this on an ongoing basis. This chkincs app does nothing when run, and is not installed as part of a DPDK "ninja install", it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, which was something done by the check-includes.sh script but which is missing here. V4: * Fixed build errors with clang and arm builds * Added support for running chkincs as part of github actions CI V3: * Shrunk patchset as most header fixes already applied * Moved chkincs from "apps" to the "buildtools" directory, which is a better location for something not for installation for end-user use. * Added patch to drop check-includes script. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions Bruce Richardson (7): eal: add missing include to mcslock eal: fix error attribute use for clang rib: fix missing header include build: separate out headers for include checking buildtools/chkincs: add app to verify header includes devtools: remove check-includes script ci: add checking of includes to CI builds .ci/linux-build.sh | 1 + MAINTAINERS | 5 +- buildtools/chkincs/gen_c_file_for_header.py | 12 + buildtools/chkincs/main.c | 4 + buildtools/chkincs/meson.build | 41 +++ devtools/check-includes.sh | 259 ------------------- devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 + lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/include/rte_compat.h | 8 +- lib/librte_eal/x86/include/meson.build | 14 +- lib/librte_ethdev/meson.build | 4 +- lib/librte_hash/meson.build | 4 +- lib/librte_ipsec/meson.build | 3 +- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_rib/rte_rib6.h | 1 + lib/librte_ring/meson.build | 4 +- lib/librte_stack/meson.build | 4 +- lib/librte_table/meson.build | 7 +- lib/meson.build | 3 + meson.build | 6 + meson_options.txt | 2 + 24 files changed, 122 insertions(+), 281 deletions(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build delete mode 100755 devtools/check-includes.sh -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 1/7] eal: add missing include to mcslock 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 2/7] eal: fix error attribute use for clang Bruce Richardson ` (5 subsequent siblings) 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Honnappa Nagarahalli, Gavin Hu, Steve Capper, Phil Yang Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 2/7] eal: fix error attribute use for clang 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 1/7] eal: add missing include to mcslock Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include Bruce Richardson ` (4 subsequent siblings) 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, haiyue.wang, Ray Kinsella, Neil Horman Clang does not have an "error" attribute for functions, so for marking internal functions we need to check for the error attribute, and provide a fallback if it is not present. For clang, we can use "diagnose_if" attribute, similarly checking for its presence before use. Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") Cc: haiyue.wang@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_compat.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 4cd8f68d68..c30f072aa3 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -19,12 +19,18 @@ __attribute__((section(".text.experimental"))) #endif -#ifndef ALLOW_INTERNAL_API +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ + +#define __rte_internal \ +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ +section(".text.internal"))) + #else #define __rte_internal \ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 1/7] eal: add missing include to mcslock Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 2/7] eal: fix error attribute use for clang Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:21 ` Medvedkin, Vladimir 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 4/7] build: separate out headers for include checking Bruce Richardson ` (3 subsequent siblings) 6 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, vladimir.medvedkin The rte_rib6 header was using RTE_MIN macro from rte_common.h but not including the header file. Fixes: f7e861e21c46 ("rib: support IPv6") Cc: vladimir.medvedkin@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_rib/rte_rib6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index b5e10569b9..dbd52928a2 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -20,6 +20,7 @@ #include <rte_memcpy.h> #include <rte_compat.h> +#include <rte_common.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include Bruce Richardson @ 2021-01-26 14:21 ` Medvedkin, Vladimir 0 siblings, 0 replies; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-26 14:21 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: david.marchand On 26/01/2021 14:18, Bruce Richardson wrote: > The rte_rib6 header was using RTE_MIN macro from rte_common.h but not > including the header file. > > Fixes: f7e861e21c46 ("rib: support IPv6") > Cc: vladimir.medvedkin@intel.com > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_rib/rte_rib6.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h > index b5e10569b9..dbd52928a2 100644 > --- a/lib/librte_rib/rte_rib6.h > +++ b/lib/librte_rib/rte_rib6.h > @@ -20,6 +20,7 @@ > > #include <rte_memcpy.h> > #include <rte_compat.h> > +#include <rte_common.h> > > #ifdef __cplusplus > extern "C" { > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 4/7] build: separate out headers for include checking 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson ` (2 preceding siblings ...) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 5/7] buildtools/chkincs: add app to verify header includes Bruce Richardson ` (2 subsequent siblings) 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Konstantin Ananyev, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu For some libraries, there may be some header files which are not for direct inclusion, but rather are to be included via other header files. To allow later checking of these files for missing includes, we separate out the indirect include files from the direct ones. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/contributing/coding_style.rst | 12 ++++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- lib/librte_ethdev/meson.build | 4 ++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++---- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 14 files changed, 45 insertions(+), 19 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..dba4145228 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..449740e510 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +headers_no_chkincs += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..835ea22947 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_headers_no_chkincs = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_headers_no_chkincs, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..ab84869ea8 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -12,12 +12,10 @@ sources = files('ethdev_private.c', headers = files('rte_ethdev.h', 'rte_ethdev_driver.h', - 'rte_ethdev_core.h', 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', 'rte_ethdev_vdev.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -25,5 +23,7 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +headers_no_chkincs += files('rte_eth_ctrl.h', + 'rte_ethdev_core.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..b3ebc8b078 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +headers_no_chkincs += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..e24e6ed22b 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers_no_chkincs += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..3d3d515a4d 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1ab21bd4d8 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +headers_no_chkincs += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index 36fdcb6a57..1a95dae9e5 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +headers_no_chkincs += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_c11_mem.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..5d9b3601b3 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +headers_no_chkincs += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..a8b1c9a254 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +headers_no_chkincs += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index 44f0a62142..aa0a5ac8fc 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -66,6 +66,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + headers_no_chkincs = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) + install_headers(headers_no_chkincs) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 2b9c37eb42..e6e34d0a98 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..5c382487da 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 5/7] buildtools/chkincs: add app to verify header includes 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson ` (3 preceding siblings ...) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 4/7] build: separate out headers for include checking Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 6/7] devtools: remove check-includes script Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 7/7] ci: add checking of includes to CI builds Bruce Richardson 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. To ensure ongoing compliance, we enable this build test as part of the default x86 build in "test-meson-builds.sh". Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 4 ++ buildtools/chkincs/gen_c_file_for_header.py | 12 ++++++ buildtools/chkincs/main.c | 4 ++ buildtools/chkincs/meson.build | 41 +++++++++++++++++++++ devtools/test-meson-builds.sh | 2 +- meson.build | 5 +++ 6 files changed, 67 insertions(+), 1 deletion(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 1a12916f56..d4f9ebe46d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1562,6 +1562,10 @@ F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +Header build sanity checking +M: Bruce Richardson <bruce.richardson@intel.com> +F: buildtools/chkincs/ + Sample packet helper functions for unit test M: Reshma Pattan <reshma.pattan@intel.com> F: app/test/sample_packet_forward.c diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..ed46948aea --- /dev/null +++ b/buildtools/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c new file mode 100644 index 0000000000..d25bb8852a --- /dev/null +++ b/buildtools/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build new file mode 100644 index 0000000000..97f9ad13b3 --- /dev/null +++ b/buildtools/chkincs/meson.build @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +if not get_option('check_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "check_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags = machine_args +cflags += '-Wno-unused-function' # needed if we include generic headers +cflags += '-DALLOW_EXPERIMENTAL_API' +cflags += '-DALLOW_INTERNAL_API' + +# some ethdev headers depend on bus headers +includes = include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources = files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = [] +foreach l:enabled_libs + deps += get_variable('static_rte_' + l) +endforeach + +executable('chkincs', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + link_whole: dpdk_static_libraries + dpdk_drivers, + install: false) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index efa91e0e40..07b5e6aeca 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,7 +227,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc skipABI \ +build build-x86-default cc skipABI -Dcheck_includes=true\ -Dlibdir=lib -Dmachine=$default_machine $use_shared # 32-bit with default compiler diff --git a/meson.build b/meson.build index e6e34d0a98..fcc4d4c900 100644 --- a/meson.build +++ b/meson.build @@ -68,6 +68,11 @@ if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 6/7] devtools: remove check-includes script 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson ` (4 preceding siblings ...) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 5/7] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 7/7] ci: add checking of includes to CI builds Bruce Richardson 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon The check-includes script allowed checking header files in a given directory to ensure that each header compiled alone without requiring any other header inclusions. With header checking now being done by the chkincs app in the build system this script can be removed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 - devtools/check-includes.sh | 259 ------------------------------------- 2 files changed, 260 deletions(-) delete mode 100755 devtools/check-includes.sh diff --git a/MAINTAINERS b/MAINTAINERS index d4f9ebe46d..8498b402db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -81,7 +81,6 @@ F: devtools/check-dup-includes.sh F: devtools/check-maintainers.sh F: devtools/check-forbidden-tokens.awk F: devtools/check-git-log.sh -F: devtools/check-includes.sh F: devtools/check-spdx-tag.sh F: devtools/check-symbol-maps.sh F: devtools/checkpatches.sh diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh deleted file mode 100755 index 940cf0eb2a..0000000000 --- a/devtools/check-includes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016 6WIND S.A. - -# This script checks that header files in a given directory do not miss -# dependencies when included on their own, do not conflict and accept being -# compiled with the strictest possible flags. -# -# Files are looked up in the directory provided as the first argument, -# otherwise build/include by default. -# -# Recognized environment variables: -# -# VERBOSE=1 is the same as -v. -# -# QUIET=1 is the same as -q. -# -# SUMMARY=1 is the same as -s. -# -# CC, CPPFLAGS, CFLAGS, CXX, CXXFLAGS are taken into account. -# -# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict -# C/C++ compilation flags. -# -# IGNORE contains a list of globbing patterns matching files (relative to the -# include directory) to avoid. It is set by default to known DPDK headers -# which must not be included on their own. -# -# IGNORE_CXX provides additional files for C++. - -while getopts hqvs arg; do - case $arg in - h) - cat <<EOF -usage: $0 [-h] [-q] [-v] [-s] [DIR] - -This script checks that header files in a given directory do not miss -dependencies when included on their own, do not conflict and accept being -compiled with the strictest possible flags. - - -h display this help and exit - -q quiet mode, disable normal output - -v show command lines being executed - -s show summary - -With no DIR, default to build/include. - -Any failed header check yields a nonzero exit status. -EOF - exit - ;; - q) - QUIET=1 - ;; - v) - VERBOSE=1 - ;; - s) - SUMMARY=1 - ;; - *) - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -include_dir=${1:-build/include} - -: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror} -: ${PEDANTIC_CXXFLAGS=} -: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600} -: ${CC:=cc} -: ${CXX:=c++} -: ${IGNORE= \ - 'rte_atomic_32.h' \ - 'rte_atomic_64.h' \ - 'rte_byteorder_32.h' \ - 'rte_byteorder_64.h' \ - 'generic/*' \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ - 'rte_eal_interrupts.h' \ -} -: ${IGNORE_CXX= \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ -} - -temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) -pass_cc= -failures_cc=0 - -temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) -pass_cxx= -failures_cxx=0 - -# Process output parameters. - -[ "$QUIET" = 1 ] && -exec 1> /dev/null - -[ "$VERBOSE" = 1 ] && -output () -{ - local CCV - local CXXV - - shift - CCV=$CC - CXXV=$CXX - CC="echo $CC" CXX="echo $CXX" "$@" - CC=$CCV - CXX=$CXXV - - "$@" -} || -output () -{ - - printf ' %s\n' "$1" - shift - "$@" -} - -trap 'rm -f "$temp_cc" "$temp_cxx"' EXIT - -compile_cc () -{ - ${CC} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CFLAGS} ${CFLAGS} \ - -c -o /dev/null "${temp_cc}" -} - -compile_cxx () -{ - ${CXX} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CXXFLAGS} ${CXXFLAGS} \ - -c -o /dev/null "${temp_cxx}" -} - -ignore () -{ - file="$1" - shift - while [ $# -ne 0 ]; do - case "$file" in - $1) - return 0 - ;; - esac - shift - done - return 1 -} - -# Check C/C++ compilation for each header file. - -while read -r path -do - file=${path#$include_dir} - file=${file##/} - if ignore "$file" $IGNORE; then - output "SKIP $file" : - continue - fi - if printf "\ -#include <%s> - -int main(void) -{ - return 0; -} -" "$file" > "$temp_cc" && - output "CC $file" compile_cc - then - pass_cc="$pass_cc $file" - else - failures_cc=$(($failures_cc + 1)) - fi - if ignore "$file" $IGNORE_CXX; then - output "SKIP CXX $file" : - continue - fi - if printf "\ -#include <%s> - -int main() -{ -} -" "$file" > "$temp_cxx" && - output "CXX $file" compile_cxx - then - pass_cxx="$pass_cxx $file" - else - failures_cxx=$(($failures_cxx + 1)) - fi -done <<EOF -$(find "$include_dir" -name '*.h') -EOF - -# Check C compilation with all includes. - -: > "$temp_cc" && -for file in $pass_cc; do - printf "\ -#include <%s> -" "$file" >> $temp_cc -done -if printf "\ -int main(void) -{ - return 0; -} -" >> "$temp_cc" && - output "CC (all includes that did not fail)" compile_cc -then - : -else - failures_cc=$(($failures_cc + 1)) -fi - -# Check C++ compilation with all includes. - -: > "$temp_cxx" && -for file in $pass_cxx; do - printf "\ -#include <%s> -" "$file" >> $temp_cxx -done -if printf "\ -int main() -{ -} -" >> "$temp_cxx" && - output "CXX (all includes that did not fail)" compile_cxx -then - : -else - failures_cxx=$(($failures_cxx + 1)) -fi - -# Report results. - -if [ "$SUMMARY" = 1 ]; then - printf "\ -Summary: - %u failure(s) for C using '%s'. - %u failure(s) for C++ using '%s'. -" $failures_cc "$CC" $failures_cxx "$CXX" 1>&2 -fi - -# Exit with nonzero status if there are failures. - -[ $failures_cc -eq 0 ] && -[ $failures_cxx -eq 0 ] -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v4 7/7] ci: add checking of includes to CI builds 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson ` (5 preceding siblings ...) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 6/7] devtools: remove check-includes script Bruce Richardson @ 2021-01-26 14:18 ` Bruce Richardson 6 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 14:18 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Aaron Conole, Michael Santana For CI builds, turn on the checking of includes. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- For simplicity, this patch just enables the header includes checks globally, rather than just limiting it to certain builds. Since the C files generated are all just a single #include line , the extra compilation time is fairly short compared to the overall existing build time in the CI. --- .ci/linux-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" meson build --werror $OPTS ninja -C build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 0/8] add checking of header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (22 preceding siblings ...) 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 1/8] eal: add missing include to mcslock Bruce Richardson ` (7 more replies) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson 25 siblings, 8 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. The script "check-includes.sh" could be used for this job, but it was not called out in the documentation, so many contributors may not have been aware of it's existance. It also was difficult to run from a source-code directory, as the script did not automatically allow finding of headers from one DPDK library directory to another [this was probably based on running it on a build created by the "make" build system, where all headers were in a single directory]. To attempt to have a build-system integrated replacement, this patchset adds a "chkincs" app in the buildtools directory to verify this on an ongoing basis. This chkincs app does nothing when run, and is not installed as part of a DPDK "ninja install", it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, which was something done by the check-includes.sh script but which is missing here. V5: * Removed private ethdev headers from checks and installing * Removed the ALLOW_INTERNAL_APIS macro from chkincs build. V4: * Fixed build errors with clang and arm builds * Added support for running chkincs as part of github actions CI V3: * Shrunk patchset as most header fixes already applied * Moved chkincs from "apps" to the "buildtools" directory, which is a better location for something not for installation for end-user use. * Added patch to drop check-includes script. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions *** SUBJECT HERE *** *** BLURB HERE *** Bruce Richardson (8): eal: add missing include to mcslock eal: fix error attribute use for clang ethdev: make driver-only headers private rib: fix missing header include build: separate out headers for include checking buildtools/chkincs: add app to verify header includes devtools: remove check-includes script ci: add checking of includes to CI builds .ci/linux-build.sh | 1 + MAINTAINERS | 5 +- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- buildtools/chkincs/gen_c_file_for_header.py | 12 + buildtools/chkincs/main.c | 4 + buildtools/chkincs/meson.build | 40 +++ devtools/check-includes.sh | 259 ------------------ devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 + drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 +- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 +- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 +- drivers/net/cxgbe/cxgbe_main.c | 4 +- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 +- drivers/net/cxgbe/cxgbevf_main.c | 4 +- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 +- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_flow.c | 4 +- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 +- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 +- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 +- drivers/net/failsafe/failsafe.c | 4 +- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 +- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 +- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 +- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 +- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 +- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 +- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 +- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 +- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 +- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 +- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 +- drivers/net/memif/rte_eth_memif.c | 4 +- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 +- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 +- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 +- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 +- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 +- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 +- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 +- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 +- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 +- .../net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 +- drivers/net/tap/rte_eth_tap.c | 4 +- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 +- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 +- drivers/net/virtio/virtio_ethdev.c | 4 +- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/include/rte_compat.h | 8 +- lib/librte_eal/x86/include/meson.build | 14 +- .../{rte_ethdev_driver.h => ethdev_driver.h} | 0 .../{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- .../{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 8 +- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- lib/librte_hash/meson.build | 4 +- lib/librte_ipsec/meson.build | 3 +- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_rib/rte_rib6.h | 1 + lib/librte_ring/meson.build | 4 +- lib/librte_stack/meson.build | 4 +- lib/librte_table/meson.build | 7 +- lib/meson.build | 3 + meson.build | 6 + meson_options.txt | 2 + 274 files changed, 417 insertions(+), 579 deletions(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build delete mode 100755 devtools/check-includes.sh rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 1/8] eal: add missing include to mcslock 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 2/8] eal: fix error attribute use for clang Bruce Richardson ` (6 subsequent siblings) 7 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Honnappa Nagarahalli, Gavin Hu, Steve Capper, Phil Yang Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 2/8] eal: fix error attribute use for clang 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 1/8] eal: add missing include to mcslock Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private Bruce Richardson ` (5 subsequent siblings) 7 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, haiyue.wang, Ray Kinsella, Neil Horman Clang does not have an "error" attribute for functions, so for marking internal functions we need to check for the error attribute, and provide a fallback if it is not present. For clang, we can use "diagnose_if" attribute, similarly checking for its presence before use. Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") Cc: haiyue.wang@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_compat.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 4cd8f68d68..c30f072aa3 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -19,12 +19,18 @@ __attribute__((section(".text.experimental"))) #endif -#ifndef ALLOW_INTERNAL_API +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ + +#define __rte_internal \ +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ +section(".text.internal"))) + #else #define __rte_internal \ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 1/8] eal: add missing include to mcslock Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 2/8] eal: fix error attribute use for clang Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-27 8:56 ` David Marchand 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include Bruce Richardson ` (4 subsequent siblings) 7 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++-- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 ++-- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 ++-- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_main.c | 4 ++-- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbevf_main.c | 4 ++-- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 ++-- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/e1000/igb_flow.c | 4 ++-- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 ++-- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 ++-- drivers/net/failsafe/failsafe.c | 4 ++-- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 ++-- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 ++-- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 ++-- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 ++-- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 ++-- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 ++-- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 ++-- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 ++-- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 ++-- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 ++-- drivers/net/memif/rte_eth_memif.c | 4 ++-- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 ++-- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 ++-- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 ++-- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 ++-- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 ++-- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 ++-- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 4 ++-- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 ++-- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 ++-- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++-- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} | 0 lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 3 --- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- 251 files changed, 295 insertions(+), 298 deletions(-) rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index e8b76bd850..8a5c8310a8 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -17,7 +17,7 @@ #include <rte_common.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_lcore.h> #include <rte_memory.h> diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c index 21fcc1bc4c..b49fcfb3f1 100644 --- a/app/test/test_pdump.c +++ b/app/test/test_pdump.c @@ -6,7 +6,7 @@ #include <stdint.h> #include <limits.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pdump.h> #include "rte_eal.h" #include "rte_lcore.h" diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 2c24c9b3f5..7036f401ed 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -4,7 +4,7 @@ #include <rte_mbuf.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_malloc.h> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f39d6e2092..662cbfaae5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -27,7 +27,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_bus.h> diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h index f2b0bf91e7..516c6c1515 100644 --- a/drivers/bus/dpaa/include/fman.h +++ b/drivers/bus/dpaa/include/fman.h @@ -12,7 +12,7 @@ #include <stdbool.h> #include <net/if.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <compat.h> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 58435589b2..26910ac01f 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_devargs.h> #include <rte_memcpy.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_dyn.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index b52f36c33e..c8373e627a 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -22,7 +22,7 @@ #include <eal_filesystem.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index d9619848d8..122aa1740d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -19,7 +19,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_pool_ops.h> #include <fslmc_logs.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c index d393ce6186..8ed969c7c0 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <fslmc_logs.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 1a9dd18b99..c6f8312a1d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -24,7 +24,7 @@ #include<sys/eventfd.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index eeb2494bd0..e4fa3a2e46 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -24,7 +24,7 @@ #include <rte_memory.h> #include <rte_pci.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cryptodev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index 200b71640b..acc1fde771 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_fslmc.h> #include <mc/fsl_dpcon.h> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index e60a7dc69e..17325bbf6a 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -8,7 +8,7 @@ #include <rte_debug.h> #include <rte_dev.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <rte_kvargs.h> #include <rte_lcore.h> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 97ce08d78f..ca49a8d42a 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -14,7 +14,7 @@ #include <errno.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 671ee87ae2..bfe5a0a451 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 703b7417ed..b8d5ad0d91 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -19,8 +19,8 @@ #include <bpf/xsk.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index a658993512..ef650a4658 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -7,7 +7,7 @@ #include <dlfcn.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "rte_pmd_ark.h" diff --git a/drivers/net/ark/ark_ethdev_rx.h b/drivers/net/ark/ark_ethdev_rx.h index 001fa9bdfa..33c1f2c953 100644 --- a/drivers/net/ark/ark_ethdev_rx.h +++ b/drivers/net/ark/ark_ethdev_rx.h @@ -9,7 +9,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> extern uint64_t ark_timestamp_rx_dynflag; extern int ark_timestamp_dynfield_offset; diff --git a/drivers/net/ark/ark_ethdev_tx.h b/drivers/net/ark/ark_ethdev_tx.h index e448ce2225..12c71a7158 100644 --- a/drivers/net/ark/ark_ethdev_tx.h +++ b/drivers/net/ark/ark_ethdev_tx.h @@ -7,7 +7,7 @@ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> uint16_t eth_ark_xmit_pkts_noop(void *vtxq, diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h index 5a987e4d67..821fb55bba 100644 --- a/drivers/net/ark/ark_ext.h +++ b/drivers/net/ark/ark_ext.h @@ -5,7 +5,7 @@ #ifndef _ARK_EXT_H_ #define _ARK_EXT_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /* * This is the template file for users who which to define a dynamic diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h index 403df5900b..91726ecc20 100644 --- a/drivers/net/ark/ark_global.h +++ b/drivers/net/ark/ark_global.h @@ -9,7 +9,7 @@ #include <assert.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c index b8fb69497d..0f2d31e5be 100644 --- a/drivers/net/ark/ark_pktchkr.c +++ b/drivers/net/ark/ark_pktchkr.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktchkr.h" diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 4a02662a46..ac4322a359 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktgen.h" diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index b0716773ad..473f6209f6 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 449ffd454d..7d367c9306 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atlantic/atl_rxtx.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/rte_pmd_atlantic.c b/drivers/net/atlantic/rte_pmd_atlantic.c index 2962f5c6cb..00fc2872e5 100644 --- a/drivers/net/atlantic/rte_pmd_atlantic.c +++ b/drivers/net/atlantic/rte_pmd_atlantic.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Aquantia Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "rte_pmd_atlantic.h" #include "atl_ethdev.h" diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index f531e03c02..566a3606a2 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_malloc.h> diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 91404ca01c..b83fdcca85 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -35,7 +35,7 @@ #include <rte_ethdev.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_common.h> #include <rte_cycles.h> #include <rte_io.h> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index d35c75a2e2..50db70dfcd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_dev.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> /* diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h index f712bb3e84..fa1c3ba955 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -31,7 +31,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_eal.h> #include <rte_mempool.h> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d2d76b623a..0db6e58f3d 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -12,7 +12,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> #include <rte_lcore.h> #include <rte_spinlock.h> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 74b0f3d1dc..e8a7a8ecd4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -7,8 +7,8 @@ #include <stdbool.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_alarm.h> diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h index 3cf2a1b822..50c3d92b9a 100644 --- a/drivers/net/bnxt/bnxt_stats.h +++ b/drivers/net/bnxt/bnxt_stats.h @@ -6,7 +6,7 @@ #ifndef _BNXT_STATS_H_ #define _BNXT_STATS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> void bnxt_free_stats(struct bnxt *bp); int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index d67db46c65..965381c0c4 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_byteorder.h> diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h index 8f198bd50e..75fb8dc02e 100644 --- a/drivers/net/bonding/eth_bond_private.h +++ b/drivers/net/bonding/eth_bond_private.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_spinlock.h> #include <rte_bitmap.h> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 55c8e3167c..17e6ff8b90 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -6,7 +6,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 66ab8dd693..5241c60089 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -7,8 +7,8 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_tcp.h> #include <rte_udp.h> #include <rte_ip.h> diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index ef20dc6675..0e3033b550 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -16,7 +16,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c index cd011bc1b8..561d759dbc 100644 --- a/drivers/net/cxgbe/base/t4vf_hw.c +++ b/drivers/net/cxgbe/base/t4vf_hw.c @@ -3,7 +3,7 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include "common.h" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index cfa385bab7..bfa57c979d 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -28,8 +28,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 3b56eccfbe..83ad758e88 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <rte_dev.h> #include <rte_kvargs.h> diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c index c2918f5356..bf1815c25f 100644 --- a/drivers/net/cxgbe/cxgbevf_ethdev.c +++ b/drivers/net/cxgbe/cxgbevf_ethdev.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include "cxgbe.h" #include "cxgbe_pfvf.h" diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index 9ee060504f..f639612ae4 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include "base/common.h" diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 8c7dbe3a1d..56b8ec1f33 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -28,7 +28,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0c87c136d7..d643514de6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -29,7 +29,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index a858b1372c..b5728e09c2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -9,7 +9,7 @@ /* System headers */ #include <stdbool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <fsl_usd.h> diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index e2459d9b99..e38fba23c0 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -26,7 +26,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_ip.h> diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index 25b1d2bb6d..87c893db51 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 6f38da3cce..38774e255b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 9cca6d16c3..003b379fa7 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 2036c6e917..9b8c4a7de5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -15,8 +15,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 19e3bffd46..db5d1222ce 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index dfe87508c2..ec355cbf35 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index ccb184df95..33f6b1d6b3 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -15,8 +15,8 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_atomic.h> diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index 9d74c08abe..2ce74dd5a9 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -16,7 +16,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dd520cd82c..1500d2ffff 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 20ff3653c6..c796af4aa7 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -5,8 +5,8 @@ #include <rte_string_fns.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_tcp.h> #include <rte_atomic.h> #include <rte_dev.h> diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 4d2c9c0474..0b45168c60 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -3,7 +3,7 @@ */ #include <stdbool.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <dpaax_iova_table.h> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 1c8d60e264..b3f441c8f7 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -9,8 +9,8 @@ #include <rte_dev.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_string_fns.h> diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 1eec96abca..97ee7509ce 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_ip.h> diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index ad1e89a581..21d9b1cef7 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_hash.h> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 805eb5e46a..2a06d46872 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "enic_compat.h" #include "enic.h" diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 1405db15ab..689bf748ae 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -4,7 +4,7 @@ */ #include "enic_compat.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "wq_enet_desc.h" #include "rq_enet_desc.h" #include "cq_enet_desc.h" diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 4b6b97eb10..a2a02227e3 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_prefetch.h> diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c index f0bea33423..1848f52717 100644 --- a/drivers/net/enic/enic_rxtx_vec_avx2.c +++ b/drivers/net/enic/enic_rxtx_vec_avx2.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vect.h> #include "enic_compat.h" diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c index c2c03c0281..f7b79c1c4e 100644 --- a/drivers/net/enic/enic_vf_representor.c +++ b/drivers/net/enic/enic_vf_representor.c @@ -8,8 +8,8 @@ #include <rte_bus_pci.h> #include <rte_common.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_flow_driver.h> #include <rte_kvargs.h> #include <rte_pci.h> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index ba81c82174..e3bda0df2b 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -7,8 +7,8 @@ #include <rte_alarm.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_devargs.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 492047f587..2b6ca9080d 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -9,7 +9,7 @@ #include <rte_debug.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h index 0f9a572af8..cd39d103c6 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -12,7 +12,7 @@ #include <rte_atomic.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_devargs.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c index fee08fa23c..fe67293299 100644 --- a/drivers/net/failsafe/failsafe_rxtx.c +++ b/drivers/net/failsafe/failsafe_rxtx.c @@ -6,7 +6,7 @@ #include <rte_atomic.h> #include <rte_debug.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "failsafe_private.h" diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c187088a33..fd471c415e 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2,8 +2,8 @@ * Copyright(c) 2013-2016 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_string_fns.h> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 4accaa2cd6..8585c5b9e4 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_net.h> #include "fm10k.h" diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index 6fcc939ad9..39e3cdac1f 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "fm10k.h" #include "base/fm10k_type.h" diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c index 41c99bdbf8..cb9cf6efa2 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Huawei Technologies Co., Ltd */ -#include<rte_ethdev_driver.h> +#include<ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_hash.h> #include <rte_jhash.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 5a2c171099..1d6b710c9f 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -4,7 +4,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index c7338d83be..70b4d32ff2 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index f58f4f7adc..45dbead512 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 449d967784..a796469435 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4,7 +4,7 @@ #include <rte_alarm.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 0d17170fa7..6374a76794 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -6,7 +6,7 @@ #define _HNS3_ETHDEV_H_ #include <sys/time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_byteorder.h> #include <rte_io.h> #include <rte_spinlock.h> diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index bb4ec6bb39..394ffe38cd 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -4,7 +4,7 @@ #include <linux/pci_regs.h> #include <rte_alarm.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_pci.h> #include <rte_vfio.h> diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 857cc94c98..896540df78 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index d2a5db8aab..1d500b984c 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c index ed2567a8ff..3342a781ad 100644 --- a/drivers/net/hns3/hns3_mp.c +++ b/drivers/net/hns3/hns3_mp.c @@ -3,7 +3,7 @@ */ #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index f2cb465eed..01550458b7 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0badfc9260..676962553f 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -6,7 +6,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_net.h> #include <rte_malloc.h> diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c index a26c83d146..2bc4372449 100644 --- a/drivers/net/hns3/hns3_rxtx_vec.c +++ b/drivers/net/hns3/hns3_rxtx_vec.c @@ -3,7 +3,7 @@ */ #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 8c2c8f6108..b02bae7a0d 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -4,7 +4,7 @@ #include <arm_sve.h> #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 946994b80a..d7cd049891 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memzone.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 5d7db7fe13..2909b4d894 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -25,8 +25,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index f5defcf585..c572d003cb 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_memzone.h> #include <rte_malloc.h> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7fe760dba2..4d44282312 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 65d649b627..f3d6d899f6 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -14,7 +14,7 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 89560d4ee5..00db6c88a3 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c index d3238bfb6a..e6e468752c 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c +++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index e5a1deaeb2..ea554b4fda 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index e92f97b7ed..80b153e8f6 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 31f73f6054..33cebbe88b 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _I40E_RXTX_VEC_COMMON_H_ #define _I40E_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "i40e_ethdev.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index f094de69ae..d81269624e 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 0bcb48e24e..45fce0a022 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 9e40406a3d..7ed47c1a2c 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -7,7 +7,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h" diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index cf6ea0b15c..e9c8c1157a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -19,8 +19,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index f48f574a5d..4e864b4b9c 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index aabbcf34c2..8635ff83ca 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 958c73c4fb..f437fc3170 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1ddbad0f1f..3d471d9acc 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index 7ad1e0f68a..46a18732d3 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IAVF_RXTX_VEC_COMMON_H_ #define _IAVF_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c index 75c77f9d32..8574d0830f 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 3ef29d509d..8add888987 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -16,8 +16,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include "iavf.h" diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c index 363ce68318..113cb68765 100644 --- a/drivers/net/ice/ice_acl_filter.c +++ b/drivers/net/ice/ice_acl_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 4a9af3292c..dbe42fa3df 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -17,8 +17,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h index ff029963bf..0cb90b5e9f 100644 --- a/drivers/net/ice/ice_dcf.h +++ b/drivers/net/ice/ice_dcf.h @@ -5,7 +5,7 @@ #ifndef _ICE_DCF_H_ #define _ICE_DCF_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <iavf_prototype.h> #include <iavf_adminq_cmd.h> diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index ea1f2951ba..86f70cf7ff 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -14,7 +14,7 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_memzone.h> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index ec29f0fe40..c021d7ab6c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <stdio.h> #include <sys/types.h> diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 2b03c59671..7e9cbd2e9a 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -7,7 +7,7 @@ #include <rte_kvargs.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ice_common.h" #include "base/ice_adminq_cmd.h" diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index c4496dbbe1..25d15a8adb 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 2d23c8dd50..322df649b1 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 7286e3a445..6727d94c04 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_vect.h> diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 7bac77ecd1..5ca0985e21 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 802212fc57..dbaa7a83e5 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/igc/igc_filter.h b/drivers/net/igc/igc_filter.h index 877f51c88b..df8516bc40 100644 --- a/drivers/net/igc/igc_filter.h +++ b/drivers/net/igc/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eth_ctrl.h> #include "igc_ethdev.h" diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 4654ec41f0..c0a5d5e84f 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -4,7 +4,7 @@ #include <rte_config.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "igc_logs.h" diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 2face7c635..ded3ffe48d 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -5,9 +5,9 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "ionic_logs.h" #include "ionic.h" diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index f39b54e8ef..f3d55c0fa6 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ionic.h" #include "ionic_logs.h" diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 5d0e9d5d5a..61ad396469 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c index 4446d2af9e..f8e751cb09 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c @@ -11,7 +11,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h index a6815a9cca..ba3f8821e2 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h @@ -15,8 +15,8 @@ #include <rte_mbuf.h> #include <rte_flow_driver.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c index f857e64afb..c702e19ea5 100644 --- a/drivers/net/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/ipn3ke/ipn3ke_flow.c @@ -13,7 +13,7 @@ #include <rte_io.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 9e15cce34f..856d21ef9b 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_io.h> diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index 17ac026d38..6a9b98fd7f 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ixgbe/ixgbe_bypass.c b/drivers/net/ixgbe/ixgbe_bypass.c index ae38ce3559..67ced6c723 100644 --- a/drivers/net/ixgbe/ixgbe_bypass.c +++ b/drivers/net/ixgbe/ixgbe_bypass.c @@ -4,7 +4,7 @@ #include <time.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_bypass_api.h" #include "rte_pmd_ixgbe.h" diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c8b9ec8c11..761a0f26bb 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 11b9effeba..27a49bbce5 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -13,7 +13,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_logs.h" diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 9aeb2e4a49..0b10e91a9b 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -25,7 +25,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index 62f2a5f764..e45c5501e6 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -2,8 +2,8 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ip.h> #include <rte_jhash.h> #include <rte_security_driver.h> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 15982af8da..fbf2b17d16 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index cc8f70e6dd..470cf12dec 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -33,7 +33,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h index a97c27189b..adba855ca3 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IXGBE_RXTX_VEC_COMMON_H_ #define _IXGBE_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_rxtx.h" diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c index a5a5b2167f..f83b800ad9 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c index 90c076825a..9bbffe6119 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c index 8185f0d3bb..d5b636a194 100644 --- a/drivers/net/ixgbe/ixgbe_vf_representor.c +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c @@ -6,7 +6,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d2f708242c..cf089cd9ae 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -2,7 +2,7 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ixgbe_api.h" #include "base/ixgbe_x550.h" diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 1696787a9b..9ce74e549b 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -7,8 +7,8 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kni.h> #include <rte_kvargs.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index ddbc8c0e0c..c6b8310b71 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -4,7 +4,7 @@ #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_mbox.c b/drivers/net/liquidio/base/lio_mbox.c index 1129001515..2ac2b1b334 100644 --- a/drivers/net/liquidio/base/lio_mbox.c +++ b/drivers/net/liquidio/base/lio_mbox.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include "lio_logs.h" diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index eb0fdab45a..0b189d5d15 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -3,8 +3,8 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_cycles.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 8d705bfe7f..a067b60e47 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index c526f90778..5b373738e6 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -13,8 +13,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 8ed9aebab7..77c95bcb7a 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -17,8 +17,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 765a7e5998..24321d3a39 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -11,7 +11,7 @@ #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d5d8c96351..27af426363 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -33,8 +33,8 @@ #include <rte_common.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c6cb29493e..63df8fcf2b 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 9ff05c6738..783ff94dce 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -34,7 +34,7 @@ #include <rte_bus_pci.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_pci.h> diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 2a86382db7..b8ecfa829b 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -27,7 +27,7 @@ #include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 26465c66a4..e4366f28bb 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -18,7 +18,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_byteorder.h> diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index 6786b12ab5..d56009c418 100644 --- a/drivers/net/mlx4/mlx4_intr.c +++ b/drivers/net/mlx4/mlx4_intr.c @@ -23,7 +23,7 @@ #include <rte_alarm.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c index eca0c20a8a..e05da89c0e 100644 --- a/drivers/net/mlx4/mlx4_mp.c +++ b/drivers/net/mlx4/mlx4_mp.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include "mlx4.h" diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index 0699bdd5f2..978cbb8201 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -26,7 +26,7 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h index 9de6c59411..7c72ce6d17 100644 --- a/drivers/net/mlx4/mlx4_rxtx.h +++ b/drivers/net/mlx4/mlx4_rxtx.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c index 37b84413fb..8262071505 100644 --- a/drivers/net/mlx4/mlx4_txq.c +++ b/drivers/net/mlx4/mlx4_txq.c @@ -27,7 +27,7 @@ #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e36a78091c..0e8de9439e 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -24,7 +24,7 @@ #include <sys/un.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c index 08ade75799..60fdee22a1 100644 --- a/drivers/net/mlx5/linux/mlx5_mp_os.c +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 9ac1d46b1b..7efa7c6cd2 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -16,8 +16,8 @@ #include <fcntl.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c index 318e39b1df..43ff85f9c4 100644 --- a/drivers/net/mlx5/linux/mlx5_verbs.c +++ b/drivers/net/mlx5/linux/mlx5_verbs.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 40e895e080..005904bdfe 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -14,7 +14,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3730f32295..50a6d2b19f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -11,8 +11,8 @@ #include <errno.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 101e9c20d0..4bbf628885 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -15,7 +15,7 @@ #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_rwlock.h> #include <rte_interrupts.h> #include <rte_errno.h> diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 85a0979653..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,7 +6,7 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vxlan.h> #include "mlx5_autoconf.h" diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 45ee7e4488..51b39ddde5 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -10,7 +10,7 @@ #include <stdlib.h> #include <errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2ca6148c1d..6716a20141 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -12,7 +12,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eal_paging.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c1ddff7364..707d6749e2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 2d4381946d..9347490967 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index bd786fd638..6ffcfcd97a 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -11,7 +11,7 @@ #include <netinet/in.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "mlx5_defs.h" diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 845cebe2e8..dc0131af3a 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -9,7 +9,7 @@ #include <string.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index 7613ff770d..cf93ccac86 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c @@ -7,7 +7,7 @@ #include <errno.h> #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_glue.h> #include "mlx5.h" diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 787b2b74dd..92e3a792e1 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_interrupts.h> #include <rte_debug.h> diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 82d4d4a745..a6569b250a 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -8,7 +8,7 @@ #include <stdio.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 48210bf0b2..94dd56709e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -6,7 +6,7 @@ #include <unistd.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index b38482d4e9..696282ca31 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -5,7 +5,7 @@ #include <stdint.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index b81bb4a12d..5142e50858 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_eal_paging.h> diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index dbb9d362f3..64678d3f51 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -8,7 +8,7 @@ #include <stdint.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c index 076c688699..8609d38eca 100644 --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c @@ -5,7 +5,7 @@ #include <rte_errno.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/windows/mlx5_mp_os.c b/drivers/net/mlx5/windows/mlx5_mp_os.c index db793b1f7d..8313c29ffb 100644 --- a/drivers/net/mlx5/windows/mlx5_mp_os.c +++ b/drivers/net/mlx5/windows/mlx5_mp_os.c @@ -6,7 +6,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index b036432937..e37cc65c17 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -9,7 +9,7 @@ #include <stdlib.h> #include <rte_windows.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <mlx5_glue.h> #include <mlx5_devx_cmds.h> diff --git a/drivers/net/mlx5/windows/mlx5_vlan_os.c b/drivers/net/mlx5/windows/mlx5_vlan_os.c index d3b11e0001..3917c822e4 100644 --- a/drivers/net/mlx5/windows/mlx5_vlan_os.c +++ b/drivers/net/mlx5/windows/mlx5_vlan_os.c @@ -13,7 +13,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5.h> diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index 2cd73919ce..b0940b4462 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index f25cf9e46d..1d67f2abf1 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_log.h> #include <rte_malloc.h> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 5a401b4b06..04904b1514 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -24,7 +24,7 @@ #include <rte_atomic.h> #include <rte_branch_prediction.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_errno.h> #include <rte_memory.h> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c index 1ce260c89b..e317539de7 100644 --- a/drivers/net/netvsc/hn_rndis.c +++ b/drivers/net/netvsc/hn_rndis.c @@ -12,7 +12,7 @@ #include <unistd.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c index 86392917c5..2dc7abe354 100644 --- a/drivers/net/netvsc/hn_vf.c +++ b/drivers/net/netvsc/hn_vf.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_lcore.h> #include <rte_memory.h> #include <rte_bus_vmbus.h> diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index c55bcdf1ef..7e91d59847 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -9,7 +9,7 @@ #include <netcope/rxmac.h> #include <netcope/txmac.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "nfb_stats.h" diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h index b6578cc38a..28daeae0b8 100644 --- a/drivers/net/nfb/nfb_tx.h +++ b/drivers/net/nfb/nfb_tx.h @@ -10,7 +10,7 @@ #include <nfb/nfb.h> #include <nfb/ndp.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9ea24e5bda..9927c9c44b 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -17,8 +17,8 @@ #include <rte_common.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ether.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h index 1427954c17..78f7b8ca2f 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp.h +++ b/drivers/net/nfp/nfpcore/nfp_cpp.h @@ -6,7 +6,7 @@ #ifndef __NFP_CPP_H__ #define __NFP_CPP_H__ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp-common/nfp_platform.h" #include "nfp-common/nfp_resid.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index 36725d69ab..bad80a5a1c 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -33,7 +33,7 @@ #include <sys/file.h> #include <sys/stat.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include "nfp_cpp.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c index dec4a8b6d1..848c452eab 100644 --- a/drivers/net/nfp/nfpcore/nfp_cppcore.c +++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c @@ -12,7 +12,7 @@ #include <sys/types.h> #include <rte_byteorder.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp_cpp.h" #include "nfp_target.h" diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 49ee8da8e4..32764e8f0e 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -4,8 +4,8 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index 780a094ffa..b73515de37 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -8,7 +8,7 @@ #include <stdbool.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eventdev.h> #include <rte_mempool.h> #include <rte_memory.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c index bbe43a874b..61865ef0bc 100644 --- a/drivers/net/octeontx/octeontx_rxtx.c +++ b/drivers/net/octeontx/octeontx_rxtx.c @@ -9,7 +9,7 @@ #include <rte_atomic.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index 7c24d8b4fd..2ed28ea563 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -5,7 +5,7 @@ #ifndef __OCTEONTX_RXTX_H__ #define __OCTEONTX_RXTX_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define OFFLOAD_FLAGS \ uint16_t rx_offload_flags; \ diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 9bfe95d6b1..e9fbbca4da 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c index 439ec4fa89..a79b997376 100644 --- a/drivers/net/octeontx2/otx2_link.c +++ b/drivers/net/octeontx2/otx2_link.c @@ -3,7 +3,7 @@ */ #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "otx2_ethdev.h" diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index b8ef4c181d..91e5c0f6bd 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -2,7 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "otx2_ethdev.h" diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index a32b1f3f37..ff02ade70d 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -19,8 +19,8 @@ #include <pcap.h> #include <rte_cycles.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/pfe/pfe_eth.h b/drivers/net/pfe/pfe_eth.h index 9820d7bf47..fbc11b4ffb 100644 --- a/drivers/net/pfe/pfe_eth.h +++ b/drivers/net/pfe/pfe_eth.h @@ -7,7 +7,7 @@ #include <compat.h> #include <rte_ethdev.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #define ETH_ALEN 6 #define GEMAC_NO_PHY BIT(0) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3b079693fb..8cf59e210d 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -5,7 +5,7 @@ #include <sys/ioctl.h> #include <sys/epoll.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_ether.h> #include <dpaa_of.h> diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 61a65ac42e..da4b87f5e2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -11,8 +11,8 @@ #include <sys/queue.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ip.h> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 41402a5159..472d838582 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -4,7 +4,7 @@ #include "rte_eth_ring.h" #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index ed059e142f..fdee800482 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -14,7 +14,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_spinlock.h> #include <rte_atomic.h> diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index f3e00e2e38..f20154b568 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -11,7 +11,7 @@ #define _SFC_DP_RX_H #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h index 3ecdfcdd28..b4af68984a 100644 --- a/drivers/net/sfc/sfc_dp_tx.h +++ b/drivers/net/sfc/sfc_dp_tx.h @@ -10,7 +10,7 @@ #ifndef _SFC_DP_TX_H #define _SFC_DP_TX_H -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" #include "sfc_debug.h" diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index f2f5336435..d6f6a84eab 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -8,8 +8,8 @@ */ #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_errno.h> diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index 3c7e5580e2..03bfb14b5c 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -10,7 +10,7 @@ #ifndef _SFC_EV_H_ #define _SFC_EV_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index 4321045d1a..ab1d2cc595 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -10,7 +10,7 @@ #include <rte_byteorder.h> #include <rte_tailq.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h index d6ee9cf802..0d64b9c8bb 100644 --- a/drivers/net/sfc/sfc_rx.h +++ b/drivers/net/sfc/sfc_rx.h @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h index d583ee9c3d..3367bade37 100644 --- a/drivers/net/sfc/sfc_tx.h +++ b/drivers/net/sfc/sfc_tx.h @@ -11,7 +11,7 @@ #define _SFC_TX_H #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 3387ab485f..99d8468c94 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -6,8 +6,8 @@ #include <stdlib.h> #include <string.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 9c8737c9e2..faf90a5a8c 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -19,7 +19,7 @@ #include <rte_pipeline.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tm_driver.h> #include <rte_flow_driver.h> #include <rte_mtr_driver.h> diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 7874c4f4f8..6eaeadf1c8 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -15,8 +15,8 @@ #include <libsze2.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 2542de3065..c36d4bf76e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -7,8 +7,8 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h index ba45de8409..a98ea11a33 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -13,7 +13,7 @@ #include <linux/if_tun.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_gso.h> #include "tap_log.h" diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index c2e7c334d4..c45d6e00a9 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -23,8 +23,8 @@ #include <rte_dev.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> #include <rte_memory.h> diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index 3914117997..b8dd905d0b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -5,7 +5,7 @@ #ifndef __THUNDERX_NICVF_ETHDEV_H__ #define __THUNDERX_NICVF_ETHDEV_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define THUNDERX_NICVF_PMD_VERSION "2.0" #define THUNDERX_REG_BYTES 8 diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index d0ea95f1d1..91e09ff8d5 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -13,7 +13,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 1f274b2954..d6ed660b4e 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -6,7 +6,7 @@ #define __THUNDERX_NICVF_RXTX_H__ #include <rte_byteorder.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define NICVF_RX_OFFLOAD_NONE 0x1 #define NICVF_RX_OFFLOAD_CKSUM 0x2 diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index cf1c281a06..0ca207d0dd 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -11,7 +11,7 @@ #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_interrupts.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> struct nicvf_rbdr { diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index eef4b6d4a5..23f9d17091 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -7,7 +7,7 @@ #include <stdint.h> #include <string.h> #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index daa523b204..9f4eee4081 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -2,7 +2,7 @@ * Copyright(c) 2015-2020 */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_security_driver.h> #include <rte_cryptodev.h> diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c index 151f2c7a45..e4bd990b96 100644 --- a/drivers/net/txgbe/txgbe_pf.c +++ b/drivers/net/txgbe/txgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 3ad92248c6..ac09e75a3e 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -19,7 +19,7 @@ #include <rte_log.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_memzone.h> #include <rte_atomic.h> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 5845bb15f3..d198fc8a8e 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -8,8 +8,8 @@ #include <sys/epoll.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 92a3d4efa5..edcd6203d9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index ab61e911b8..0382dc5b2c 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> struct virtqueue; struct virtnet_ctl; diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 622d4bf201..fb7382eff7 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c index a26182bb46..f248869a8f 100644 --- a/drivers/net/virtio/virtio_rxtx_simple.c +++ b/drivers/net/virtio/virtio_rxtx_simple.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c index a260ebdf57..f09a1eda49 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c index 12e034dc0a..2cba800807 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c @@ -12,7 +12,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c index 1056e9c20b..85a5a6664a 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 241808cd8f..308275b70e 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 23a2ebbefa..ecdecc427c 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -26,8 +26,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 95c697f8e3..5cf53d4de8 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/ethdev_driver.h similarity index 100% rename from lib/librte_ethdev/rte_ethdev_driver.h rename to lib/librte_ethdev/ethdev_driver.h diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/ethdev_pci.h similarity index 99% rename from lib/librte_ethdev/rte_ethdev_pci.h rename to lib/librte_ethdev/ethdev_pci.h index bf715896ae..8edca82ce8 100644 --- a/lib/librte_ethdev/rte_ethdev_pci.h +++ b/lib/librte_ethdev/ethdev_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_config.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * Copy pci device info to the Ethernet device data. diff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c index 162a502fe7..5960c75cc5 100644 --- a/lib/librte_ethdev/ethdev_private.c +++ b/lib/librte_ethdev/ethdev_private.c @@ -3,7 +3,7 @@ */ #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" uint16_t diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/ethdev_vdev.h similarity index 97% rename from lib/librte_ethdev/rte_ethdev_vdev.h rename to lib/librte_ethdev/ethdev_vdev.h index 4ba3f28964..46c75d9e5f 100644 --- a/lib/librte_ethdev/rte_ethdev_vdev.h +++ b/lib/librte_ethdev/ethdev_vdev.h @@ -9,7 +9,7 @@ #include <rte_config.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * @internal diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..829abd456b 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,12 +11,9 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_driver.h', 'rte_ethdev_core.h', - 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c index 6338355e25..ca2ce87f7a 100644 --- a/lib/librte_ethdev/rte_class_eth.c +++ b/lib/librte_ethdev/rte_class_eth.c @@ -12,7 +12,7 @@ #include "rte_ethdev.h" #include "rte_ethdev_core.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" enum eth_params { diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index daf5f24f7e..f40df65e34 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -41,7 +41,7 @@ #include "rte_ethdev_trace.h" #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_profile.h" #include "ethdev_private.h" diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index eb299955d4..89b8ba2fc4 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -20,7 +20,7 @@ * - The driver-oriented Ethernet API that exports functions allowing * an Ethernet Poll Mode Driver (PMD) to allocate an Ethernet device instance, * create memzone for HW rings and process registered callbacks, and so on. - * PMDs should include rte_ethdev_driver.h instead of this header. + * PMDs should include ethdev_driver.h instead of this header. * * By default, all the functions of the Ethernet Device API exported by a PMD * are lock-free functions which assume to not be invoked in parallel on diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h index f3d72827cc..dabd819d10 100644 --- a/lib/librte_ethdev/rte_flow_driver.h +++ b/lib/librte_ethdev/rte_flow_driver.h @@ -18,7 +18,7 @@ #include <stdint.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h index 3b39532935..a0ddc2b5f4 100644 --- a/lib/librte_ethdev/rte_mtr_driver.h +++ b/lib/librte_ethdev/rte_mtr_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h index b86ed89c00..45290fb3fd 100644 --- a/lib/librte_ethdev/rte_tm_driver.h +++ b/lib/librte_ethdev/rte_tm_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private Bruce Richardson @ 2021-01-27 8:56 ` David Marchand 0 siblings, 0 replies; 165+ messages in thread From: David Marchand @ 2021-01-27 8:56 UTC (permalink / raw) To: Bruce Richardson Cc: dev, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam On Tue, Jan 26, 2021 at 10:38 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are > for drivers only and should be a private to DPDK and not installed. I agree applications don't need them. This breaks OOT drivers on the other hand. We don't take special care not to break such drivers, but we must announce the change, at least in the release notes. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (2 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-27 11:08 ` Medvedkin, Vladimir 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 5/8] build: separate out headers for include checking Bruce Richardson ` (3 subsequent siblings) 7 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, vladimir.medvedkin The rte_rib6 header was using RTE_MIN macro from rte_common.h but not including the header file. Fixes: f7e861e21c46 ("rib: support IPv6") Cc: vladimir.medvedkin@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_rib/rte_rib6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index b5e10569b9..dbd52928a2 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -20,6 +20,7 @@ #include <rte_memcpy.h> #include <rte_compat.h> +#include <rte_common.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include Bruce Richardson @ 2021-01-27 11:08 ` Medvedkin, Vladimir 0 siblings, 0 replies; 165+ messages in thread From: Medvedkin, Vladimir @ 2021-01-27 11:08 UTC (permalink / raw) To: Bruce Richardson, dev; +Cc: david.marchand On 26/01/2021 21:38, Bruce Richardson wrote: > The rte_rib6 header was using RTE_MIN macro from rte_common.h but not > including the header file. > > Fixes: f7e861e21c46 ("rib: support IPv6") > Cc: vladimir.medvedkin@intel.com > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_rib/rte_rib6.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h > index b5e10569b9..dbd52928a2 100644 > --- a/lib/librte_rib/rte_rib6.h > +++ b/lib/librte_rib/rte_rib6.h > @@ -20,6 +20,7 @@ > > #include <rte_memcpy.h> > #include <rte_compat.h> > +#include <rte_common.h> > > #ifdef __cplusplus > extern "C" { > Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> -- Regards, Vladimir ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 5/8] build: separate out headers for include checking 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (3 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson ` (2 subsequent siblings) 7 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Konstantin Ananyev, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu For some libraries, there may be some header files which are not for direct inclusion, but rather are to be included via other header files. To allow later checking of these files for missing includes, we separate out the indirect include files from the direct ones. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/contributing/coding_style.rst | 12 ++++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- lib/librte_ethdev/meson.build | 5 +++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++---- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 14 files changed, 46 insertions(+), 19 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..dba4145228 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..449740e510 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +headers_no_chkincs += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..835ea22947 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_headers_no_chkincs = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_headers_no_chkincs, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index 829abd456b..b7da959dd1 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,10 +11,8 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_core.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -22,5 +20,8 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +headers_no_chkincs += files( + 'rte_ethdev_core.h', + 'rte_eth_ctrl.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..b3ebc8b078 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +headers_no_chkincs += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..e24e6ed22b 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers_no_chkincs += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..3d3d515a4d 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1ab21bd4d8 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +headers_no_chkincs += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index 36fdcb6a57..1a95dae9e5 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +headers_no_chkincs += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_c11_mem.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..5d9b3601b3 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +headers_no_chkincs += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..a8b1c9a254 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +headers_no_chkincs += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index 44f0a62142..aa0a5ac8fc 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -66,6 +66,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + headers_no_chkincs = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) + install_headers(headers_no_chkincs) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 2b9c37eb42..e6e34d0a98 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..5c382487da 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 6/8] buildtools/chkincs: add app to verify header includes 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (4 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 5/8] build: separate out headers for include checking Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 7/8] devtools: remove check-includes script Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds Bruce Richardson 7 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. To ensure ongoing compliance, we enable this build test as part of the default x86 build in "test-meson-builds.sh". Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 4 +++ buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ buildtools/chkincs/main.c | 4 +++ buildtools/chkincs/meson.build | 40 +++++++++++++++++++++ devtools/test-meson-builds.sh | 2 +- meson.build | 5 +++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 1a12916f56..d4f9ebe46d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1562,6 +1562,10 @@ F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +Header build sanity checking +M: Bruce Richardson <bruce.richardson@intel.com> +F: buildtools/chkincs/ + Sample packet helper functions for unit test M: Reshma Pattan <reshma.pattan@intel.com> F: app/test/sample_packet_forward.c diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..ed46948aea --- /dev/null +++ b/buildtools/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c new file mode 100644 index 0000000000..d25bb8852a --- /dev/null +++ b/buildtools/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build new file mode 100644 index 0000000000..5dc43283e0 --- /dev/null +++ b/buildtools/chkincs/meson.build @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +if not get_option('check_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "check_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags = machine_args +cflags += '-Wno-unused-function' # needed if we include generic headers +cflags += '-DALLOW_EXPERIMENTAL_API' + +# some ethdev headers depend on bus headers +includes = include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources = files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = [] +foreach l:enabled_libs + deps += get_variable('static_rte_' + l) +endforeach + +executable('chkincs', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + link_whole: dpdk_static_libraries + dpdk_drivers, + install: false) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index efa91e0e40..07b5e6aeca 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,7 +227,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc skipABI \ +build build-x86-default cc skipABI -Dcheck_includes=true\ -Dlibdir=lib -Dmachine=$default_machine $use_shared # 32-bit with default compiler diff --git a/meson.build b/meson.build index e6e34d0a98..fcc4d4c900 100644 --- a/meson.build +++ b/meson.build @@ -68,6 +68,11 @@ if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 7/8] devtools: remove check-includes script 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (5 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds Bruce Richardson 7 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon The check-includes script allowed checking header files in a given directory to ensure that each header compiled alone without requiring any other header inclusions. With header checking now being done by the chkincs app in the build system this script can be removed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 - devtools/check-includes.sh | 259 ------------------------------------- 2 files changed, 260 deletions(-) delete mode 100755 devtools/check-includes.sh diff --git a/MAINTAINERS b/MAINTAINERS index d4f9ebe46d..8498b402db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -81,7 +81,6 @@ F: devtools/check-dup-includes.sh F: devtools/check-maintainers.sh F: devtools/check-forbidden-tokens.awk F: devtools/check-git-log.sh -F: devtools/check-includes.sh F: devtools/check-spdx-tag.sh F: devtools/check-symbol-maps.sh F: devtools/checkpatches.sh diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh deleted file mode 100755 index 940cf0eb2a..0000000000 --- a/devtools/check-includes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016 6WIND S.A. - -# This script checks that header files in a given directory do not miss -# dependencies when included on their own, do not conflict and accept being -# compiled with the strictest possible flags. -# -# Files are looked up in the directory provided as the first argument, -# otherwise build/include by default. -# -# Recognized environment variables: -# -# VERBOSE=1 is the same as -v. -# -# QUIET=1 is the same as -q. -# -# SUMMARY=1 is the same as -s. -# -# CC, CPPFLAGS, CFLAGS, CXX, CXXFLAGS are taken into account. -# -# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict -# C/C++ compilation flags. -# -# IGNORE contains a list of globbing patterns matching files (relative to the -# include directory) to avoid. It is set by default to known DPDK headers -# which must not be included on their own. -# -# IGNORE_CXX provides additional files for C++. - -while getopts hqvs arg; do - case $arg in - h) - cat <<EOF -usage: $0 [-h] [-q] [-v] [-s] [DIR] - -This script checks that header files in a given directory do not miss -dependencies when included on their own, do not conflict and accept being -compiled with the strictest possible flags. - - -h display this help and exit - -q quiet mode, disable normal output - -v show command lines being executed - -s show summary - -With no DIR, default to build/include. - -Any failed header check yields a nonzero exit status. -EOF - exit - ;; - q) - QUIET=1 - ;; - v) - VERBOSE=1 - ;; - s) - SUMMARY=1 - ;; - *) - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -include_dir=${1:-build/include} - -: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror} -: ${PEDANTIC_CXXFLAGS=} -: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600} -: ${CC:=cc} -: ${CXX:=c++} -: ${IGNORE= \ - 'rte_atomic_32.h' \ - 'rte_atomic_64.h' \ - 'rte_byteorder_32.h' \ - 'rte_byteorder_64.h' \ - 'generic/*' \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ - 'rte_eal_interrupts.h' \ -} -: ${IGNORE_CXX= \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ -} - -temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) -pass_cc= -failures_cc=0 - -temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) -pass_cxx= -failures_cxx=0 - -# Process output parameters. - -[ "$QUIET" = 1 ] && -exec 1> /dev/null - -[ "$VERBOSE" = 1 ] && -output () -{ - local CCV - local CXXV - - shift - CCV=$CC - CXXV=$CXX - CC="echo $CC" CXX="echo $CXX" "$@" - CC=$CCV - CXX=$CXXV - - "$@" -} || -output () -{ - - printf ' %s\n' "$1" - shift - "$@" -} - -trap 'rm -f "$temp_cc" "$temp_cxx"' EXIT - -compile_cc () -{ - ${CC} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CFLAGS} ${CFLAGS} \ - -c -o /dev/null "${temp_cc}" -} - -compile_cxx () -{ - ${CXX} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CXXFLAGS} ${CXXFLAGS} \ - -c -o /dev/null "${temp_cxx}" -} - -ignore () -{ - file="$1" - shift - while [ $# -ne 0 ]; do - case "$file" in - $1) - return 0 - ;; - esac - shift - done - return 1 -} - -# Check C/C++ compilation for each header file. - -while read -r path -do - file=${path#$include_dir} - file=${file##/} - if ignore "$file" $IGNORE; then - output "SKIP $file" : - continue - fi - if printf "\ -#include <%s> - -int main(void) -{ - return 0; -} -" "$file" > "$temp_cc" && - output "CC $file" compile_cc - then - pass_cc="$pass_cc $file" - else - failures_cc=$(($failures_cc + 1)) - fi - if ignore "$file" $IGNORE_CXX; then - output "SKIP CXX $file" : - continue - fi - if printf "\ -#include <%s> - -int main() -{ -} -" "$file" > "$temp_cxx" && - output "CXX $file" compile_cxx - then - pass_cxx="$pass_cxx $file" - else - failures_cxx=$(($failures_cxx + 1)) - fi -done <<EOF -$(find "$include_dir" -name '*.h') -EOF - -# Check C compilation with all includes. - -: > "$temp_cc" && -for file in $pass_cc; do - printf "\ -#include <%s> -" "$file" >> $temp_cc -done -if printf "\ -int main(void) -{ - return 0; -} -" >> "$temp_cc" && - output "CC (all includes that did not fail)" compile_cc -then - : -else - failures_cc=$(($failures_cc + 1)) -fi - -# Check C++ compilation with all includes. - -: > "$temp_cxx" && -for file in $pass_cxx; do - printf "\ -#include <%s> -" "$file" >> $temp_cxx -done -if printf "\ -int main() -{ -} -" >> "$temp_cxx" && - output "CXX (all includes that did not fail)" compile_cxx -then - : -else - failures_cxx=$(($failures_cxx + 1)) -fi - -# Report results. - -if [ "$SUMMARY" = 1 ]; then - printf "\ -Summary: - %u failure(s) for C using '%s'. - %u failure(s) for C++ using '%s'. -" $failures_cc "$CC" $failures_cxx "$CXX" 1>&2 -fi - -# Exit with nonzero status if there are failures. - -[ $failures_cc -eq 0 ] && -[ $failures_cxx -eq 0 ] -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson ` (6 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 7/8] devtools: remove check-includes script Bruce Richardson @ 2021-01-26 21:38 ` Bruce Richardson 2021-01-27 14:46 ` Aaron Conole 7 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-26 21:38 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Aaron Conole, Michael Santana For CI builds, turn on the checking of includes. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- .ci/linux-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" meson build --werror $OPTS ninja -C build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds Bruce Richardson @ 2021-01-27 14:46 ` Aaron Conole 0 siblings, 0 replies; 165+ messages in thread From: Aaron Conole @ 2021-01-27 14:46 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, david.marchand, Michael Santana Bruce Richardson <bruce.richardson@intel.com> writes: > For CI builds, turn on the checking of includes. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- Thanks for the efforts here. Acked-by: Aaron Conole <aconole@redhat.com> ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 0/8] add checking of header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (23 preceding siblings ...) 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 1/8] eal: add missing include to mcslock Bruce Richardson ` (8 more replies) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson 25 siblings, 9 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. The script "check-includes.sh" could be used for this job, but it was not called out in the documentation, so many contributors may not have been aware of it's existance. It also was difficult to run from a source-code directory, as the script did not automatically allow finding of headers from one DPDK library directory to another [this was probably based on running it on a build created by the "make" build system, where all headers were in a single directory]. To attempt to have a build-system integrated replacement, this patchset adds a "chkincs" app in the buildtools directory to verify this on an ongoing basis. This chkincs app does nothing when run, and is not installed as part of a DPDK "ninja install", it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, which was something done by the check-includes.sh script but which is missing here. V6: * Added release notes updates for: - renamed, no-longer-installed header files - new "check_includes" build option - removal of old check_includes script * Included acks from previous versions V5: * Removed private ethdev headers from checks and installing * Removed the ALLOW_INTERNAL_APIS macro from chkincs build. V4: * Fixed build errors with clang and arm builds * Added support for running chkincs as part of github actions CI V3: * Shrunk patchset as most header fixes already applied * Moved chkincs from "apps" to the "buildtools" directory, which is a better location for something not for installation for end-user use. * Added patch to drop check-includes script. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions Bruce Richardson (8): eal: add missing include to mcslock eal: fix error attribute use for clang rib: fix missing header include ethdev: make driver-only headers private build: separate out headers for include checking buildtools/chkincs: add app to verify header includes devtools: remove check-includes script ci: add checking of includes to CI builds .ci/linux-build.sh | 1 + MAINTAINERS | 5 +- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- buildtools/chkincs/gen_c_file_for_header.py | 12 + buildtools/chkincs/main.c | 4 + buildtools/chkincs/meson.build | 40 +++ devtools/check-includes.sh | 259 ------------------ devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 + doc/guides/rel_notes/release_21_02.rst | 18 ++ drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 +- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 +- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 +- drivers/net/cxgbe/cxgbe_main.c | 4 +- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 +- drivers/net/cxgbe/cxgbevf_main.c | 4 +- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 +- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_flow.c | 4 +- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 +- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 +- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 +- drivers/net/failsafe/failsafe.c | 4 +- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 +- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 +- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 +- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 +- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 +- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 +- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 +- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 +- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 +- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 +- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 +- drivers/net/memif/rte_eth_memif.c | 4 +- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 +- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 +- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 +- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 +- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 +- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 +- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 +- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 +- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 +- .../net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 +- drivers/net/tap/rte_eth_tap.c | 4 +- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 +- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 +- drivers/net/virtio/virtio_ethdev.c | 4 +- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/include/rte_compat.h | 8 +- lib/librte_eal/x86/include/meson.build | 14 +- .../{rte_ethdev_driver.h => ethdev_driver.h} | 0 .../{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- .../{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 8 +- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- lib/librte_hash/meson.build | 4 +- lib/librte_ipsec/meson.build | 3 +- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_rib/rte_rib6.h | 1 + lib/librte_ring/meson.build | 4 +- lib/librte_stack/meson.build | 4 +- lib/librte_table/meson.build | 7 +- lib/meson.build | 3 + meson.build | 6 + meson_options.txt | 2 + 275 files changed, 435 insertions(+), 579 deletions(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build delete mode 100755 devtools/check-includes.sh rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 1/8] eal: add missing include to mcslock 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang Bruce Richardson ` (7 subsequent siblings) 8 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Honnappa Nagarahalli, Gavin Hu, Steve Capper, Phil Yang Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 1/8] eal: add missing include to mcslock Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:00 ` David Marchand 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include Bruce Richardson ` (6 subsequent siblings) 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, haiyue.wang, Ray Kinsella, Neil Horman Clang does not have an "error" attribute for functions, so for marking internal functions we need to check for the error attribute, and provide a fallback if it is not present. For clang, we can use "diagnose_if" attribute, similarly checking for its presence before use. Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") Cc: haiyue.wang@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_compat.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 4cd8f68d68..c30f072aa3 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -19,12 +19,18 @@ __attribute__((section(".text.experimental"))) #endif -#ifndef ALLOW_INTERNAL_API +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ + +#define __rte_internal \ +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ +section(".text.internal"))) + #else #define __rte_internal \ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang Bruce Richardson @ 2021-01-28 11:00 ` David Marchand 2021-01-28 11:20 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-28 11:00 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Wang, Haiyue, Ray Kinsella, Neil Horman On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > Clang does not have an "error" attribute for functions, so for marking > internal functions we need to check for the error attribute, and provide > a fallback if it is not present. For clang, we can use "diagnose_if" > attribute, similarly checking for its presence before use. > > Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") > Cc: haiyue.wang@intel.com Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > lib/librte_eal/include/rte_compat.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h > index 4cd8f68d68..c30f072aa3 100644 > --- a/lib/librte_eal/include/rte_compat.h > +++ b/lib/librte_eal/include/rte_compat.h > @@ -19,12 +19,18 @@ __attribute__((section(".text.experimental"))) > > #endif > > -#ifndef ALLOW_INTERNAL_API > +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > > #define __rte_internal \ > __attribute__((error("Symbol is not public ABI"), \ > section(".text.internal"))) > > +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ > + > +#define __rte_internal \ > +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > +section(".text.internal"))) > + If the compiler has neither error or diagnose_if support, an internal API can be called without ALLOW_INTERNAL_API. I prefer a build error complaining on an unknown attribute rather than silence a check. I.e. #ifndef ALLOW_INTERNAL_API #if __has_attribute(diagnose_if) /* For clang */ #define __rte_internal \ __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ section(".text.internal"))) #else #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) #endif #else /* ALLOW_INTERNAL_API */ #define __rte_internal \ section(".text.internal"))) #endif -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 11:00 ` David Marchand @ 2021-01-28 11:20 ` Bruce Richardson 2021-01-28 13:36 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:20 UTC (permalink / raw) To: David Marchand; +Cc: dev, Wang, Haiyue, Ray Kinsella, Neil Horman On Thu, Jan 28, 2021 at 12:00:46PM +0100, David Marchand wrote: > On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > Clang does not have an "error" attribute for functions, so for marking > > internal functions we need to check for the error attribute, and provide > > a fallback if it is not present. For clang, we can use "diagnose_if" > > attribute, similarly checking for its presence before use. > > > > Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") > > Cc: haiyue.wang@intel.com > > Cc: stable@dpdk.org > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > lib/librte_eal/include/rte_compat.h | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h > > index 4cd8f68d68..c30f072aa3 100644 > > --- a/lib/librte_eal/include/rte_compat.h > > +++ b/lib/librte_eal/include/rte_compat.h > > @@ -19,12 +19,18 @@ __attribute__((section(".text.experimental"))) > > > > #endif > > > > -#ifndef ALLOW_INTERNAL_API > > +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > > > > #define __rte_internal \ > > __attribute__((error("Symbol is not public ABI"), \ > > section(".text.internal"))) > > > > +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ > > + > > +#define __rte_internal \ > > +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > +section(".text.internal"))) > > + > > If the compiler has neither error or diagnose_if support, an internal > API can be called without ALLOW_INTERNAL_API. > I prefer a build error complaining on an unknown attribute rather than > silence a check. > > I.e. > > #ifndef ALLOW_INTERNAL_API > > #if __has_attribute(diagnose_if) /* For clang */ > #define __rte_internal \ > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > section(".text.internal"))) > > #else > #define __rte_internal \ > __attribute__((error("Symbol is not public ABI"), \ > section(".text.internal"))) > > #endif > > #else /* ALLOW_INTERNAL_API */ > > #define __rte_internal \ > section(".text.internal"))) > > #endif > Would this not mean that if someone was using a compiler that supported neither that they could never include any header file which contained any internal functions? I'd rather err on the side of allowing this, on the basis that the symbol should be already documented as internal and this is only an additional sanity check. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 11:20 ` Bruce Richardson @ 2021-01-28 13:36 ` David Marchand 2021-01-28 14:16 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-28 13:36 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Wang, Haiyue, Ray Kinsella, Neil Horman On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > If the compiler has neither error or diagnose_if support, an internal > > API can be called without ALLOW_INTERNAL_API. > > I prefer a build error complaining on an unknown attribute rather than > > silence a check. > > > > I.e. > > > > #ifndef ALLOW_INTERNAL_API > > > > #if __has_attribute(diagnose_if) /* For clang */ > > #define __rte_internal \ > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > section(".text.internal"))) > > > > #else > > #define __rte_internal \ > > __attribute__((error("Symbol is not public ABI"), \ > > section(".text.internal"))) > > > > #endif > > > > #else /* ALLOW_INTERNAL_API */ > > > > #define __rte_internal \ > > section(".text.internal"))) > > > > #endif > > > > Would this not mean that if someone was using a compiler that supported > neither that they could never include any header file which contained any > internal functions? I'd rather err on the side of allowing this, on the > basis that the symbol should be already documented as internal and this is > only an additional sanity check. - Still not a fan. We will never know about those compilers behavior, like how we caught the clang issue and found an alternative. - I just caught a build error with RHEL7 gcc: [1/2127] Compiling C object lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o FAILED: lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o ccache cc -Ilib/librte_eal.a.p -Ilib -I../lib -I. -I.. -Iconfig -I../config -Ilib/librte_eal/include -I../lib/librte_eal/include -Ilib/librte_eal/linux/include -I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../lib/librte_eal/x86/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics -Ilib/librte_telemetry -I../lib/librte_telemetry -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API '-DABI_VERSION="21.1"' -MD -MQ lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o -MF lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o.d -o lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o -c ../lib/librte_eal/common/eal_common_config.c In file included from ../lib/librte_eal/include/rte_dev.h:24:0, from ../lib/librte_eal/common/eal_private.h:12, from ../lib/librte_eal/common/eal_common_config.c:9: ../lib/librte_eal/include/rte_compat.h:22:51: error: missing binary operator before token "(" #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ ^ ../lib/librte_eal/include/rte_compat.h:28:53: error: missing binary operator before token "(" #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ ^ I can see that gcc doc recommends checking for __has_attribute availability. Pasting from google cache, since the gcc.gnu.org doc website seems unavailable. """ 4.2.6 __has_attribute The special operator __has_attribute (operand) may be used in ‘#if’ and ‘#elif’ expressions to test whether the attribute referenced by its operand is recognized by GCC. Using the operator in other contexts is not valid. In C code, if compiling for strict conformance to standards before C2x, operand must be a valid identifier. Otherwise, operand may be optionally introduced by the attribute-scope:: prefix. The attribute-scope prefix identifies the “namespace” within which the attribute is recognized. The scope of GCC attributes is ‘gnu’ or ‘__gnu__’. The __has_attribute operator by itself, without any operand or parentheses, acts as a predefined macro so that support for it can be tested in portable code. Thus, the recommended use of the operator is as follows: #if defined __has_attribute # if __has_attribute (nonnull) # define ATTR_NONNULL __attribute__ ((nonnull)) # endif #endif The first ‘#if’ test succeeds only when the operator is supported by the version of GCC (or another compiler) being used. Only when that test succeeds is it valid to use __has_attribute as a preprocessor operator. As a result, combining the two tests into a single expression as shown below would only be valid with a compiler that supports the operator but not with others that don’t. #if defined __has_attribute && __has_attribute (nonnull) /* not portable */ … #endif """ -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 13:36 ` David Marchand @ 2021-01-28 14:16 ` Bruce Richardson 2021-01-28 15:16 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 14:16 UTC (permalink / raw) To: David Marchand; +Cc: dev, Wang, Haiyue, Ray Kinsella, Neil Horman On Thu, Jan 28, 2021 at 02:36:25PM +0100, David Marchand wrote: > On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > If the compiler has neither error or diagnose_if support, an internal > > > API can be called without ALLOW_INTERNAL_API. > > > I prefer a build error complaining on an unknown attribute rather than > > > silence a check. > > > > > > I.e. > > > > > > #ifndef ALLOW_INTERNAL_API > > > > > > #if __has_attribute(diagnose_if) /* For clang */ > > > #define __rte_internal \ > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > section(".text.internal"))) > > > > > > #else > > > #define __rte_internal \ > > > __attribute__((error("Symbol is not public ABI"), \ > > > section(".text.internal"))) > > > > > > #endif > > > > > > #else /* ALLOW_INTERNAL_API */ > > > > > > #define __rte_internal \ > > > section(".text.internal"))) > > > > > > #endif > > > > > > > Would this not mean that if someone was using a compiler that supported > > neither that they could never include any header file which contained any > > internal functions? I'd rather err on the side of allowing this, on the > > basis that the symbol should be already documented as internal and this is > > only an additional sanity check. > > - Still not a fan. > We will never know about those compilers behavior, like how we caught > the clang issue and found an alternative. > So I understand, but I'm still concerned about breaking something that was previously working. It's one thing a DPDK developer catching issues with clang, quite another a user catching it when trying to build their own application. We probably need some other opinions on this one. > > - I just caught a build error with RHEL7 gcc: > > [1/2127] Compiling C object > lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o > FAILED: lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o > ccache cc -Ilib/librte_eal.a.p -Ilib -I../lib -I. -I.. -Iconfig > -I../config -Ilib/librte_eal/include -I../lib/librte_eal/include > -Ilib/librte_eal/linux/include -I../lib/librte_eal/linux/include > -Ilib/librte_eal/x86/include -I../lib/librte_eal/x86/include > -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal > -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs > -Ilib/librte_metrics -I../lib/librte_metrics -Ilib/librte_telemetry > -I../lib/librte_telemetry -pipe -D_FILE_OFFSET_BITS=64 -Wall > -Winvalid-pch -O3 -include rte_config.h -Wextra -Wcast-qual > -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security > -Wmissing-declarations -Wmissing-prototypes -Wnested-externs > -Wold-style-definition -Wpointer-arith -Wsign-compare > -Wstrict-prototypes -Wundef -Wwrite-strings > -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native > -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API '-DABI_VERSION="21.1"' > -MD -MQ lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o -MF > lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o.d -o > lib/librte_eal.a.p/librte_eal_common_eal_common_config.c.o -c > ../lib/librte_eal/common/eal_common_config.c > In file included from ../lib/librte_eal/include/rte_dev.h:24:0, > from ../lib/librte_eal/common/eal_private.h:12, > from ../lib/librte_eal/common/eal_common_config.c:9: > ../lib/librte_eal/include/rte_compat.h:22:51: error: missing binary > operator before token "(" > #if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ > ^ > ../lib/librte_eal/include/rte_compat.h:28:53: error: missing binary > operator before token "(" > #elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* > For clang */ > ^ > > I can see that gcc doc recommends checking for __has_attribute availability. > Pasting from google cache, since the gcc.gnu.org doc website seems unavailable. > > """ > 4.2.6 __has_attribute > > The special operator __has_attribute (operand) may be used in ‘#if’ > and ‘#elif’ expressions to test whether the attribute referenced by > its operand is recognized by GCC. Using the operator in other contexts > is not valid. In C code, if compiling for strict conformance to > standards before C2x, operand must be a valid identifier. Otherwise, > operand may be optionally introduced by the attribute-scope:: prefix. > The attribute-scope prefix identifies the “namespace” within which the > attribute is recognized. The scope of GCC attributes is ‘gnu’ or > ‘__gnu__’. The __has_attribute operator by itself, without any operand > or parentheses, acts as a predefined macro so that support for it can > be tested in portable code. Thus, the recommended use of the operator > is as follows: > > #if defined __has_attribute > # if __has_attribute (nonnull) > # define ATTR_NONNULL __attribute__ ((nonnull)) > # endif > #endif > > The first ‘#if’ test succeeds only when the operator is supported by > the version of GCC (or another compiler) being used. Only when that > test succeeds is it valid to use __has_attribute as a preprocessor > operator. As a result, combining the two tests into a single > expression as shown below would only be valid with a compiler that > supports the operator but not with others that don’t. > > #if defined __has_attribute && __has_attribute (nonnull) /* not portable */ > … > #endif > """ > I really wish other tools would do like meson and document per-feature the version in which it was introduced! Anyway, this is something I'll fix in next version, though again we need to decide in the case of __has_attribute not being supported do we fall to erroring out? Again that runs the risk of users not being able to include a header which has an internal function, so I'd prefer us to ignore errors if the appropriate macros are unsupported. Again, other opinions probably needed. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 14:16 ` Bruce Richardson @ 2021-01-28 15:16 ` Bruce Richardson 2021-01-28 16:46 ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 15:16 UTC (permalink / raw) To: David Marchand, techboard; +Cc: dev On Thu, Jan 28, 2021 at 02:16:10PM +0000, Bruce Richardson wrote: > On Thu, Jan 28, 2021 at 02:36:25PM +0100, David Marchand wrote: > > On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson > > <bruce.richardson@intel.com> wrote: > > > > If the compiler has neither error or diagnose_if support, an internal > > > > API can be called without ALLOW_INTERNAL_API. > > > > I prefer a build error complaining on an unknown attribute rather than > > > > silence a check. > > > > > > > > I.e. > > > > > > > > #ifndef ALLOW_INTERNAL_API > > > > > > > > #if __has_attribute(diagnose_if) /* For clang */ > > > > #define __rte_internal \ > > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > > section(".text.internal"))) > > > > > > > > #else > > > > #define __rte_internal \ > > > > __attribute__((error("Symbol is not public ABI"), \ > > > > section(".text.internal"))) > > > > > > > > #endif > > > > > > > > #else /* ALLOW_INTERNAL_API */ > > > > > > > > #define __rte_internal \ > > > > section(".text.internal"))) > > > > > > > > #endif > > > > > > > > > > Would this not mean that if someone was using a compiler that supported > > > neither that they could never include any header file which contained any > > > internal functions? I'd rather err on the side of allowing this, on the > > > basis that the symbol should be already documented as internal and this is > > > only an additional sanity check. > > > > - Still not a fan. > > We will never know about those compilers behavior, like how we caught > > the clang issue and found an alternative. > > > > So I understand, but I'm still concerned about breaking something that was > previously working. It's one thing a DPDK developer catching issues with > clang, quite another a user catching it when trying to build their own > application. > > We probably need some other opinions on this one. > Adding Tech-board to see if we can get some more thoughts on this before I do another revision of this set. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [dpdk-techboard] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 15:16 ` Bruce Richardson @ 2021-01-28 16:46 ` Thomas Monjalon 2021-01-28 17:36 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 16:46 UTC (permalink / raw) To: David Marchand, Bruce Richardson; +Cc: techboard, dev 28/01/2021 16:16, Bruce Richardson: > On Thu, Jan 28, 2021 at 02:16:10PM +0000, Bruce Richardson wrote: > > On Thu, Jan 28, 2021 at 02:36:25PM +0100, David Marchand wrote: > > > On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson > > > <bruce.richardson@intel.com> wrote: > > > > > If the compiler has neither error or diagnose_if support, an internal > > > > > API can be called without ALLOW_INTERNAL_API. > > > > > I prefer a build error complaining on an unknown attribute rather than > > > > > silence a check. > > > > > > > > > > I.e. > > > > > > > > > > #ifndef ALLOW_INTERNAL_API > > > > > > > > > > #if __has_attribute(diagnose_if) /* For clang */ > > > > > #define __rte_internal \ > > > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > > > section(".text.internal"))) > > > > > > > > > > #else > > > > > #define __rte_internal \ > > > > > __attribute__((error("Symbol is not public ABI"), \ > > > > > section(".text.internal"))) > > > > > > > > > > #endif > > > > > > > > > > #else /* ALLOW_INTERNAL_API */ > > > > > > > > > > #define __rte_internal \ > > > > > section(".text.internal"))) > > > > > > > > > > #endif > > > > > > > > > > > > > Would this not mean that if someone was using a compiler that supported > > > > neither that they could never include any header file which contained any > > > > internal functions? I'd rather err on the side of allowing this, on the > > > > basis that the symbol should be already documented as internal and this is > > > > only an additional sanity check. > > > > > > - Still not a fan. > > > We will never know about those compilers behavior, like how we caught > > > the clang issue and found an alternative. > > > > > > > So I understand, but I'm still concerned about breaking something that was > > previously working. It's one thing a DPDK developer catching issues with > > clang, quite another a user catching it when trying to build their own > > application. > > > > We probably need some other opinions on this one. > > > Adding Tech-board to see if we can get some more thoughts on this before I do > another revision of this set. What are the alternatives? ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [dpdk-techboard] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 16:46 ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon @ 2021-01-28 17:36 ` Bruce Richardson 2021-01-29 8:35 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 17:36 UTC (permalink / raw) To: Thomas Monjalon; +Cc: David Marchand, techboard, dev On Thu, Jan 28, 2021 at 05:46:16PM +0100, Thomas Monjalon wrote: > 28/01/2021 16:16, Bruce Richardson: > > On Thu, Jan 28, 2021 at 02:16:10PM +0000, Bruce Richardson wrote: > > > On Thu, Jan 28, 2021 at 02:36:25PM +0100, David Marchand wrote: > > > > On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson > > > > <bruce.richardson@intel.com> wrote: > > > > > > If the compiler has neither error or diagnose_if support, an internal > > > > > > API can be called without ALLOW_INTERNAL_API. > > > > > > I prefer a build error complaining on an unknown attribute rather than > > > > > > silence a check. > > > > > > > > > > > > I.e. > > > > > > > > > > > > #ifndef ALLOW_INTERNAL_API > > > > > > > > > > > > #if __has_attribute(diagnose_if) /* For clang */ > > > > > > #define __rte_internal \ > > > > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > > > > section(".text.internal"))) > > > > > > > > > > > > #else > > > > > > #define __rte_internal \ > > > > > > __attribute__((error("Symbol is not public ABI"), \ > > > > > > section(".text.internal"))) > > > > > > > > > > > > #endif > > > > > > > > > > > > #else /* ALLOW_INTERNAL_API */ > > > > > > > > > > > > #define __rte_internal \ > > > > > > section(".text.internal"))) > > > > > > > > > > > > #endif > > > > > > > > > > > > > > > > Would this not mean that if someone was using a compiler that supported > > > > > neither that they could never include any header file which contained any > > > > > internal functions? I'd rather err on the side of allowing this, on the > > > > > basis that the symbol should be already documented as internal and this is > > > > > only an additional sanity check. > > > > > > > > - Still not a fan. > > > > We will never know about those compilers behavior, like how we caught > > > > the clang issue and found an alternative. > > > > > > > > > > So I understand, but I'm still concerned about breaking something that was > > > previously working. It's one thing a DPDK developer catching issues with > > > clang, quite another a user catching it when trying to build their own > > > application. > > > > > > We probably need some other opinions on this one. > > > > > Adding Tech-board to see if we can get some more thoughts on this before I do > > another revision of this set. > > What are the alternatives? > The basic problem is what to do when a compiler is used which does not support the required macros to flag an error for use of an internal-only function. For example, we discovered this because clang does not support the #error macro. In those cases, as I see it, we really have two choices: 1 ignore flagging the error and silently allow possible use of the internal function. 2 have the compiler flag an error for an unknown macro The problem that I have with #2 is that without knowing the macro, the compiler will likely error out any time a user app includes any header with an internal function, even if the function is unused. On the other hand, the likelihood of impact if we choose #2 and do error out is quite small, since modern clang versions will support the modern macro checks we need, and just about any gcc versions we care about are going to support #error. For #1, the downside is that we will miss error checks on some older versions of gcc e.g. RHEL 7, and the user may inadvertently use an internal function without knowing it. David, anything else to add here? /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [dpdk-techboard] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-28 17:36 ` Bruce Richardson @ 2021-01-29 8:35 ` David Marchand 2021-01-29 8:54 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-29 8:35 UTC (permalink / raw) To: Bruce Richardson; +Cc: Thomas Monjalon, techboard, dev On Thu, Jan 28, 2021 at 6:36 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > > > > We will never know about those compilers behavior, like how we caught > > > > > the clang issue and found an alternative. > > > > > > > > > > > > > So I understand, but I'm still concerned about breaking something that was > > > > previously working. It's one thing a DPDK developer catching issues with > > > > clang, quite another a user catching it when trying to build their own > > > > application. > > > > > > > > We probably need some other opinions on this one. > > > > > > > Adding Tech-board to see if we can get some more thoughts on this before I do > > > another revision of this set. > > > > What are the alternatives? > > > > The basic problem is what to do when a compiler is used which does not support > the required macros to flag an error for use of an internal-only function. > For example, we discovered this because clang does not support the #error > macro. *attribute* > > In those cases, as I see it, we really have two choices: > > 1 ignore flagging the error and silently allow possible use of the internal > function. > 2 have the compiler flag an error for an unknown macro > > The problem that I have with #2 is that without knowing the macro, the > compiler will likely error out any time a user app includes any header with > an internal function, even if the function is unused. > > On the other hand, the likelihood of impact if we choose #2 and do error out is > quite small, since modern clang versions will support the modern macro > checks we need, and just about any gcc versions we care about are going to > support #error. > > For #1, the downside is that we will miss error checks on some older > versions of gcc e.g. RHEL 7, and the user may inadvertently use an internal > function without knowing it. > > David, anything else to add here? Nop, fair summary. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [dpdk-techboard] [PATCH v6 2/8] eal: fix error attribute use for clang 2021-01-29 8:35 ` David Marchand @ 2021-01-29 8:54 ` Thomas Monjalon 0 siblings, 0 replies; 165+ messages in thread From: Thomas Monjalon @ 2021-01-29 8:54 UTC (permalink / raw) To: Bruce Richardson, David Marchand; +Cc: techboard, dev 29/01/2021 09:35, David Marchand: > On Thu, Jan 28, 2021 at 6:36 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > > > We will never know about those compilers behavior, like how we caught > > > > > > the clang issue and found an alternative. > > > > > > > > > > > > > > > > So I understand, but I'm still concerned about breaking something that was > > > > > previously working. It's one thing a DPDK developer catching issues with > > > > > clang, quite another a user catching it when trying to build their own > > > > > application. > > > > > > > > > > We probably need some other opinions on this one. > > > > > > > > > Adding Tech-board to see if we can get some more thoughts on this before I do > > > > another revision of this set. > > > > > > What are the alternatives? > > > > > > > The basic problem is what to do when a compiler is used which does not support > > the required macros to flag an error for use of an internal-only function. > > For example, we discovered this because clang does not support the #error > > macro. > > *attribute* > > > > > In those cases, as I see it, we really have two choices: > > > > 1 ignore flagging the error and silently allow possible use of the internal > > function. > > 2 have the compiler flag an error for an unknown macro > > > > The problem that I have with #2 is that without knowing the macro, the > > compiler will likely error out any time a user app includes any header with > > an internal function, even if the function is unused. > > > > On the other hand, the likelihood of impact if we choose #2 and do error out is > > quite small, since modern clang versions will support the modern macro > > checks we need, and just about any gcc versions we care about are going to > > support #error. If there are very small chances of hitting the issue, it looks acceptable. But I don't really like risking issues with not tested compilers. > > For #1, the downside is that we will miss error checks on some older > > versions of gcc e.g. RHEL 7, and the user may inadvertently use an internal > > function without knowing it. The function is marked as internal. If the user misses this info and test only with compilers not supporting the attribute, that's no luck. What would be the consequence? Having a risk for future compatibility? It looks to be an acceptable risk. The other consequence it that we won't have reports for this rare incompatibility. > > David, anything else to add here? > > Nop, fair summary. My preference is for #1: pro: No compilation will be impacted in the field con: DPDK developers may miss some cases Any other opinion? ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 1/8] eal: add missing include to mcslock Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:01 ` David Marchand 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson ` (5 subsequent siblings) 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, vladimir.medvedkin The rte_rib6 header was using RTE_MIN macro from rte_common.h but not including the header file. Fixes: f7e861e21c46 ("rib: support IPv6") Cc: vladimir.medvedkin@intel.com Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> --- lib/librte_rib/rte_rib6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index b5e10569b9..dbd52928a2 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -20,6 +20,7 @@ #include <rte_memcpy.h> #include <rte_compat.h> +#include <rte_common.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include Bruce Richardson @ 2021-01-28 11:01 ` David Marchand 2021-01-28 11:20 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-28 11:01 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Vladimir Medvedkin On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > The rte_rib6 header was using RTE_MIN macro from rte_common.h but not > including the header file. > > Fixes: f7e861e21c46 ("rib: support IPv6") > Cc: vladimir.medvedkin@intel.com Cc: stable@dpdk.org Or was it intentionally skipped? -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include 2021-01-28 11:01 ` David Marchand @ 2021-01-28 11:20 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:20 UTC (permalink / raw) To: David Marchand; +Cc: dev, Vladimir Medvedkin On Thu, Jan 28, 2021 at 12:01:02PM +0100, David Marchand wrote: > On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > The rte_rib6 header was using RTE_MIN macro from rte_common.h but not > > including the header file. > > > > Fixes: f7e861e21c46 ("rib: support IPv6") > > Cc: vladimir.medvedkin@intel.com > > Cc: stable@dpdk.org > Or was it intentionally skipped? > Nope, just a miss on my part. Apologies. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (2 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-27 17:48 ` Maxime Coquelin ` (3 more replies) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking Bruce Richardson ` (4 subsequent siblings) 8 siblings, 4 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- doc/guides/rel_notes/release_21_02.rst | 7 +++++++ drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++-- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 ++-- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 ++-- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_main.c | 4 ++-- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbevf_main.c | 4 ++-- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 ++-- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/e1000/igb_flow.c | 4 ++-- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 ++-- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 ++-- drivers/net/failsafe/failsafe.c | 4 ++-- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 ++-- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 ++-- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 ++-- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 ++-- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 ++-- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 ++-- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 ++-- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 ++-- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 ++-- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 ++-- drivers/net/memif/rte_eth_memif.c | 4 ++-- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 ++-- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 ++-- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 ++-- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 ++-- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 ++-- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 ++-- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 4 ++-- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 ++-- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 ++-- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++-- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} | 0 lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 3 --- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- 252 files changed, 302 insertions(+), 298 deletions(-) rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index e8b76bd850..8a5c8310a8 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -17,7 +17,7 @@ #include <rte_common.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_lcore.h> #include <rte_memory.h> diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c index 21fcc1bc4c..b49fcfb3f1 100644 --- a/app/test/test_pdump.c +++ b/app/test/test_pdump.c @@ -6,7 +6,7 @@ #include <stdint.h> #include <limits.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pdump.h> #include "rte_eal.h" #include "rte_lcore.h" diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 2c24c9b3f5..7036f401ed 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -4,7 +4,7 @@ #include <rte_mbuf.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_malloc.h> diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index ae36b6a3fa..33bac4fff8 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -140,6 +140,13 @@ Removed Items PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` ``0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9`` has been removed. +* The internal header files ``rte_ethdev_driver.h``, ``rte_ethdev_vdev.h`` and + ``rte_ethdev_pci.h`` are no longer installed as part of the DPDK ``ninja + install`` action and are renamed to ``ethdev_driver.h``, ``ethdev_vdev.h`` and + ``ethdev_pci.h`` respectively in the source tree, to reflect the fact that + they are non-public headers. + + API Changes ----------- diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f39d6e2092..662cbfaae5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -27,7 +27,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_bus.h> diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h index f2b0bf91e7..516c6c1515 100644 --- a/drivers/bus/dpaa/include/fman.h +++ b/drivers/bus/dpaa/include/fman.h @@ -12,7 +12,7 @@ #include <stdbool.h> #include <net/if.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <compat.h> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 58435589b2..26910ac01f 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_devargs.h> #include <rte_memcpy.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_dyn.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index b52f36c33e..c8373e627a 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -22,7 +22,7 @@ #include <eal_filesystem.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index d9619848d8..122aa1740d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -19,7 +19,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_pool_ops.h> #include <fslmc_logs.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c index d393ce6186..8ed969c7c0 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <fslmc_logs.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 1a9dd18b99..c6f8312a1d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -24,7 +24,7 @@ #include<sys/eventfd.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index eeb2494bd0..e4fa3a2e46 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -24,7 +24,7 @@ #include <rte_memory.h> #include <rte_pci.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cryptodev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index 200b71640b..acc1fde771 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_fslmc.h> #include <mc/fsl_dpcon.h> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index e60a7dc69e..17325bbf6a 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -8,7 +8,7 @@ #include <rte_debug.h> #include <rte_dev.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <rte_kvargs.h> #include <rte_lcore.h> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 97ce08d78f..ca49a8d42a 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -14,7 +14,7 @@ #include <errno.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 671ee87ae2..bfe5a0a451 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 703b7417ed..b8d5ad0d91 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -19,8 +19,8 @@ #include <bpf/xsk.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index a658993512..ef650a4658 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -7,7 +7,7 @@ #include <dlfcn.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "rte_pmd_ark.h" diff --git a/drivers/net/ark/ark_ethdev_rx.h b/drivers/net/ark/ark_ethdev_rx.h index 001fa9bdfa..33c1f2c953 100644 --- a/drivers/net/ark/ark_ethdev_rx.h +++ b/drivers/net/ark/ark_ethdev_rx.h @@ -9,7 +9,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> extern uint64_t ark_timestamp_rx_dynflag; extern int ark_timestamp_dynfield_offset; diff --git a/drivers/net/ark/ark_ethdev_tx.h b/drivers/net/ark/ark_ethdev_tx.h index e448ce2225..12c71a7158 100644 --- a/drivers/net/ark/ark_ethdev_tx.h +++ b/drivers/net/ark/ark_ethdev_tx.h @@ -7,7 +7,7 @@ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> uint16_t eth_ark_xmit_pkts_noop(void *vtxq, diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h index 5a987e4d67..821fb55bba 100644 --- a/drivers/net/ark/ark_ext.h +++ b/drivers/net/ark/ark_ext.h @@ -5,7 +5,7 @@ #ifndef _ARK_EXT_H_ #define _ARK_EXT_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /* * This is the template file for users who which to define a dynamic diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h index 403df5900b..91726ecc20 100644 --- a/drivers/net/ark/ark_global.h +++ b/drivers/net/ark/ark_global.h @@ -9,7 +9,7 @@ #include <assert.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c index b8fb69497d..0f2d31e5be 100644 --- a/drivers/net/ark/ark_pktchkr.c +++ b/drivers/net/ark/ark_pktchkr.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktchkr.h" diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 4a02662a46..ac4322a359 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktgen.h" diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index b0716773ad..473f6209f6 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 449ffd454d..7d367c9306 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atlantic/atl_rxtx.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/rte_pmd_atlantic.c b/drivers/net/atlantic/rte_pmd_atlantic.c index 2962f5c6cb..00fc2872e5 100644 --- a/drivers/net/atlantic/rte_pmd_atlantic.c +++ b/drivers/net/atlantic/rte_pmd_atlantic.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Aquantia Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "rte_pmd_atlantic.h" #include "atl_ethdev.h" diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index f531e03c02..566a3606a2 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_malloc.h> diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 91404ca01c..b83fdcca85 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -35,7 +35,7 @@ #include <rte_ethdev.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_common.h> #include <rte_cycles.h> #include <rte_io.h> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index d35c75a2e2..50db70dfcd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_dev.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> /* diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h index f712bb3e84..fa1c3ba955 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -31,7 +31,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_eal.h> #include <rte_mempool.h> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d2d76b623a..0db6e58f3d 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -12,7 +12,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> #include <rte_lcore.h> #include <rte_spinlock.h> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 74b0f3d1dc..e8a7a8ecd4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -7,8 +7,8 @@ #include <stdbool.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_alarm.h> diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h index 3cf2a1b822..50c3d92b9a 100644 --- a/drivers/net/bnxt/bnxt_stats.h +++ b/drivers/net/bnxt/bnxt_stats.h @@ -6,7 +6,7 @@ #ifndef _BNXT_STATS_H_ #define _BNXT_STATS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> void bnxt_free_stats(struct bnxt *bp); int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index d67db46c65..965381c0c4 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_byteorder.h> diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h index 8f198bd50e..75fb8dc02e 100644 --- a/drivers/net/bonding/eth_bond_private.h +++ b/drivers/net/bonding/eth_bond_private.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_spinlock.h> #include <rte_bitmap.h> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 55c8e3167c..17e6ff8b90 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -6,7 +6,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 66ab8dd693..5241c60089 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -7,8 +7,8 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_tcp.h> #include <rte_udp.h> #include <rte_ip.h> diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index ef20dc6675..0e3033b550 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -16,7 +16,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c index cd011bc1b8..561d759dbc 100644 --- a/drivers/net/cxgbe/base/t4vf_hw.c +++ b/drivers/net/cxgbe/base/t4vf_hw.c @@ -3,7 +3,7 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include "common.h" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index cfa385bab7..bfa57c979d 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -28,8 +28,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 3b56eccfbe..83ad758e88 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <rte_dev.h> #include <rte_kvargs.h> diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c index c2918f5356..bf1815c25f 100644 --- a/drivers/net/cxgbe/cxgbevf_ethdev.c +++ b/drivers/net/cxgbe/cxgbevf_ethdev.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include "cxgbe.h" #include "cxgbe_pfvf.h" diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index 9ee060504f..f639612ae4 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include "base/common.h" diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 8c7dbe3a1d..56b8ec1f33 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -28,7 +28,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0c87c136d7..d643514de6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -29,7 +29,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index a858b1372c..b5728e09c2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -9,7 +9,7 @@ /* System headers */ #include <stdbool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <fsl_usd.h> diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index e2459d9b99..e38fba23c0 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -26,7 +26,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_ip.h> diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index 25b1d2bb6d..87c893db51 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 6f38da3cce..38774e255b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 9cca6d16c3..003b379fa7 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 2036c6e917..9b8c4a7de5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -15,8 +15,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 19e3bffd46..db5d1222ce 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index dfe87508c2..ec355cbf35 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index ccb184df95..33f6b1d6b3 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -15,8 +15,8 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_atomic.h> diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index 9d74c08abe..2ce74dd5a9 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -16,7 +16,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dd520cd82c..1500d2ffff 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 20ff3653c6..c796af4aa7 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -5,8 +5,8 @@ #include <rte_string_fns.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_tcp.h> #include <rte_atomic.h> #include <rte_dev.h> diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 4d2c9c0474..0b45168c60 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -3,7 +3,7 @@ */ #include <stdbool.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <dpaax_iova_table.h> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 1c8d60e264..b3f441c8f7 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -9,8 +9,8 @@ #include <rte_dev.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_string_fns.h> diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 1eec96abca..97ee7509ce 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_ip.h> diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index ad1e89a581..21d9b1cef7 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_hash.h> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 805eb5e46a..2a06d46872 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "enic_compat.h" #include "enic.h" diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 1405db15ab..689bf748ae 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -4,7 +4,7 @@ */ #include "enic_compat.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "wq_enet_desc.h" #include "rq_enet_desc.h" #include "cq_enet_desc.h" diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 4b6b97eb10..a2a02227e3 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_prefetch.h> diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c index f0bea33423..1848f52717 100644 --- a/drivers/net/enic/enic_rxtx_vec_avx2.c +++ b/drivers/net/enic/enic_rxtx_vec_avx2.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vect.h> #include "enic_compat.h" diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c index c2c03c0281..f7b79c1c4e 100644 --- a/drivers/net/enic/enic_vf_representor.c +++ b/drivers/net/enic/enic_vf_representor.c @@ -8,8 +8,8 @@ #include <rte_bus_pci.h> #include <rte_common.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_flow_driver.h> #include <rte_kvargs.h> #include <rte_pci.h> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index ba81c82174..e3bda0df2b 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -7,8 +7,8 @@ #include <rte_alarm.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_devargs.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 492047f587..2b6ca9080d 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -9,7 +9,7 @@ #include <rte_debug.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h index 0f9a572af8..cd39d103c6 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -12,7 +12,7 @@ #include <rte_atomic.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_devargs.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c index fee08fa23c..fe67293299 100644 --- a/drivers/net/failsafe/failsafe_rxtx.c +++ b/drivers/net/failsafe/failsafe_rxtx.c @@ -6,7 +6,7 @@ #include <rte_atomic.h> #include <rte_debug.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "failsafe_private.h" diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c187088a33..fd471c415e 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2,8 +2,8 @@ * Copyright(c) 2013-2016 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_string_fns.h> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 4accaa2cd6..8585c5b9e4 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_net.h> #include "fm10k.h" diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index 6fcc939ad9..39e3cdac1f 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "fm10k.h" #include "base/fm10k_type.h" diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c index 41c99bdbf8..cb9cf6efa2 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Huawei Technologies Co., Ltd */ -#include<rte_ethdev_driver.h> +#include<ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_hash.h> #include <rte_jhash.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 5a2c171099..1d6b710c9f 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -4,7 +4,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index c7338d83be..70b4d32ff2 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index f58f4f7adc..45dbead512 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 449d967784..a796469435 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4,7 +4,7 @@ #include <rte_alarm.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 0d17170fa7..6374a76794 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -6,7 +6,7 @@ #define _HNS3_ETHDEV_H_ #include <sys/time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_byteorder.h> #include <rte_io.h> #include <rte_spinlock.h> diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index bb4ec6bb39..394ffe38cd 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -4,7 +4,7 @@ #include <linux/pci_regs.h> #include <rte_alarm.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_pci.h> #include <rte_vfio.h> diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 857cc94c98..896540df78 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index d2a5db8aab..1d500b984c 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c index ed2567a8ff..3342a781ad 100644 --- a/drivers/net/hns3/hns3_mp.c +++ b/drivers/net/hns3/hns3_mp.c @@ -3,7 +3,7 @@ */ #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index f2cb465eed..01550458b7 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0badfc9260..676962553f 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -6,7 +6,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_net.h> #include <rte_malloc.h> diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c index a26c83d146..2bc4372449 100644 --- a/drivers/net/hns3/hns3_rxtx_vec.c +++ b/drivers/net/hns3/hns3_rxtx_vec.c @@ -3,7 +3,7 @@ */ #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 8c2c8f6108..b02bae7a0d 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -4,7 +4,7 @@ #include <arm_sve.h> #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 946994b80a..d7cd049891 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memzone.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 5d7db7fe13..2909b4d894 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -25,8 +25,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index f5defcf585..c572d003cb 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_memzone.h> #include <rte_malloc.h> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7fe760dba2..4d44282312 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 65d649b627..f3d6d899f6 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -14,7 +14,7 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 89560d4ee5..00db6c88a3 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c index d3238bfb6a..e6e468752c 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c +++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index e5a1deaeb2..ea554b4fda 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index e92f97b7ed..80b153e8f6 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 31f73f6054..33cebbe88b 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _I40E_RXTX_VEC_COMMON_H_ #define _I40E_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "i40e_ethdev.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index f094de69ae..d81269624e 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 0bcb48e24e..45fce0a022 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 9e40406a3d..7ed47c1a2c 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -7,7 +7,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h" diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index cf6ea0b15c..e9c8c1157a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -19,8 +19,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index f48f574a5d..4e864b4b9c 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index aabbcf34c2..8635ff83ca 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 958c73c4fb..f437fc3170 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1ddbad0f1f..3d471d9acc 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index 7ad1e0f68a..46a18732d3 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IAVF_RXTX_VEC_COMMON_H_ #define _IAVF_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c index 75c77f9d32..8574d0830f 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 3ef29d509d..8add888987 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -16,8 +16,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include "iavf.h" diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c index 363ce68318..113cb68765 100644 --- a/drivers/net/ice/ice_acl_filter.c +++ b/drivers/net/ice/ice_acl_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 4a9af3292c..dbe42fa3df 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -17,8 +17,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h index ff029963bf..0cb90b5e9f 100644 --- a/drivers/net/ice/ice_dcf.h +++ b/drivers/net/ice/ice_dcf.h @@ -5,7 +5,7 @@ #ifndef _ICE_DCF_H_ #define _ICE_DCF_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <iavf_prototype.h> #include <iavf_adminq_cmd.h> diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index ea1f2951ba..86f70cf7ff 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -14,7 +14,7 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_memzone.h> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index ec29f0fe40..c021d7ab6c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <stdio.h> #include <sys/types.h> diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 2b03c59671..7e9cbd2e9a 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -7,7 +7,7 @@ #include <rte_kvargs.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ice_common.h" #include "base/ice_adminq_cmd.h" diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index c4496dbbe1..25d15a8adb 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 2d23c8dd50..322df649b1 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 7286e3a445..6727d94c04 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_vect.h> diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 7bac77ecd1..5ca0985e21 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 802212fc57..dbaa7a83e5 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/igc/igc_filter.h b/drivers/net/igc/igc_filter.h index 877f51c88b..df8516bc40 100644 --- a/drivers/net/igc/igc_filter.h +++ b/drivers/net/igc/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eth_ctrl.h> #include "igc_ethdev.h" diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 4654ec41f0..c0a5d5e84f 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -4,7 +4,7 @@ #include <rte_config.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "igc_logs.h" diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 2face7c635..ded3ffe48d 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -5,9 +5,9 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "ionic_logs.h" #include "ionic.h" diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index f39b54e8ef..f3d55c0fa6 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ionic.h" #include "ionic_logs.h" diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 5d0e9d5d5a..61ad396469 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c index 4446d2af9e..f8e751cb09 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c @@ -11,7 +11,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h index a6815a9cca..ba3f8821e2 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h @@ -15,8 +15,8 @@ #include <rte_mbuf.h> #include <rte_flow_driver.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c index f857e64afb..c702e19ea5 100644 --- a/drivers/net/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/ipn3ke/ipn3ke_flow.c @@ -13,7 +13,7 @@ #include <rte_io.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 9e15cce34f..856d21ef9b 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_io.h> diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index 17ac026d38..6a9b98fd7f 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ixgbe/ixgbe_bypass.c b/drivers/net/ixgbe/ixgbe_bypass.c index ae38ce3559..67ced6c723 100644 --- a/drivers/net/ixgbe/ixgbe_bypass.c +++ b/drivers/net/ixgbe/ixgbe_bypass.c @@ -4,7 +4,7 @@ #include <time.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_bypass_api.h" #include "rte_pmd_ixgbe.h" diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c8b9ec8c11..761a0f26bb 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 11b9effeba..27a49bbce5 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -13,7 +13,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_logs.h" diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 9aeb2e4a49..0b10e91a9b 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -25,7 +25,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index 62f2a5f764..e45c5501e6 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -2,8 +2,8 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ip.h> #include <rte_jhash.h> #include <rte_security_driver.h> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 15982af8da..fbf2b17d16 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index cc8f70e6dd..470cf12dec 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -33,7 +33,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h index a97c27189b..adba855ca3 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IXGBE_RXTX_VEC_COMMON_H_ #define _IXGBE_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_rxtx.h" diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c index a5a5b2167f..f83b800ad9 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c index 90c076825a..9bbffe6119 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c index 8185f0d3bb..d5b636a194 100644 --- a/drivers/net/ixgbe/ixgbe_vf_representor.c +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c @@ -6,7 +6,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d2f708242c..cf089cd9ae 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -2,7 +2,7 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ixgbe_api.h" #include "base/ixgbe_x550.h" diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 1696787a9b..9ce74e549b 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -7,8 +7,8 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kni.h> #include <rte_kvargs.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index ddbc8c0e0c..c6b8310b71 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -4,7 +4,7 @@ #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_mbox.c b/drivers/net/liquidio/base/lio_mbox.c index 1129001515..2ac2b1b334 100644 --- a/drivers/net/liquidio/base/lio_mbox.c +++ b/drivers/net/liquidio/base/lio_mbox.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include "lio_logs.h" diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index eb0fdab45a..0b189d5d15 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -3,8 +3,8 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_cycles.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 8d705bfe7f..a067b60e47 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index c526f90778..5b373738e6 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -13,8 +13,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 8ed9aebab7..77c95bcb7a 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -17,8 +17,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 765a7e5998..24321d3a39 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -11,7 +11,7 @@ #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d5d8c96351..27af426363 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -33,8 +33,8 @@ #include <rte_common.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c6cb29493e..63df8fcf2b 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 9ff05c6738..783ff94dce 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -34,7 +34,7 @@ #include <rte_bus_pci.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_pci.h> diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 2a86382db7..b8ecfa829b 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -27,7 +27,7 @@ #include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 26465c66a4..e4366f28bb 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -18,7 +18,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_byteorder.h> diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index 6786b12ab5..d56009c418 100644 --- a/drivers/net/mlx4/mlx4_intr.c +++ b/drivers/net/mlx4/mlx4_intr.c @@ -23,7 +23,7 @@ #include <rte_alarm.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c index eca0c20a8a..e05da89c0e 100644 --- a/drivers/net/mlx4/mlx4_mp.c +++ b/drivers/net/mlx4/mlx4_mp.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include "mlx4.h" diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index 0699bdd5f2..978cbb8201 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -26,7 +26,7 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h index 9de6c59411..7c72ce6d17 100644 --- a/drivers/net/mlx4/mlx4_rxtx.h +++ b/drivers/net/mlx4/mlx4_rxtx.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c index 37b84413fb..8262071505 100644 --- a/drivers/net/mlx4/mlx4_txq.c +++ b/drivers/net/mlx4/mlx4_txq.c @@ -27,7 +27,7 @@ #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e36a78091c..0e8de9439e 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -24,7 +24,7 @@ #include <sys/un.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c index 08ade75799..60fdee22a1 100644 --- a/drivers/net/mlx5/linux/mlx5_mp_os.c +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 9ac1d46b1b..7efa7c6cd2 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -16,8 +16,8 @@ #include <fcntl.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c index 318e39b1df..43ff85f9c4 100644 --- a/drivers/net/mlx5/linux/mlx5_verbs.c +++ b/drivers/net/mlx5/linux/mlx5_verbs.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 40e895e080..005904bdfe 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -14,7 +14,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3730f32295..50a6d2b19f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -11,8 +11,8 @@ #include <errno.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 101e9c20d0..4bbf628885 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -15,7 +15,7 @@ #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_rwlock.h> #include <rte_interrupts.h> #include <rte_errno.h> diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 85a0979653..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,7 +6,7 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vxlan.h> #include "mlx5_autoconf.h" diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 45ee7e4488..51b39ddde5 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -10,7 +10,7 @@ #include <stdlib.h> #include <errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2ca6148c1d..6716a20141 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -12,7 +12,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eal_paging.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c1ddff7364..707d6749e2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 2d4381946d..9347490967 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index bd786fd638..6ffcfcd97a 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -11,7 +11,7 @@ #include <netinet/in.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "mlx5_defs.h" diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 845cebe2e8..dc0131af3a 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -9,7 +9,7 @@ #include <string.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index 7613ff770d..cf93ccac86 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c @@ -7,7 +7,7 @@ #include <errno.h> #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_glue.h> #include "mlx5.h" diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 787b2b74dd..92e3a792e1 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_interrupts.h> #include <rte_debug.h> diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 82d4d4a745..a6569b250a 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -8,7 +8,7 @@ #include <stdio.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 48210bf0b2..94dd56709e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -6,7 +6,7 @@ #include <unistd.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index b38482d4e9..696282ca31 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -5,7 +5,7 @@ #include <stdint.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index b81bb4a12d..5142e50858 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_eal_paging.h> diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index dbb9d362f3..64678d3f51 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -8,7 +8,7 @@ #include <stdint.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c index 076c688699..8609d38eca 100644 --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c @@ -5,7 +5,7 @@ #include <rte_errno.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/windows/mlx5_mp_os.c b/drivers/net/mlx5/windows/mlx5_mp_os.c index db793b1f7d..8313c29ffb 100644 --- a/drivers/net/mlx5/windows/mlx5_mp_os.c +++ b/drivers/net/mlx5/windows/mlx5_mp_os.c @@ -6,7 +6,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index b036432937..e37cc65c17 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -9,7 +9,7 @@ #include <stdlib.h> #include <rte_windows.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <mlx5_glue.h> #include <mlx5_devx_cmds.h> diff --git a/drivers/net/mlx5/windows/mlx5_vlan_os.c b/drivers/net/mlx5/windows/mlx5_vlan_os.c index d3b11e0001..3917c822e4 100644 --- a/drivers/net/mlx5/windows/mlx5_vlan_os.c +++ b/drivers/net/mlx5/windows/mlx5_vlan_os.c @@ -13,7 +13,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5.h> diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index 2cd73919ce..b0940b4462 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index f25cf9e46d..1d67f2abf1 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_log.h> #include <rte_malloc.h> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 5a401b4b06..04904b1514 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -24,7 +24,7 @@ #include <rte_atomic.h> #include <rte_branch_prediction.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_errno.h> #include <rte_memory.h> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c index 1ce260c89b..e317539de7 100644 --- a/drivers/net/netvsc/hn_rndis.c +++ b/drivers/net/netvsc/hn_rndis.c @@ -12,7 +12,7 @@ #include <unistd.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c index 86392917c5..2dc7abe354 100644 --- a/drivers/net/netvsc/hn_vf.c +++ b/drivers/net/netvsc/hn_vf.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_lcore.h> #include <rte_memory.h> #include <rte_bus_vmbus.h> diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index c55bcdf1ef..7e91d59847 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -9,7 +9,7 @@ #include <netcope/rxmac.h> #include <netcope/txmac.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "nfb_stats.h" diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h index b6578cc38a..28daeae0b8 100644 --- a/drivers/net/nfb/nfb_tx.h +++ b/drivers/net/nfb/nfb_tx.h @@ -10,7 +10,7 @@ #include <nfb/nfb.h> #include <nfb/ndp.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9ea24e5bda..9927c9c44b 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -17,8 +17,8 @@ #include <rte_common.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ether.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h index 1427954c17..78f7b8ca2f 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp.h +++ b/drivers/net/nfp/nfpcore/nfp_cpp.h @@ -6,7 +6,7 @@ #ifndef __NFP_CPP_H__ #define __NFP_CPP_H__ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp-common/nfp_platform.h" #include "nfp-common/nfp_resid.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index 36725d69ab..bad80a5a1c 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -33,7 +33,7 @@ #include <sys/file.h> #include <sys/stat.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include "nfp_cpp.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c index dec4a8b6d1..848c452eab 100644 --- a/drivers/net/nfp/nfpcore/nfp_cppcore.c +++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c @@ -12,7 +12,7 @@ #include <sys/types.h> #include <rte_byteorder.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp_cpp.h" #include "nfp_target.h" diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 49ee8da8e4..32764e8f0e 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -4,8 +4,8 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index 780a094ffa..b73515de37 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -8,7 +8,7 @@ #include <stdbool.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eventdev.h> #include <rte_mempool.h> #include <rte_memory.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c index bbe43a874b..61865ef0bc 100644 --- a/drivers/net/octeontx/octeontx_rxtx.c +++ b/drivers/net/octeontx/octeontx_rxtx.c @@ -9,7 +9,7 @@ #include <rte_atomic.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index 7c24d8b4fd..2ed28ea563 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -5,7 +5,7 @@ #ifndef __OCTEONTX_RXTX_H__ #define __OCTEONTX_RXTX_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define OFFLOAD_FLAGS \ uint16_t rx_offload_flags; \ diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 9bfe95d6b1..e9fbbca4da 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c index 439ec4fa89..a79b997376 100644 --- a/drivers/net/octeontx2/otx2_link.c +++ b/drivers/net/octeontx2/otx2_link.c @@ -3,7 +3,7 @@ */ #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "otx2_ethdev.h" diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index b8ef4c181d..91e5c0f6bd 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -2,7 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "otx2_ethdev.h" diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index a32b1f3f37..ff02ade70d 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -19,8 +19,8 @@ #include <pcap.h> #include <rte_cycles.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/pfe/pfe_eth.h b/drivers/net/pfe/pfe_eth.h index 9820d7bf47..fbc11b4ffb 100644 --- a/drivers/net/pfe/pfe_eth.h +++ b/drivers/net/pfe/pfe_eth.h @@ -7,7 +7,7 @@ #include <compat.h> #include <rte_ethdev.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #define ETH_ALEN 6 #define GEMAC_NO_PHY BIT(0) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3b079693fb..8cf59e210d 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -5,7 +5,7 @@ #include <sys/ioctl.h> #include <sys/epoll.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_ether.h> #include <dpaa_of.h> diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 61a65ac42e..da4b87f5e2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -11,8 +11,8 @@ #include <sys/queue.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ip.h> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 41402a5159..472d838582 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -4,7 +4,7 @@ #include "rte_eth_ring.h" #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index ed059e142f..fdee800482 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -14,7 +14,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_spinlock.h> #include <rte_atomic.h> diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index f3e00e2e38..f20154b568 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -11,7 +11,7 @@ #define _SFC_DP_RX_H #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h index 3ecdfcdd28..b4af68984a 100644 --- a/drivers/net/sfc/sfc_dp_tx.h +++ b/drivers/net/sfc/sfc_dp_tx.h @@ -10,7 +10,7 @@ #ifndef _SFC_DP_TX_H #define _SFC_DP_TX_H -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" #include "sfc_debug.h" diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index f2f5336435..d6f6a84eab 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -8,8 +8,8 @@ */ #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_errno.h> diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index 3c7e5580e2..03bfb14b5c 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -10,7 +10,7 @@ #ifndef _SFC_EV_H_ #define _SFC_EV_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index 4321045d1a..ab1d2cc595 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -10,7 +10,7 @@ #include <rte_byteorder.h> #include <rte_tailq.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h index d6ee9cf802..0d64b9c8bb 100644 --- a/drivers/net/sfc/sfc_rx.h +++ b/drivers/net/sfc/sfc_rx.h @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h index d583ee9c3d..3367bade37 100644 --- a/drivers/net/sfc/sfc_tx.h +++ b/drivers/net/sfc/sfc_tx.h @@ -11,7 +11,7 @@ #define _SFC_TX_H #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 3387ab485f..99d8468c94 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -6,8 +6,8 @@ #include <stdlib.h> #include <string.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 9c8737c9e2..faf90a5a8c 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -19,7 +19,7 @@ #include <rte_pipeline.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tm_driver.h> #include <rte_flow_driver.h> #include <rte_mtr_driver.h> diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 7874c4f4f8..6eaeadf1c8 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -15,8 +15,8 @@ #include <libsze2.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 2542de3065..c36d4bf76e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -7,8 +7,8 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h index ba45de8409..a98ea11a33 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -13,7 +13,7 @@ #include <linux/if_tun.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_gso.h> #include "tap_log.h" diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index c2e7c334d4..c45d6e00a9 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -23,8 +23,8 @@ #include <rte_dev.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> #include <rte_memory.h> diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index 3914117997..b8dd905d0b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -5,7 +5,7 @@ #ifndef __THUNDERX_NICVF_ETHDEV_H__ #define __THUNDERX_NICVF_ETHDEV_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define THUNDERX_NICVF_PMD_VERSION "2.0" #define THUNDERX_REG_BYTES 8 diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index d0ea95f1d1..91e09ff8d5 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -13,7 +13,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 1f274b2954..d6ed660b4e 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -6,7 +6,7 @@ #define __THUNDERX_NICVF_RXTX_H__ #include <rte_byteorder.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define NICVF_RX_OFFLOAD_NONE 0x1 #define NICVF_RX_OFFLOAD_CKSUM 0x2 diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index cf1c281a06..0ca207d0dd 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -11,7 +11,7 @@ #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_interrupts.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> struct nicvf_rbdr { diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index eef4b6d4a5..23f9d17091 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -7,7 +7,7 @@ #include <stdint.h> #include <string.h> #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index daa523b204..9f4eee4081 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -2,7 +2,7 @@ * Copyright(c) 2015-2020 */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_security_driver.h> #include <rte_cryptodev.h> diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c index 151f2c7a45..e4bd990b96 100644 --- a/drivers/net/txgbe/txgbe_pf.c +++ b/drivers/net/txgbe/txgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 3ad92248c6..ac09e75a3e 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -19,7 +19,7 @@ #include <rte_log.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_memzone.h> #include <rte_atomic.h> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 5845bb15f3..d198fc8a8e 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -8,8 +8,8 @@ #include <sys/epoll.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 92a3d4efa5..edcd6203d9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index ab61e911b8..0382dc5b2c 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> struct virtqueue; struct virtnet_ctl; diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 622d4bf201..fb7382eff7 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c index a26182bb46..f248869a8f 100644 --- a/drivers/net/virtio/virtio_rxtx_simple.c +++ b/drivers/net/virtio/virtio_rxtx_simple.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c index a260ebdf57..f09a1eda49 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c index 12e034dc0a..2cba800807 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c @@ -12,7 +12,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c index 1056e9c20b..85a5a6664a 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 241808cd8f..308275b70e 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 23a2ebbefa..ecdecc427c 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -26,8 +26,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 95c697f8e3..5cf53d4de8 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/ethdev_driver.h similarity index 100% rename from lib/librte_ethdev/rte_ethdev_driver.h rename to lib/librte_ethdev/ethdev_driver.h diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/ethdev_pci.h similarity index 99% rename from lib/librte_ethdev/rte_ethdev_pci.h rename to lib/librte_ethdev/ethdev_pci.h index bf715896ae..8edca82ce8 100644 --- a/lib/librte_ethdev/rte_ethdev_pci.h +++ b/lib/librte_ethdev/ethdev_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_config.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * Copy pci device info to the Ethernet device data. diff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c index 162a502fe7..5960c75cc5 100644 --- a/lib/librte_ethdev/ethdev_private.c +++ b/lib/librte_ethdev/ethdev_private.c @@ -3,7 +3,7 @@ */ #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" uint16_t diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/ethdev_vdev.h similarity index 97% rename from lib/librte_ethdev/rte_ethdev_vdev.h rename to lib/librte_ethdev/ethdev_vdev.h index 4ba3f28964..46c75d9e5f 100644 --- a/lib/librte_ethdev/rte_ethdev_vdev.h +++ b/lib/librte_ethdev/ethdev_vdev.h @@ -9,7 +9,7 @@ #include <rte_config.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * @internal diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..829abd456b 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,12 +11,9 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_driver.h', 'rte_ethdev_core.h', - 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c index 6338355e25..ca2ce87f7a 100644 --- a/lib/librte_ethdev/rte_class_eth.c +++ b/lib/librte_ethdev/rte_class_eth.c @@ -12,7 +12,7 @@ #include "rte_ethdev.h" #include "rte_ethdev_core.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" enum eth_params { diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index daf5f24f7e..f40df65e34 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -41,7 +41,7 @@ #include "rte_ethdev_trace.h" #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_profile.h" #include "ethdev_private.h" diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index eb299955d4..89b8ba2fc4 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -20,7 +20,7 @@ * - The driver-oriented Ethernet API that exports functions allowing * an Ethernet Poll Mode Driver (PMD) to allocate an Ethernet device instance, * create memzone for HW rings and process registered callbacks, and so on. - * PMDs should include rte_ethdev_driver.h instead of this header. + * PMDs should include ethdev_driver.h instead of this header. * * By default, all the functions of the Ethernet Device API exported by a PMD * are lock-free functions which assume to not be invoked in parallel on diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h index f3d72827cc..dabd819d10 100644 --- a/lib/librte_ethdev/rte_flow_driver.h +++ b/lib/librte_ethdev/rte_flow_driver.h @@ -18,7 +18,7 @@ #include <stdint.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h index 3b39532935..a0ddc2b5f4 100644 --- a/lib/librte_ethdev/rte_mtr_driver.h +++ b/lib/librte_ethdev/rte_mtr_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h index b86ed89c00..45290fb3fd 100644 --- a/lib/librte_ethdev/rte_tm_driver.h +++ b/lib/librte_ethdev/rte_tm_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson @ 2021-01-27 17:48 ` Maxime Coquelin 2021-01-28 10:17 ` Thomas Monjalon ` (2 subsequent siblings) 3 siblings, 0 replies; 165+ messages in thread From: Maxime Coquelin @ 2021-01-27 17:48 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam Hi Bruce, On 1/27/21 6:33 PM, Bruce Richardson wrote: > |drivers/net/vhost/rte_eth_vhost.c | 4 ++-- > drivers/net/virtio/virtio_ethdev.c | 4 ++-- > drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c > | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_altivec.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- > drivers/net/virtio/virtio_user_ethdev.c | 2 +-| Both the Virtio & Vhost looks good to me: Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Note that you'll need to rebase, as my Virtio rework series just got merged by Ferruh on net-next main branch, and it conflict a bit. There are new files created, so you may want to look carefully! Thanks, Maxime ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson 2021-01-27 17:48 ` Maxime Coquelin @ 2021-01-28 10:17 ` Thomas Monjalon 2021-01-28 11:01 ` David Marchand 2021-01-28 16:38 ` Webster, Steven 3 siblings, 0 replies; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 10:17 UTC (permalink / raw) To: Bruce Richardson Cc: dev, david.marchand, Bruce Richardson, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Ori Kam 27/01/2021 18:33, Bruce Richardson: > The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are > for drivers only and should be a private to DPDK and not installed. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Such change was not possible (or very difficult) with make because standard cross component includes were looking up only in installed headers. We probably have other cases of unneeded installed headers or wrongly prefixed headers. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson 2021-01-27 17:48 ` Maxime Coquelin 2021-01-28 10:17 ` Thomas Monjalon @ 2021-01-28 11:01 ` David Marchand 2021-01-28 16:38 ` Webster, Steven 3 siblings, 0 replies; 165+ messages in thread From: David Marchand @ 2021-01-28 11:01 UTC (permalink / raw) To: Bruce Richardson Cc: dev, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Steven Webster, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam On Wed, Jan 27, 2021 at 6:34 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst > index ae36b6a3fa..33bac4fff8 100644 > --- a/doc/guides/rel_notes/release_21_02.rst > +++ b/doc/guides/rel_notes/release_21_02.rst > @@ -140,6 +140,13 @@ Removed Items > PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` > ``0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9`` has been removed. > > +* The internal header files ``rte_ethdev_driver.h``, ``rte_ethdev_vdev.h`` and > + ``rte_ethdev_pci.h`` are no longer installed as part of the DPDK ``ninja > + install`` action and are renamed to ``ethdev_driver.h``, ``ethdev_vdev.h`` and > + ``ethdev_pci.h`` respectively in the source tree, to reflect the fact that > + they are non-public headers. > + > + Updates on libs come before drivers updates. So this note on ethdev goes before the note on bnxt devices above. The same comment applies in following patches. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson ` (2 preceding siblings ...) 2021-01-28 11:01 ` David Marchand @ 2021-01-28 16:38 ` Webster, Steven 3 siblings, 0 replies; 165+ messages in thread From: Webster, Steven @ 2021-01-28 16:38 UTC (permalink / raw) To: Bruce Richardson, dev Cc: david.marchand, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Peters, Matt, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Maxime Coquelin, Chenbo Xia, Yong Wang, Thomas Monjalon, Ori Kam > -----Original Message----- > From: Bruce Richardson <bruce.richardson@intel.com> > Sent: Wednesday, January 27, 2021 12:33 PM > Subject: [PATCH v6 4/8] ethdev: make driver-only headers private > > [Please note: This e-mail is from an EXTERNAL e-mail address] > > The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are > for drivers only and should be a private to DPDK and not installed. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > drivers/net/avp/avp_ethdev.c | 4 ++-- > diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c > index f531e03c02..566a3606a2 100644 > --- a/drivers/net/avp/avp_ethdev.c > +++ b/drivers/net/avp/avp_ethdev.c > @@ -8,8 +8,8 @@ > #include <errno.h> > #include <unistd.h> > > -#include <rte_ethdev_driver.h> > -#include <rte_ethdev_pci.h> > +#include <ethdev_driver.h> > +#include <ethdev_pci.h> > #include <rte_memcpy.h> > #include <rte_string_fns.h> > #include <rte_malloc.h> Acked-By: Steven Webster <steven.webster@windriver.com> ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (3 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:07 ` Thomas Monjalon 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson ` (3 subsequent siblings) 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Konstantin Ananyev, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu For some libraries, there may be some header files which are not for direct inclusion, but rather are to be included via other header files. To allow later checking of these files for missing includes, we separate out the indirect include files from the direct ones. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/contributing/coding_style.rst | 12 ++++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- lib/librte_ethdev/meson.build | 5 +++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++---- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 14 files changed, 46 insertions(+), 19 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..dba4145228 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..449740e510 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +headers_no_chkincs += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..835ea22947 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_headers_no_chkincs = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_headers_no_chkincs, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index 829abd456b..b7da959dd1 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,10 +11,8 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_core.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -22,5 +20,8 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +headers_no_chkincs += files( + 'rte_ethdev_core.h', + 'rte_eth_ctrl.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..b3ebc8b078 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +headers_no_chkincs += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..e24e6ed22b 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers_no_chkincs += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..3d3d515a4d 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1ab21bd4d8 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +headers_no_chkincs += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index 36fdcb6a57..1a95dae9e5 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +headers_no_chkincs += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_c11_mem.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..5d9b3601b3 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +headers_no_chkincs += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..a8b1c9a254 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +headers_no_chkincs += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index 44f0a62142..aa0a5ac8fc 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -66,6 +66,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + headers_no_chkincs = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) + install_headers(headers_no_chkincs) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 2b9c37eb42..e6e34d0a98 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..5c382487da 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking Bruce Richardson @ 2021-01-28 11:07 ` Thomas Monjalon 2021-01-28 11:23 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 11:07 UTC (permalink / raw) To: Bruce Richardson Cc: dev, david.marchand, Bruce Richardson, Konstantin Ananyev, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu 27/01/2021 18:33, Bruce Richardson: > For some libraries, there may be some header files which are not for direct > inclusion, but rather are to be included via other header files. To allow > later checking of these files for missing includes, we separate out the > indirect include files from the direct ones. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> [...] > + When ``check_includes`` build option is set to ``true``, each header file > + has additional checks performed on it, for example to ensure that it is > + not missing any include statements for dependent headers. > + For header files which are public, but only included indirectly in > + applications, these checks can be skipped by using the ``headers_no_chkincs`` > + variable rather than ``headers``. > + > +headers_no_chkincs > + **Default Value = []**. > + As with ``headers`` option above, except that the files are not checked > + for all needed include files as part of a DPDK build when > + ``check_includes`` is set to ``true``. If all such headers are included directly, I would prefer naming this group "indirect_headers" because maybe we will want to do other kind of processing on indirect headers. [...] > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -1,5 +1,7 @@ > # Please keep these options sorted alphabetically. > > +option('check_includes', type: 'boolean', value: false, > + description: 'build "chkincs" to verify each header file can compile alone') This should in the patch introducing the check? ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking 2021-01-28 11:07 ` Thomas Monjalon @ 2021-01-28 11:23 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:23 UTC (permalink / raw) To: Thomas Monjalon Cc: dev, david.marchand, Konstantin Ananyev, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu On Thu, Jan 28, 2021 at 12:07:11PM +0100, Thomas Monjalon wrote: > 27/01/2021 18:33, Bruce Richardson: > > For some libraries, there may be some header files which are not for direct > > inclusion, but rather are to be included via other header files. To allow > > later checking of these files for missing includes, we separate out the > > indirect include files from the direct ones. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > [...] > > + When ``check_includes`` build option is set to ``true``, each header file > > + has additional checks performed on it, for example to ensure that it is > > + not missing any include statements for dependent headers. > > + For header files which are public, but only included indirectly in > > + applications, these checks can be skipped by using the ``headers_no_chkincs`` > > + variable rather than ``headers``. > > + > > +headers_no_chkincs > > + **Default Value = []**. > > + As with ``headers`` option above, except that the files are not checked > > + for all needed include files as part of a DPDK build when > > + ``check_includes`` is set to ``true``. > > If all such headers are included directly, I would prefer naming this group > "indirect_headers" because maybe we will want to do other kind of processing > on indirect headers. > Sure. The current naming was chosen so that a grep of the code for on receiving errors about "chkincs" would show this up, but I think your suggestion is better. > [...] > > --- a/meson_options.txt > > +++ b/meson_options.txt > > @@ -1,5 +1,7 @@ > > # Please keep these options sorted alphabetically. > > > > +option('check_includes', type: 'boolean', value: false, > > + description: 'build "chkincs" to verify each header file can compile alone') > > This should in the patch introducing the check? > It was originally, but then we hit an issue with wanting/needing to refer to this option in the documentation about splitting the header file lists. Therefore, I decided to add the option in this patch. Alternatively, this patch and the next can be merged into one. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (4 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:02 ` David Marchand 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script Bruce Richardson ` (2 subsequent siblings) 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. To ensure ongoing compliance, we enable this build test as part of the default x86 build in "test-meson-builds.sh". Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 4 +++ buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ buildtools/chkincs/main.c | 4 +++ buildtools/chkincs/meson.build | 40 +++++++++++++++++++++ devtools/test-meson-builds.sh | 2 +- doc/guides/rel_notes/release_21_02.rst | 8 +++++ meson.build | 5 +++ 7 files changed, 74 insertions(+), 1 deletion(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 1a12916f56..d4f9ebe46d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1562,6 +1562,10 @@ F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +Header build sanity checking +M: Bruce Richardson <bruce.richardson@intel.com> +F: buildtools/chkincs/ + Sample packet helper functions for unit test M: Reshma Pattan <reshma.pattan@intel.com> F: app/test/sample_packet_forward.c diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..ed46948aea --- /dev/null +++ b/buildtools/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c new file mode 100644 index 0000000000..d25bb8852a --- /dev/null +++ b/buildtools/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build new file mode 100644 index 0000000000..5dc43283e0 --- /dev/null +++ b/buildtools/chkincs/meson.build @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +if not get_option('check_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "check_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags = machine_args +cflags += '-Wno-unused-function' # needed if we include generic headers +cflags += '-DALLOW_EXPERIMENTAL_API' + +# some ethdev headers depend on bus headers +includes = include_directories('../../drivers/bus/pci', + '../../drivers/bus/vdev') + +sources = files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = [] +foreach l:enabled_libs + deps += get_variable('static_rte_' + l) +endforeach + +executable('chkincs', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + link_whole: dpdk_static_libraries + dpdk_drivers, + install: false) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index efa91e0e40..07b5e6aeca 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,7 +227,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc skipABI \ +build build-x86-default cc skipABI -Dcheck_includes=true\ -Dlibdir=lib -Dmachine=$default_machine $use_shared # 32-bit with default compiler diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 33bac4fff8..245d1a6473 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -122,6 +122,14 @@ New Features * Added support for aes-cbc sha256-128-hmac cipher combination in OCTEON TX2 crypto PMD lookaside protocol offload for IPsec. +* **Added support for build-time checking of header includes** + + A new build option ``check_includes`` has been added, which, when enabled, + will perform build-time checking on DPDK public header files, to ensure none + are missing dependent header includes. This feature, disabled by default, is + intended for use by developers contributing to the DPDK SDK itself, and is + integrated into the build scripts and automated CI for patch contributions. + Removed Items ------------- diff --git a/meson.build b/meson.build index e6e34d0a98..fcc4d4c900 100644 --- a/meson.build +++ b/meson.build @@ -68,6 +68,11 @@ if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-28 11:02 ` David Marchand 2021-01-28 11:27 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-28 11:02 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Wed, Jan 27, 2021 at 6:37 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > To verify that all DPDK headers are ok for inclusion directly in a C file, > and are not missing any other pre-requisite headers, we can auto-generate > for each header an empty C file that includes that header. Compiling these > files will throw errors if any header has unmet dependencies. > > To ensure ongoing compliance, we enable this build test as part of the > default x86 build in "test-meson-builds.sh". > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > MAINTAINERS | 4 +++ > buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ > buildtools/chkincs/main.c | 4 +++ > buildtools/chkincs/meson.build | 40 +++++++++++++++++++++ > devtools/test-meson-builds.sh | 2 +- > doc/guides/rel_notes/release_21_02.rst | 8 +++++ > meson.build | 5 +++ > 7 files changed, 74 insertions(+), 1 deletion(-) > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > create mode 100644 buildtools/chkincs/main.c > create mode 100644 buildtools/chkincs/meson.build > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1a12916f56..d4f9ebe46d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1562,6 +1562,10 @@ F: app/test/test_resource.c > F: app/test/virtual_pmd.c > F: app/test/virtual_pmd.h > > +Header build sanity checking > +M: Bruce Richardson <bruce.richardson@intel.com> > +F: buildtools/chkincs/ > + This can be squashed in the generic "Build System" block. > Sample packet helper functions for unit test > M: Reshma Pattan <reshma.pattan@intel.com> > F: app/test/sample_packet_forward.c > diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py > new file mode 100755 > index 0000000000..ed46948aea > --- /dev/null > +++ b/buildtools/chkincs/gen_c_file_for_header.py > @@ -0,0 +1,12 @@ > +#! /usr/bin/env python3 > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2021 Intel Corporation > + > +from sys import argv > +from os.path import abspath > + > +(h_file, c_file) = argv[1:] > + > +contents = '#include "' + abspath(h_file) + '"' > +with open(c_file, 'w') as cf: > + cf.write(contents) > diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c > new file mode 100644 > index 0000000000..d25bb8852a > --- /dev/null > +++ b/buildtools/chkincs/main.c > @@ -0,0 +1,4 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2021 Intel Corporation > + */ > +int main(void) { return 0; } > diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build > new file mode 100644 > index 0000000000..5dc43283e0 > --- /dev/null > +++ b/buildtools/chkincs/meson.build > @@ -0,0 +1,40 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2021 Intel Corporation > + > +if not get_option('check_includes') > + build = false > + subdir_done() > +endif > + > +if is_windows > + # for windows, the shebang line in the script won't work. > + error('option "check_includes" is not supported on windows') > +endif > + > +gen_c_file_for_header = find_program('gen_c_file_for_header.py') > +gen_c_files = generator(gen_c_file_for_header, > + output: '@BASENAME@.c', > + arguments: ['@INPUT@', '@OUTPUT@']) > + > +cflags = machine_args > +cflags += '-Wno-unused-function' # needed if we include generic headers > +cflags += '-DALLOW_EXPERIMENTAL_API' > + > +# some ethdev headers depend on bus headers > +includes = include_directories('../../drivers/bus/pci', > + '../../drivers/bus/vdev') ethdev headers are fine now, afaics. So this comment can be changed to a more vague "some driver headers depend on bus headers". > + > +sources = files('main.c') > +sources += gen_c_files.process(dpdk_chkinc_headers) > + > +deps = [] > +foreach l:enabled_libs > + deps += get_variable('static_rte_' + l) > +endforeach > + > +executable('chkincs', sources, > + c_args: cflags, > + include_directories: includes, > + dependencies: deps, > + link_whole: dpdk_static_libraries + dpdk_drivers, > + install: false) > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh > index efa91e0e40..07b5e6aeca 100755 > --- a/devtools/test-meson-builds.sh > +++ b/devtools/test-meson-builds.sh > @@ -227,7 +227,7 @@ default_machine='nehalem' > if ! check_cc_flags "-march=$default_machine" ; then > default_machine='corei7' > fi > -build build-x86-default cc skipABI \ > +build build-x86-default cc skipABI -Dcheck_includes=true\ Space before \ to be consistent with the rest of the file. > -Dlibdir=lib -Dmachine=$default_machine $use_shared > > # 32-bit with default compiler > diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst > index 33bac4fff8..245d1a6473 100644 > --- a/doc/guides/rel_notes/release_21_02.rst > +++ b/doc/guides/rel_notes/release_21_02.rst > @@ -122,6 +122,14 @@ New Features > * Added support for aes-cbc sha256-128-hmac cipher combination in OCTEON TX2 > crypto PMD lookaside protocol offload for IPsec. > > +* **Added support for build-time checking of header includes** > + > + A new build option ``check_includes`` has been added, which, when enabled, > + will perform build-time checking on DPDK public header files, to ensure none > + are missing dependent header includes. This feature, disabled by default, is > + intended for use by developers contributing to the DPDK SDK itself, and is > + integrated into the build scripts and automated CI for patch contributions. > + > Should be earlier in the new features list. > Removed Items > ------------- > diff --git a/meson.build b/meson.build > index e6e34d0a98..fcc4d4c900 100644 > --- a/meson.build > +++ b/meson.build > @@ -68,6 +68,11 @@ if get_option('enable_kmods') > subdir('kernel') > endif > > +# check header includes if requested > +if get_option('check_includes') > + subdir('buildtools/chkincs') > +endif > + > # write the build config > build_cfg = 'rte_build_config.h' > configure_file(output: build_cfg, > -- > 2.27.0 > -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-28 11:02 ` David Marchand @ 2021-01-28 11:27 ` Bruce Richardson 2021-01-28 11:31 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:27 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Thu, Jan 28, 2021 at 12:02:35PM +0100, David Marchand wrote: > On Wed, Jan 27, 2021 at 6:37 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > To verify that all DPDK headers are ok for inclusion directly in a C file, > > and are not missing any other pre-requisite headers, we can auto-generate > > for each header an empty C file that includes that header. Compiling these > > files will throw errors if any header has unmet dependencies. > > > > To ensure ongoing compliance, we enable this build test as part of the > > default x86 build in "test-meson-builds.sh". > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > MAINTAINERS | 4 +++ > > buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ > > buildtools/chkincs/main.c | 4 +++ > > buildtools/chkincs/meson.build | 40 +++++++++++++++++++++ > > devtools/test-meson-builds.sh | 2 +- > > doc/guides/rel_notes/release_21_02.rst | 8 +++++ > > meson.build | 5 +++ > > 7 files changed, 74 insertions(+), 1 deletion(-) > > create mode 100755 buildtools/chkincs/gen_c_file_for_header.py > > create mode 100644 buildtools/chkincs/main.c > > create mode 100644 buildtools/chkincs/meson.build > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 1a12916f56..d4f9ebe46d 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -1562,6 +1562,10 @@ F: app/test/test_resource.c > > F: app/test/virtual_pmd.c > > F: app/test/virtual_pmd.h > > > > +Header build sanity checking > > +M: Bruce Richardson <bruce.richardson@intel.com> > > +F: buildtools/chkincs/ > > + > > This can be squashed in the generic "Build System" block. > Ok. > > > Sample packet helper functions for unit test > > M: Reshma Pattan <reshma.pattan@intel.com> > > F: app/test/sample_packet_forward.c > > diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py > > new file mode 100755 > > index 0000000000..ed46948aea > > --- /dev/null > > +++ b/buildtools/chkincs/gen_c_file_for_header.py > > @@ -0,0 +1,12 @@ > > +#! /usr/bin/env python3 > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2021 Intel Corporation > > + > > +from sys import argv > > +from os.path import abspath > > + > > +(h_file, c_file) = argv[1:] > > + > > +contents = '#include "' + abspath(h_file) + '"' > > +with open(c_file, 'w') as cf: > > + cf.write(contents) > > diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c > > new file mode 100644 > > index 0000000000..d25bb8852a > > --- /dev/null > > +++ b/buildtools/chkincs/main.c > > @@ -0,0 +1,4 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(c) 2021 Intel Corporation > > + */ > > +int main(void) { return 0; } > > diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build > > new file mode 100644 > > index 0000000000..5dc43283e0 > > --- /dev/null > > +++ b/buildtools/chkincs/meson.build > > @@ -0,0 +1,40 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2021 Intel Corporation > > + > > +if not get_option('check_includes') > > + build = false > > + subdir_done() > > +endif > > + > > +if is_windows > > + # for windows, the shebang line in the script won't work. > > + error('option "check_includes" is not supported on windows') > > +endif > > + > > +gen_c_file_for_header = find_program('gen_c_file_for_header.py') > > +gen_c_files = generator(gen_c_file_for_header, > > + output: '@BASENAME@.c', > > + arguments: ['@INPUT@', '@OUTPUT@']) > > + > > +cflags = machine_args > > +cflags += '-Wno-unused-function' # needed if we include generic headers > > +cflags += '-DALLOW_EXPERIMENTAL_API' > > + > > +# some ethdev headers depend on bus headers > > +includes = include_directories('../../drivers/bus/pci', > > + '../../drivers/bus/vdev') > > ethdev headers are fine now, afaics. > So this comment can be changed to a more vague "some driver headers > depend on bus headers". > Driver headers are not checked yet by the code, only lib ones, so I will see if this block can be omitted until needed. > > > + > > +sources = files('main.c') > > +sources += gen_c_files.process(dpdk_chkinc_headers) > > + > > +deps = [] > > +foreach l:enabled_libs > > + deps += get_variable('static_rte_' + l) > > +endforeach > > + > > +executable('chkincs', sources, > > + c_args: cflags, > > + include_directories: includes, > > + dependencies: deps, > > + link_whole: dpdk_static_libraries + dpdk_drivers, > > + install: false) > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh > > index efa91e0e40..07b5e6aeca 100755 > > --- a/devtools/test-meson-builds.sh > > +++ b/devtools/test-meson-builds.sh > > @@ -227,7 +227,7 @@ default_machine='nehalem' > > if ! check_cc_flags "-march=$default_machine" ; then > > default_machine='corei7' > > fi > > -build build-x86-default cc skipABI \ > > +build build-x86-default cc skipABI -Dcheck_includes=true\ > > Space before \ to be consistent with the rest of the file. > Sure. > > > -Dlibdir=lib -Dmachine=$default_machine $use_shared > > > > # 32-bit with default compiler > > diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst > > index 33bac4fff8..245d1a6473 100644 > > --- a/doc/guides/rel_notes/release_21_02.rst > > +++ b/doc/guides/rel_notes/release_21_02.rst > > @@ -122,6 +122,14 @@ New Features > > * Added support for aes-cbc sha256-128-hmac cipher combination in OCTEON TX2 > > crypto PMD lookaside protocol offload for IPsec. > > > > +* **Added support for build-time checking of header includes** > > + > > + A new build option ``check_includes`` has been added, which, when enabled, > > + will perform build-time checking on DPDK public header files, to ensure none > > + are missing dependent header includes. This feature, disabled by default, is > > + intended for use by developers contributing to the DPDK SDK itself, and is > > + integrated into the build scripts and automated CI for patch contributions. > > + > > > > Should be earlier in the new features list. > This was actually a deliberate choice on my part, since I was in two minds as to whether or how this should be called out in the release note. I felt it was not really of interest to user, and only to DPDK developers, so I put it at the end to de-emphasise it. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-28 11:27 ` Bruce Richardson @ 2021-01-28 11:31 ` David Marchand 2021-01-28 11:48 ` Bruce Richardson 2021-01-28 17:23 ` Bruce Richardson 0 siblings, 2 replies; 165+ messages in thread From: David Marchand @ 2021-01-28 11:31 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Thu, Jan 28, 2021 at 12:27 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > > +# some ethdev headers depend on bus headers > > > +includes = include_directories('../../drivers/bus/pci', > > > + '../../drivers/bus/vdev') > > > > ethdev headers are fine now, afaics. > > So this comment can be changed to a more vague "some driver headers > > depend on bus headers". > > > Driver headers are not checked yet by the code, only lib ones, so I will > see if this block can be omitted until needed. I tried yesterday, iirc, you'll hit issues with eventdev driver headers. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-28 11:31 ` David Marchand @ 2021-01-28 11:48 ` Bruce Richardson 2021-01-28 17:23 ` Bruce Richardson 1 sibling, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:48 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Thu, Jan 28, 2021 at 12:31:20PM +0100, David Marchand wrote: > On Thu, Jan 28, 2021 at 12:27 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > +# some ethdev headers depend on bus headers > > > > +includes = include_directories('../../drivers/bus/pci', > > > > + '../../drivers/bus/vdev') > > > > > > ethdev headers are fine now, afaics. > > > So this comment can be changed to a more vague "some driver headers > > > depend on bus headers". > > > > > Driver headers are not checked yet by the code, only lib ones, so I will > > see if this block can be omitted until needed. > > I tried yesterday, iirc, you'll hit issues with eventdev driver headers. > Ok, thanks for trying. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes 2021-01-28 11:31 ` David Marchand 2021-01-28 11:48 ` Bruce Richardson @ 2021-01-28 17:23 ` Bruce Richardson 1 sibling, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 17:23 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Thu, Jan 28, 2021 at 12:31:20PM +0100, David Marchand wrote: > On Thu, Jan 28, 2021 at 12:27 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > +# some ethdev headers depend on bus headers > > > > +includes = include_directories('../../drivers/bus/pci', > > > > + '../../drivers/bus/vdev') > > > > > > ethdev headers are fine now, afaics. > > > So this comment can be changed to a more vague "some driver headers > > > depend on bus headers". > > > > > Driver headers are not checked yet by the code, only lib ones, so I will > > see if this block can be omitted until needed. > > I tried yesterday, iirc, you'll hit issues with eventdev driver headers. > Ok, I've done up a patch for eventdev similar to that of ethdev to make private the rte_eventdev_pmd*.h files, and these lines can now be removed. The eventdev files already had doxygen comments in them that they were not for application use. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (5 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:10 ` Thomas Monjalon 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds Bruce Richardson 2021-01-28 10:55 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes David Marchand 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon The check-includes script allowed checking header files in a given directory to ensure that each header compiled alone without requiring any other header inclusions. With header checking now being done by the chkincs app in the build system this script can be removed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 - devtools/check-includes.sh | 259 ------------------------- doc/guides/rel_notes/release_21_02.rst | 3 + 3 files changed, 3 insertions(+), 260 deletions(-) delete mode 100755 devtools/check-includes.sh diff --git a/MAINTAINERS b/MAINTAINERS index d4f9ebe46d..8498b402db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -81,7 +81,6 @@ F: devtools/check-dup-includes.sh F: devtools/check-maintainers.sh F: devtools/check-forbidden-tokens.awk F: devtools/check-git-log.sh -F: devtools/check-includes.sh F: devtools/check-spdx-tag.sh F: devtools/check-symbol-maps.sh F: devtools/checkpatches.sh diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh deleted file mode 100755 index 940cf0eb2a..0000000000 --- a/devtools/check-includes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016 6WIND S.A. - -# This script checks that header files in a given directory do not miss -# dependencies when included on their own, do not conflict and accept being -# compiled with the strictest possible flags. -# -# Files are looked up in the directory provided as the first argument, -# otherwise build/include by default. -# -# Recognized environment variables: -# -# VERBOSE=1 is the same as -v. -# -# QUIET=1 is the same as -q. -# -# SUMMARY=1 is the same as -s. -# -# CC, CPPFLAGS, CFLAGS, CXX, CXXFLAGS are taken into account. -# -# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict -# C/C++ compilation flags. -# -# IGNORE contains a list of globbing patterns matching files (relative to the -# include directory) to avoid. It is set by default to known DPDK headers -# which must not be included on their own. -# -# IGNORE_CXX provides additional files for C++. - -while getopts hqvs arg; do - case $arg in - h) - cat <<EOF -usage: $0 [-h] [-q] [-v] [-s] [DIR] - -This script checks that header files in a given directory do not miss -dependencies when included on their own, do not conflict and accept being -compiled with the strictest possible flags. - - -h display this help and exit - -q quiet mode, disable normal output - -v show command lines being executed - -s show summary - -With no DIR, default to build/include. - -Any failed header check yields a nonzero exit status. -EOF - exit - ;; - q) - QUIET=1 - ;; - v) - VERBOSE=1 - ;; - s) - SUMMARY=1 - ;; - *) - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -include_dir=${1:-build/include} - -: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror} -: ${PEDANTIC_CXXFLAGS=} -: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600} -: ${CC:=cc} -: ${CXX:=c++} -: ${IGNORE= \ - 'rte_atomic_32.h' \ - 'rte_atomic_64.h' \ - 'rte_byteorder_32.h' \ - 'rte_byteorder_64.h' \ - 'generic/*' \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ - 'rte_eal_interrupts.h' \ -} -: ${IGNORE_CXX= \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ -} - -temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) -pass_cc= -failures_cc=0 - -temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) -pass_cxx= -failures_cxx=0 - -# Process output parameters. - -[ "$QUIET" = 1 ] && -exec 1> /dev/null - -[ "$VERBOSE" = 1 ] && -output () -{ - local CCV - local CXXV - - shift - CCV=$CC - CXXV=$CXX - CC="echo $CC" CXX="echo $CXX" "$@" - CC=$CCV - CXX=$CXXV - - "$@" -} || -output () -{ - - printf ' %s\n' "$1" - shift - "$@" -} - -trap 'rm -f "$temp_cc" "$temp_cxx"' EXIT - -compile_cc () -{ - ${CC} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CFLAGS} ${CFLAGS} \ - -c -o /dev/null "${temp_cc}" -} - -compile_cxx () -{ - ${CXX} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CXXFLAGS} ${CXXFLAGS} \ - -c -o /dev/null "${temp_cxx}" -} - -ignore () -{ - file="$1" - shift - while [ $# -ne 0 ]; do - case "$file" in - $1) - return 0 - ;; - esac - shift - done - return 1 -} - -# Check C/C++ compilation for each header file. - -while read -r path -do - file=${path#$include_dir} - file=${file##/} - if ignore "$file" $IGNORE; then - output "SKIP $file" : - continue - fi - if printf "\ -#include <%s> - -int main(void) -{ - return 0; -} -" "$file" > "$temp_cc" && - output "CC $file" compile_cc - then - pass_cc="$pass_cc $file" - else - failures_cc=$(($failures_cc + 1)) - fi - if ignore "$file" $IGNORE_CXX; then - output "SKIP CXX $file" : - continue - fi - if printf "\ -#include <%s> - -int main() -{ -} -" "$file" > "$temp_cxx" && - output "CXX $file" compile_cxx - then - pass_cxx="$pass_cxx $file" - else - failures_cxx=$(($failures_cxx + 1)) - fi -done <<EOF -$(find "$include_dir" -name '*.h') -EOF - -# Check C compilation with all includes. - -: > "$temp_cc" && -for file in $pass_cc; do - printf "\ -#include <%s> -" "$file" >> $temp_cc -done -if printf "\ -int main(void) -{ - return 0; -} -" >> "$temp_cc" && - output "CC (all includes that did not fail)" compile_cc -then - : -else - failures_cc=$(($failures_cc + 1)) -fi - -# Check C++ compilation with all includes. - -: > "$temp_cxx" && -for file in $pass_cxx; do - printf "\ -#include <%s> -" "$file" >> $temp_cxx -done -if printf "\ -int main() -{ -} -" >> "$temp_cxx" && - output "CXX (all includes that did not fail)" compile_cxx -then - : -else - failures_cxx=$(($failures_cxx + 1)) -fi - -# Report results. - -if [ "$SUMMARY" = 1 ]; then - printf "\ -Summary: - %u failure(s) for C using '%s'. - %u failure(s) for C++ using '%s'. -" $failures_cc "$CC" $failures_cxx "$CXX" 1>&2 -fi - -# Exit with nonzero status if there are failures. - -[ $failures_cc -eq 0 ] && -[ $failures_cxx -eq 0 ] diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 245d1a6473..c73ec6ede0 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -154,6 +154,9 @@ Removed Items ``ethdev_pci.h`` respectively in the source tree, to reflect the fact that they are non-public headers. +* The ``check-includes.sh`` script for checking DPDK header files has been + removed, being replaced by the ``check_includes`` build option described above. + API Changes ----------- -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script Bruce Richardson @ 2021-01-28 11:10 ` Thomas Monjalon 2021-01-28 11:38 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 11:10 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, david.marchand 27/01/2021 18:33, Bruce Richardson: > +* The ``check-includes.sh`` script for checking DPDK header files has been > + removed, being replaced by the ``check_includes`` build option described above. How do they compare? Is the new test checking C++ compliance? pedantic? ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script 2021-01-28 11:10 ` Thomas Monjalon @ 2021-01-28 11:38 ` Bruce Richardson 2021-01-28 14:05 ` Thomas Monjalon 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:38 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, david.marchand On Thu, Jan 28, 2021 at 12:10:41PM +0100, Thomas Monjalon wrote: > 27/01/2021 18:33, Bruce Richardson: > > +* The ``check-includes.sh`` script for checking DPDK header files has > > been + removed, being replaced by the ``check_includes`` build option > > described above. > > How do they compare? Is the new test checking C++ compliance? pedantic? > The new support does not do either of those things - though pedantic checks should be fairly easy to do - so I'm ok to drop this patch and not remove the script. Unfortunately, in my limited testing of it, the script has some usability issues now that on build all the lib includes are no longer copies to a single include folder. There is no automatic detection of include paths for other dependent headers, which means that to run the tool on e.g. ethdev lib, you need to set up the CFLAGS to include the paths to the net, eal, kvargs, meter, etc. libraries. Then again, it may work well on an installed DPDK instance for testing, but the fact that nobody has complained about it being hard to use before indicates that it is not being used, and if it's not being used I felt it as well to just drop it. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script 2021-01-28 11:38 ` Bruce Richardson @ 2021-01-28 14:05 ` Thomas Monjalon 0 siblings, 0 replies; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 14:05 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, david.marchand 28/01/2021 12:38, Bruce Richardson: > On Thu, Jan 28, 2021 at 12:10:41PM +0100, Thomas Monjalon wrote: > > 27/01/2021 18:33, Bruce Richardson: > > > +* The ``check-includes.sh`` script for checking DPDK header files has > > > been + removed, being replaced by the ``check_includes`` build option > > > described above. > > > > How do they compare? Is the new test checking C++ compliance? pedantic? > > > The new support does not do either of those things - though pedantic checks > should be fairly easy to do - so I'm ok to drop this patch and not remove > the script. > > Unfortunately, in my limited testing of it, the script has some usability > issues now that on build all the lib includes are no longer copies to a > single include folder. There is no automatic detection of include paths > for other dependent headers, which means that to run the tool on e.g. > ethdev lib, you need to set up the CFLAGS to include the paths to the net, > eal, kvargs, meter, etc. libraries. Then again, it may work well on an > installed DPDK instance for testing, but the fact that nobody has > complained about it being hard to use before indicates that it is not being > used, and if it's not being used I felt it as well to just drop it. I am OK to drop it. My question is more about improving the new tool to reach the initial goals of the old script. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (6 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script Bruce Richardson @ 2021-01-27 17:33 ` Bruce Richardson 2021-01-28 11:12 ` Thomas Monjalon 2021-01-28 10:55 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes David Marchand 8 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-27 17:33 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Aaron Conole, Michael Santana For CI builds, turn on the checking of includes. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Aaron Conole <aconole@redhat.com> --- .ci/linux-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" meson build --werror $OPTS ninja -C build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds Bruce Richardson @ 2021-01-28 11:12 ` Thomas Monjalon 2021-01-28 11:41 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Thomas Monjalon @ 2021-01-28 11:12 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, david.marchand, Aaron Conole, Michael Santana 27/01/2021 18:33, Bruce Richardson: > For CI builds, turn on the checking of includes. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > Acked-by: Aaron Conole <aconole@redhat.com> > --- > .ci/linux-build.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh > index afa3689a09..fdbeb5a616 100755 > --- a/.ci/linux-build.sh > +++ b/.ci/linux-build.sh > @@ -57,6 +57,7 @@ fi > OPTS="$OPTS -Dmachine=default" > OPTS="$OPTS --default-library=$DEF_LIB" > OPTS="$OPTS --buildtype=debugoptimized" > +OPTS="$OPTS -Dcheck_includes=true" Which percentage of time does it add on GHA? ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-28 11:12 ` Thomas Monjalon @ 2021-01-28 11:41 ` Bruce Richardson 2021-01-28 18:34 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:41 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, david.marchand, Aaron Conole, Michael Santana On Thu, Jan 28, 2021 at 12:12:44PM +0100, Thomas Monjalon wrote: > 27/01/2021 18:33, Bruce Richardson: > > For CI builds, turn on the checking of includes. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: > > Aaron Conole <aconole@redhat.com> --- .ci/linux-build.sh | 1 + 1 file > > changed, 1 insertion(+) > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index > > afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ > > b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS > > -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS > > --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" > > Which percentage of time does it add on GHA? > I'd have to gather some before/after tests to know for sure, but to check it wasn't too heavy-weight I was just monitoring the log at the end of a build on GHA. The specific build I watched took nearly 15 minutes, and I would guess-timate that the extra task took about 20 seconds of that. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-28 11:41 ` Bruce Richardson @ 2021-01-28 18:34 ` Bruce Richardson 2021-01-29 17:42 ` David Marchand 0 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 18:34 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, david.marchand, Aaron Conole, Michael Santana On Thu, Jan 28, 2021 at 11:41:44AM +0000, Bruce Richardson wrote: > On Thu, Jan 28, 2021 at 12:12:44PM +0100, Thomas Monjalon wrote: > > 27/01/2021 18:33, Bruce Richardson: > > > For CI builds, turn on the checking of includes. > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: > > > Aaron Conole <aconole@redhat.com> --- .ci/linux-build.sh | 1 + 1 file > > > changed, 1 insertion(+) > > > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index > > > afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ > > > b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS > > > -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS > > > --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" > > > > Which percentage of time does it add on GHA? > > > I'd have to gather some before/after tests to know for sure, but to check > it wasn't too heavy-weight I was just monitoring the log at the end of a > build on GHA. The specific build I watched took nearly 15 minutes, and I > would guess-timate that the extra task took about 20 seconds of that. Related to this, and to ensure we don't increase the GHA build time massively, is there a reliably way to test this out? Looking at the daily builds on GHA I see some successful builds completing in 7.5 mins, while others take almost 18 minutes. The extra build time from this chkincs takes very little time on my own system but perhaps we want to limit it to a single build on GHA. I'm not very familiar with configuring those builds, so perhaps someone could suggest how to do so. Thanks, /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-28 18:34 ` Bruce Richardson @ 2021-01-29 17:42 ` David Marchand 2021-01-29 21:38 ` Aaron Conole 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-29 17:42 UTC (permalink / raw) To: Bruce Richardson; +Cc: Thomas Monjalon, dev, Aaron Conole, Michael Santana On Thu, Jan 28, 2021 at 7:34 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > On Thu, Jan 28, 2021 at 11:41:44AM +0000, Bruce Richardson wrote: > > On Thu, Jan 28, 2021 at 12:12:44PM +0100, Thomas Monjalon wrote: > > > 27/01/2021 18:33, Bruce Richardson: > > > > For CI builds, turn on the checking of includes. > > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: > > > > Aaron Conole <aconole@redhat.com> --- .ci/linux-build.sh | 1 + 1 file > > > > changed, 1 insertion(+) > > > > > > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index > > > > afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ > > > > b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS > > > > -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS > > > > --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" > > > > > > Which percentage of time does it add on GHA? > > > > > I'd have to gather some before/after tests to know for sure, but to check > > it wasn't too heavy-weight I was just monitoring the log at the end of a > > build on GHA. The specific build I watched took nearly 15 minutes, and I > > would guess-timate that the extra task took about 20 seconds of that. > > Related to this, and to ensure we don't increase the GHA build time > massively, is there a reliably way to test this out? Looking at the daily > builds on GHA I see some successful builds completing in 7.5 mins, while > others take almost 18 minutes. I guess it depends on the changes being tested. We have a ccache regenerated once a week against the main branch. That might help compilations for changes on drivers only. And it might depend on luck too / the resources available on the system that runs the tests. We once hit a case with OVS GHA where the cached DPDK binaries were built on a system that had a more recent cpu (and this is the reason why we now build with -Dmachine=default). > The extra build time from this chkincs takes very little time on my own > system but perhaps we want to limit it to a single build on GHA. I'm not > very familiar with configuring those builds, so perhaps someone could > suggest how to do so. From what I see in ovsrobot/dpdk/actions logs, the impact is small. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds 2021-01-29 17:42 ` David Marchand @ 2021-01-29 21:38 ` Aaron Conole 0 siblings, 0 replies; 165+ messages in thread From: Aaron Conole @ 2021-01-29 21:38 UTC (permalink / raw) To: David Marchand; +Cc: Bruce Richardson, Thomas Monjalon, dev, Michael Santana David Marchand <david.marchand@redhat.com> writes: > On Thu, Jan 28, 2021 at 7:34 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: >> >> On Thu, Jan 28, 2021 at 11:41:44AM +0000, Bruce Richardson wrote: >> > On Thu, Jan 28, 2021 at 12:12:44PM +0100, Thomas Monjalon wrote: >> > > 27/01/2021 18:33, Bruce Richardson: >> > > > For CI builds, turn on the checking of includes. >> > > > >> > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: >> > > > Aaron Conole <aconole@redhat.com> --- .ci/linux-build.sh | 1 + 1 file >> > > > changed, 1 insertion(+) >> > > > >> > > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index >> > > > afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ >> > > > b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS >> > > > -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS >> > > > --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" >> > > >> > > Which percentage of time does it add on GHA? >> > > >> > I'd have to gather some before/after tests to know for sure, but to check >> > it wasn't too heavy-weight I was just monitoring the log at the end of a >> > build on GHA. The specific build I watched took nearly 15 minutes, and I >> > would guess-timate that the extra task took about 20 seconds of that. >> >> Related to this, and to ensure we don't increase the GHA build time >> massively, is there a reliably way to test this out? Looking at the daily >> builds on GHA I see some successful builds completing in 7.5 mins, while >> others take almost 18 minutes. > > I guess it depends on the changes being tested. > We have a ccache regenerated once a week against the main branch. > That might help compilations for changes on drivers only. > > And it might depend on luck too / the resources available on the > system that runs the tests. > We once hit a case with OVS GHA where the cached DPDK binaries were > built on a system that had a more recent cpu (and this is the reason > why we now build with -Dmachine=default). > > >> The extra build time from this chkincs takes very little time on my own >> system but perhaps we want to limit it to a single build on GHA. I'm not >> very familiar with configuring those builds, so perhaps someone could >> suggest how to do so. > > From what I see in ovsrobot/dpdk/actions logs, the impact is small. +1 - it seems negligible from what I can tell. ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 0/8] add checking of header includes 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson ` (7 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds Bruce Richardson @ 2021-01-28 10:55 ` David Marchand 2021-01-28 11:47 ` Bruce Richardson 8 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-01-28 10:55 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon, Ray Kinsella On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > As a general principle, each header file should include any other > headers it needs to provide data type definitions or macros. For > example, any header using the uintX_t types in structures or function > prototypes should include "stdint.h" to provide those type definitions. > > In practice, while many, but not all, headers in DPDK did include all > necessary headers, it was never actually checked that each header could > be included in a C file and compiled without having any compiler errors > about missing definitions. The script "check-includes.sh" could be used > for this job, but it was not called out in the documentation, so many > contributors may not have been aware of it's existance. It also was > difficult to run from a source-code directory, as the script did not > automatically allow finding of headers from one DPDK library directory > to another [this was probably based on running it on a build created by > the "make" build system, where all headers were in a single directory]. > To attempt to have a build-system integrated replacement, this patchset > adds a "chkincs" app in the buildtools directory to verify this on an > ongoing basis. > > This chkincs app does nothing when run, and is not installed as part of > a DPDK "ninja install", it's for build-time checking only. Its source > code consists of one C file per public DPDK header, where that C file > contains nothing except an include for that header. Therefore, if any > header is added to the lib folder which fails to compile when included > alone, the build of chkincs will fail with a suitable error message. > Since this compile checking is not needed on most builds of DPDK, the > building of chkincs is disabled by default, but can be enabled by the > "test_includes" meson option. To catch errors with patch submissions, > the final patch of this series enables it for a single build in > test-meson-builds script. > > Future work could involve doing similar checks on headers for C++ > compatibility, which was something done by the check-includes.sh script > but which is missing here. > > V6: > * Added release notes updates for: > - renamed, no-longer-installed header files > - new "check_includes" build option > - removal of old check_includes script > * Included acks from previous versions I have some comments, see replies on patches. I can address them if you are ok, and I would take this series for -rc2 without needing a respin. Sidenote: I like how we are hiding API by simply not exporting headers. We need more cleanups like this. Ethdev has been cleaned; this will probably remove the need for the ABI exception on eth_dev_ops. Eventdev, other driver classes and bus drivers will probably be the next to look at. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v6 0/8] add checking of header includes 2021-01-28 10:55 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes David Marchand @ 2021-01-28 11:47 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-28 11:47 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon, Ray Kinsella On Thu, Jan 28, 2021 at 11:55:34AM +0100, David Marchand wrote: > On Wed, Jan 27, 2021 at 6:33 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > As a general principle, each header file should include any other > > headers it needs to provide data type definitions or macros. For > > example, any header using the uintX_t types in structures or function > > prototypes should include "stdint.h" to provide those type definitions. > > > > In practice, while many, but not all, headers in DPDK did include all > > necessary headers, it was never actually checked that each header could > > be included in a C file and compiled without having any compiler errors > > about missing definitions. The script "check-includes.sh" could be used > > for this job, but it was not called out in the documentation, so many > > contributors may not have been aware of it's existance. It also was > > difficult to run from a source-code directory, as the script did not > > automatically allow finding of headers from one DPDK library directory > > to another [this was probably based on running it on a build created by > > the "make" build system, where all headers were in a single directory]. > > To attempt to have a build-system integrated replacement, this patchset > > adds a "chkincs" app in the buildtools directory to verify this on an > > ongoing basis. > > > > This chkincs app does nothing when run, and is not installed as part of > > a DPDK "ninja install", it's for build-time checking only. Its source > > code consists of one C file per public DPDK header, where that C file > > contains nothing except an include for that header. Therefore, if any > > header is added to the lib folder which fails to compile when included > > alone, the build of chkincs will fail with a suitable error message. > > Since this compile checking is not needed on most builds of DPDK, the > > building of chkincs is disabled by default, but can be enabled by the > > "test_includes" meson option. To catch errors with patch submissions, > > the final patch of this series enables it for a single build in > > test-meson-builds script. > > > > Future work could involve doing similar checks on headers for C++ > > compatibility, which was something done by the check-includes.sh script > > but which is missing here. > > > > V6: > > * Added release notes updates for: > > - renamed, no-longer-installed header files > > - new "check_includes" build option > > - removal of old check_includes script > > * Included acks from previous versions > > I have some comments, see replies on patches. > I can address them if you are ok, and I would take this series for > -rc2 without needing a respin. > Thomas has some feedback too now, and I think there are one or two patches where we might want to wait for consensus. However, if you are happy to take these as they are and do any fixups yourself feel free. > Sidenote: I like how we are hiding API by simply not exporting headers. > We need more cleanups like this. > Ethdev has been cleaned; this will probably remove the need for the > ABI exception on eth_dev_ops. > Eventdev, other driver classes and bus drivers will probably be the > next to look at. > Yes, there is plenty more cleanup work still needed. * The chkincs support added here integrates nicely into the build but does not fully support everything that the old script did, so investigation is needed especially for c++ checking support. * Beyond that we should also look to do cleanup based on IWYU to remove excess headers. This work gives us a nice safety-net for that as it should flag to us if we every remove too much from a public header. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 00/10] add checking of header includes 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson ` (24 preceding siblings ...) 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 01/10] eal: add missing include to mcslock Bruce Richardson ` (10 more replies) 25 siblings, 11 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson As a general principle, each header file should include any other headers it needs to provide data type definitions or macros. For example, any header using the uintX_t types in structures or function prototypes should include "stdint.h" to provide those type definitions. In practice, while many, but not all, headers in DPDK did include all necessary headers, it was never actually checked that each header could be included in a C file and compiled without having any compiler errors about missing definitions. The script "check-includes.sh" could be used for this job, but it was not called out in the documentation, so many contributors may not have been aware of it's existance. It also was difficult to run from a source-code directory, as the script did not automatically allow finding of headers from one DPDK library directory to another [this was probably based on running it on a build created by the "make" build system, where all headers were in a single directory]. To attempt to have a build-system integrated replacement, this patchset adds a "chkincs" app in the buildtools directory to verify this on an ongoing basis. This chkincs app does nothing when run, and is not installed as part of a DPDK "ninja install", it's for build-time checking only. Its source code consists of one C file per public DPDK header, where that C file contains nothing except an include for that header. Therefore, if any header is added to the lib folder which fails to compile when included alone, the build of chkincs will fail with a suitable error message. Since this compile checking is not needed on most builds of DPDK, the building of chkincs is disabled by default, but can be enabled by the "test_includes" meson option. To catch errors with patch submissions, the final patch of this series enables it for a single build in test-meson-builds script. Future work could involve doing similar checks on headers for C++ compatibility, which was something done by the check-includes.sh script but which is missing here. V7: * fixed issue with compilers not supporting __has_attribute * added patch to add missing headers to power library .h file * added patch to make eventdev headers non-public * renamed headers_no_chkincs to indirect_headers V6: * Added release notes updates for: - renamed, no-longer-installed header files - new "check_includes" build option - removal of old check_includes script * Included acks from previous versions V5: * Removed private ethdev headers from checks and installing * Removed the ALLOW_INTERNAL_APIS macro from chkincs build. V4: * Fixed build errors with clang and arm builds * Added support for running chkincs as part of github actions CI V3: * Shrunk patchset as most header fixes already applied * Moved chkincs from "apps" to the "buildtools" directory, which is a better location for something not for installation for end-user use. * Added patch to drop check-includes script. V2: * Add maintainers file entry for new app * Drop patch for c11 ring header * Use build variable "headers_no_chkincs" for tracking exceptions *** SUBJECT HERE *** *** BLURB HERE *** Bruce Richardson (10): eal: add missing include to mcslock eal: fix error attribute use for clang power: fix missing header includes rib: fix missing header include ethdev: make driver-only headers private eventdev: make driver-only headers private build: separate out headers for include checking buildtools/chkincs: add app to verify header includes devtools: remove check-includes script ci: add checking of includes to CI builds .ci/linux-build.sh | 1 + MAINTAINERS | 2 +- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- buildtools/chkincs/gen_c_file_for_header.py | 12 + buildtools/chkincs/main.c | 4 + buildtools/chkincs/meson.build | 36 +++ devtools/check-includes.sh | 259 ------------------ devtools/test-meson-builds.sh | 2 +- doc/guides/contributing/coding_style.rst | 12 + doc/guides/rel_notes/release_21_02.rst | 24 ++ drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dlb/dlb.c | 2 +- drivers/event/dlb/dlb_priv.h | 4 +- drivers/event/dlb/rte_pmd_dlb.c | 2 +- drivers/event/dlb2/dlb2.c | 2 +- drivers/event/dlb2/pf/dlb2_pf.c | 4 +- drivers/event/dlb2/rte_pmd_dlb2.c | 2 +- drivers/event/dpaa/dpaa_eventdev.c | 2 +- drivers/event/dpaa/dpaa_eventdev.h | 4 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.h | 4 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/dsw/dsw_evdev.c | 4 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/event/octeontx/ssovf_evdev.h | 2 +- drivers/event/octeontx2/otx2_evdev.c | 2 +- drivers/event/octeontx2/otx2_evdev.h | 2 +- drivers/event/opdl/opdl_evdev.h | 2 +- drivers/event/skeleton/skeleton_eventdev.h | 4 +- drivers/event/sw/sw_evdev.h | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 +- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 +- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 +- drivers/net/cxgbe/cxgbe_main.c | 4 +- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 +- drivers/net/cxgbe/cxgbevf_main.c | 4 +- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 +- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_flow.c | 4 +- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 +- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 +- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 +- drivers/net/failsafe/failsafe.c | 4 +- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 +- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 +- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 +- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 +- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 +- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 +- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 +- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 +- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 +- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 +- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 +- drivers/net/memif/rte_eth_memif.c | 4 +- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 +- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 +- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 +- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 +- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 +- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 +- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 +- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 +- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 +- .../net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 +- drivers/net/tap/rte_eth_tap.c | 4 +- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 +- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 +- drivers/net/virtio/virtio_ethdev.c | 4 +- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_eal/include/generic/rte_mcslock.h | 1 + lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/include/rte_compat.h | 13 +- lib/librte_eal/x86/include/meson.build | 14 +- .../{rte_ethdev_driver.h => ethdev_driver.h} | 0 .../{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- .../{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 8 +- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- .../{rte_eventdev_pmd.h => eventdev_pmd.h} | 0 ..._eventdev_pmd_pci.h => eventdev_pmd_pci.h} | 2 +- ...ventdev_pmd_vdev.h => eventdev_pmd_vdev.h} | 2 +- lib/librte_eventdev/meson.build | 3 - .../rte_event_crypto_adapter.c | 2 +- .../rte_event_eth_rx_adapter.c | 2 +- .../rte_event_eth_tx_adapter.c | 2 +- lib/librte_eventdev/rte_event_timer_adapter.c | 2 +- lib/librte_eventdev/rte_eventdev.c | 2 +- lib/librte_hash/meson.build | 4 +- lib/librte_ipsec/meson.build | 3 +- lib/librte_lpm/meson.build | 2 +- lib/librte_power/rte_power_guest_channel.h | 6 + lib/librte_regexdev/meson.build | 2 +- lib/librte_rib/rte_rib6.h | 1 + lib/librte_ring/meson.build | 4 +- lib/librte_stack/meson.build | 4 +- lib/librte_table/meson.build | 7 +- lib/meson.build | 3 + meson.build | 6 + meson_options.txt | 2 + 301 files changed, 474 insertions(+), 611 deletions(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build delete mode 100755 devtools/check-includes.sh rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) rename lib/librte_eventdev/{rte_eventdev_pmd.h => eventdev_pmd.h} (100%) rename lib/librte_eventdev/{rte_eventdev_pmd_pci.h => eventdev_pmd_pci.h} (99%) rename lib/librte_eventdev/{rte_eventdev_pmd_vdev.h => eventdev_pmd_vdev.h} (98%) -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 01/10] eal: add missing include to mcslock 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 02/10] eal: fix error attribute use for clang Bruce Richardson ` (9 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Honnappa Nagarahalli, Gavin Hu, Phil Yang, Steve Capper Include 'rte_branch_prediction.h' to get the likely/unlikely macro definitions. Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> --- lib/librte_eal/include/generic/rte_mcslock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h index d370bef17a..9f323bd2a2 100644 --- a/lib/librte_eal/include/generic/rte_mcslock.h +++ b/lib/librte_eal/include/generic/rte_mcslock.h @@ -22,6 +22,7 @@ #include <rte_lcore.h> #include <rte_common.h> #include <rte_pause.h> +#include <rte_branch_prediction.h> /** * The rte_mcslock_t type. -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 02/10] eal: fix error attribute use for clang 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 01/10] eal: add missing include to mcslock Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 03/10] power: fix missing header includes Bruce Richardson ` (8 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, stable, Ray Kinsella, Neil Horman, Haiyue Wang Clang does not have an "error" attribute for functions, so for marking internal functions we need to check for the error attribute, and provide a fallback if it is not present. For clang, we can use "diagnose_if" attribute, similarly checking for its presence before use. Fixes: fba5af82adc8 ("eal: add internal ABI tag definition") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/include/rte_compat.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 4cd8f68d68..2718612cce 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -19,12 +19,23 @@ __attribute__((section(".text.experimental"))) #endif -#ifndef ALLOW_INTERNAL_API +#ifndef __has_attribute +/* if no has_attribute assume no support for attribute too */ +#define __has_attribute(x) 0 +#endif + +#if !defined ALLOW_INTERNAL_API && __has_attribute(error) /* For GCC */ #define __rte_internal \ __attribute__((error("Symbol is not public ABI"), \ section(".text.internal"))) +#elif !defined ALLOW_INTERNAL_API && __has_attribute(diagnose_if) /* For clang */ + +#define __rte_internal \ +__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ +section(".text.internal"))) + #else #define __rte_internal \ -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 03/10] power: fix missing header includes 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 01/10] eal: add missing include to mcslock Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 02/10] eal: fix error attribute use for clang Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 04/10] rib: fix missing header include Bruce Richardson ` (7 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, David Hunt The rte_power_guest_channel.h file did not include it's dependent headers, so add them. Fixes: 5f443cc0f905 ("power: create guest channel public header file") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- This is one of those issues where it's hard to identify exactly where the issue started, so picking the commit making the file a public one. --- lib/librte_power/rte_power_guest_channel.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h index adc9738174..ed4fbfdcd3 100644 --- a/lib/librte_power/rte_power_guest_channel.h +++ b/lib/librte_power/rte_power_guest_channel.h @@ -4,6 +4,12 @@ #ifndef RTE_POWER_GUEST_CHANNEL_H #define RTE_POWER_GUEST_CHANNEL_H +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> + +#include <rte_compat.h> + #ifdef __cplusplus extern "C" { #endif -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 04/10] rib: fix missing header include 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (2 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 03/10] power: fix missing header includes Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 05/10] ethdev: make driver-only headers private Bruce Richardson ` (6 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, stable, Vladimir Medvedkin The rte_rib6 header was using RTE_MIN macro from rte_common.h but not including the header file. Fixes: f7e861e21c46 ("rib: support IPv6") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> --- lib/librte_rib/rte_rib6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index b5e10569b9..dbd52928a2 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -20,6 +20,7 @@ #include <rte_memcpy.h> #include <rte_compat.h> +#include <rte_common.h> #ifdef __cplusplus extern "C" { -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 05/10] ethdev: make driver-only headers private 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (3 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 04/10] rib: fix missing header include Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 06/10] eventdev: " Bruce Richardson ` (5 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Maxime Coquelin, Thomas Monjalon, Steven Webster, Chas Williams, Min Hu (Connor), Reshma Pattan, Hemant Agrawal, Sachin Saxena, Nipun Gupta, Jerin Jacob, John W. Linville, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh, Pavel Belous, Matt Peters, Somalapuram Amaranath, Rasesh Mody, Shahed Shaikh, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy, Jeff Guo, Haiyue Wang, Marcin Wojtas, Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Gagandeep Singh, John Daley, Hyong Youb Kim, Konstantin Ananyev, Gaetan Rivet, Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Yisen Zhuang, Lijun Ou, Beilei Xing, David Christensen, Ruifeng Wang, Jingjing Wu, Qiming Yang, Andrew Boyer, Rosen Xu, Ferruh Yigit, Shijith Thotton, Srisivasubramanian Srinivasan, Jakub Grajciar, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Zyta Szpak, Liron Himi, Stephen Hemminger, Long Li, Martin Spinler, Heinrich Kuhn, Tetsuya Mukawa, Harman Kalra, Nithin Dabilpuram, Kiran Kumar K, Akhil Goyal, Andrew Rybchenko, Jasvinder Singh, Cristian Dumitrescu, Keith Wiles, Maciej Czekaj, Jiawen Wu, Jian Wang, Chenbo Xia, Yong Wang, Ori Kam The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-By: Steven Webster <steven.webster@windriver.com> --- This patch has some minor conflicts with virtio changes on next-net. The fix for any conflicts is to ensure that any #includes for the renamed files use the new names without the "rte_" prefix. --- app/test/test_link_bonding.c | 2 +- app/test/test_pdump.c | 2 +- app/test/virtual_pmd.c | 2 +- doc/guides/rel_notes/release_21_02.rst | 7 +++++++ drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/dpaa/include/fman.h | 2 +- drivers/bus/fslmc/fslmc_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +- drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++-- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/ark/ark_ethdev_rx.h | 2 +- drivers/net/ark/ark_ethdev_tx.h | 2 +- drivers/net/ark/ark_ext.h | 2 +- drivers/net/ark/ark_global.h | 2 +- drivers/net/ark/ark_pktchkr.c | 2 +- drivers/net/ark/ark_pktgen.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 2 +- drivers/net/atlantic/atl_rxtx.c | 2 +- drivers/net/atlantic/rte_pmd_atlantic.c | 2 +- drivers/net/avp/avp_ethdev.c | 4 ++-- drivers/net/axgbe/axgbe_common.h | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.h | 2 +- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 4 ++-- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bonding/eth_bond_private.h | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- drivers/net/cxgbe/base/t4_hw.c | 2 +- drivers/net/cxgbe/base/t4vf_hw.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_main.c | 4 ++-- drivers/net/cxgbe/cxgbevf_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbevf_main.c | 4 ++-- drivers/net/cxgbe/sge.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 2 +- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_rxtx.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 ++-- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/e1000/igb_flow.c | 4 ++-- drivers/net/e1000/igb_pf.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enetc/enetc_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 4 ++-- drivers/net/enic/enic_flow.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/enic/enic_res.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 +- drivers/net/enic/enic_rxtx_vec_avx2.c | 2 +- drivers/net/enic/enic_vf_representor.c | 4 ++-- drivers/net/failsafe/failsafe.c | 4 ++-- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 +- drivers/net/failsafe/failsafe_rxtx.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 +- drivers/net/hns3/hns3_cmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.h | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_mbx.c | 2 +- drivers/net/hns3/hns3_mp.c | 2 +- drivers/net/hns3/hns3_regs.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx_vec.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/i40e/i40e_flow.c | 2 +- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_common.h | 2 +- drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +- drivers/net/i40e/i40e_vf_representor.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 4 ++-- drivers/net/iavf/iavf_fdir.c | 2 +- drivers/net/iavf/iavf_generic_flow.c | 2 +- drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/iavf/iavf_rxtx.c | 2 +- drivers/net/iavf/iavf_rxtx_vec_common.h | 2 +- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 4 ++-- drivers/net/ice/ice_acl_filter.c | 2 +- drivers/net/ice/ice_dcf.c | 4 ++-- drivers/net/ice/ice_dcf.h | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_generic_flow.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_switch_filter.c | 2 +- drivers/net/igc/igc_ethdev.c | 4 ++-- drivers/net/igc/igc_filter.h | 2 +- drivers/net/igc/igc_txrx.c | 2 +- drivers/net/ionic/ionic_ethdev.c | 4 ++-- drivers/net/ionic/ionic_lif.c | 2 +- drivers/net/ionic/ionic_rxtx.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 ++-- drivers/net/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/ipn3ke/ipn3ke_representor.c | 2 +- drivers/net/ipn3ke/ipn3ke_tm.c | 2 +- drivers/net/ixgbe/ixgbe_bypass.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 4 ++-- drivers/net/ixgbe/ixgbe_pf.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +- drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/kni/rte_eth_kni.c | 4 ++-- drivers/net/liquidio/base/lio_23xx_vf.c | 2 +- drivers/net/liquidio/base/lio_mbox.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 4 ++-- drivers/net/liquidio/lio_rxtx.c | 2 +- drivers/net/memif/memif_socket.c | 4 ++-- drivers/net/memif/rte_eth_memif.c | 4 ++-- drivers/net/memif/rte_eth_memif.h | 2 +- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx4/mlx4.h | 2 +- drivers/net/mlx4/mlx4_ethdev.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 2 +- drivers/net/mlx4/mlx4_flow.h | 2 +- drivers/net/mlx4/mlx4_intr.c | 2 +- drivers/net/mlx4/mlx4_mp.c | 2 +- drivers/net/mlx4/mlx4_rxq.c | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- drivers/net/mlx4/mlx4_txq.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 4 ++-- drivers/net/mlx5/linux/mlx5_verbs.c | 2 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 4 ++-- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_defs.h | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rss.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 2 +- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 2 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_mp_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 2 +- drivers/net/mlx5/windows/mlx5_vlan_os.c | 2 +- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/mvpp2/mrvl_ethdev.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/netvsc/hn_vf.c | 2 +- drivers/net/nfb/nfb_ethdev.c | 2 +- drivers/net/nfb/nfb_tx.h | 2 +- drivers/net/nfp/nfp_net.c | 4 ++-- drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/octeontx/octeontx_ethdev.h | 2 +- drivers/net/octeontx/octeontx_rxtx.c | 2 +- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/octeontx2/otx2_ptp.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 4 ++-- drivers/net/pfe/pfe_eth.h | 2 +- drivers/net/pfe/pfe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.h | 4 ++-- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/sfc/sfc.h | 2 +- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/sfc/sfc_dp_tx.h | 2 +- drivers/net/sfc/sfc_ethdev.c | 4 ++-- drivers/net/sfc/sfc_ev.h | 2 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_rx.h | 2 +- drivers/net/sfc/sfc_tx.h | 2 +- drivers/net/softnic/rte_eth_softnic.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- drivers/net/szedata2/rte_eth_szedata2.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 4 ++-- drivers/net/tap/rte_eth_tap.h | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 4 ++-- drivers/net/thunderx/nicvf_ethdev.h | 2 +- drivers/net/thunderx/nicvf_rxtx.c | 2 +- drivers/net/thunderx/nicvf_rxtx.h | 2 +- drivers/net/thunderx/nicvf_struct.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_pf.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 4 ++-- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_pci.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++-- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} | 0 lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} | 2 +- lib/librte_ethdev/ethdev_private.c | 2 +- lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} | 2 +- lib/librte_ethdev/meson.build | 3 --- lib/librte_ethdev/rte_class_eth.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 2 +- lib/librte_ethdev/rte_flow_driver.h | 2 +- lib/librte_ethdev/rte_mtr_driver.h | 2 +- lib/librte_ethdev/rte_tm_driver.h | 2 +- 252 files changed, 302 insertions(+), 298 deletions(-) rename lib/librte_ethdev/{rte_ethdev_driver.h => ethdev_driver.h} (100%) rename lib/librte_ethdev/{rte_ethdev_pci.h => ethdev_pci.h} (99%) rename lib/librte_ethdev/{rte_ethdev_vdev.h => ethdev_vdev.h} (97%) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index e8b76bd850..8a5c8310a8 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -17,7 +17,7 @@ #include <rte_common.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_lcore.h> #include <rte_memory.h> diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c index 21fcc1bc4c..b49fcfb3f1 100644 --- a/app/test/test_pdump.c +++ b/app/test/test_pdump.c @@ -6,7 +6,7 @@ #include <stdint.h> #include <limits.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pdump.h> #include "rte_eal.h" #include "rte_lcore.h" diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 2c24c9b3f5..7036f401ed 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -4,7 +4,7 @@ #include <rte_mbuf.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_malloc.h> diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 8ea957738f..3831d1ca1e 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -145,11 +145,18 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* The internal header files ``rte_ethdev_driver.h``, ``rte_ethdev_vdev.h`` and + ``rte_ethdev_pci.h`` are no longer installed as part of the DPDK ``ninja + install`` action and are renamed to ``ethdev_driver.h``, ``ethdev_vdev.h`` and + ``ethdev_pci.h`` respectively in the source tree, to reflect the fact that + they are non-public headers. + * Removed support for NetXtreme devices belonging to ``BCM573xx and BCM5740x`` families. Specifically the support for the following Broadcom PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` ``0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9`` has been removed. + API Changes ----------- diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f39d6e2092..662cbfaae5 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -27,7 +27,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_bus.h> diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h index f2b0bf91e7..516c6c1515 100644 --- a/drivers/bus/dpaa/include/fman.h +++ b/drivers/bus/dpaa/include/fman.h @@ -12,7 +12,7 @@ #include <stdbool.h> #include <net/if.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <compat.h> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 58435589b2..26910ac01f 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_devargs.h> #include <rte_memcpy.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_dyn.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index b52f36c33e..c8373e627a 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -22,7 +22,7 @@ #include <eal_filesystem.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index d9619848d8..122aa1740d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -19,7 +19,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf_pool_ops.h> #include <fslmc_logs.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c index d393ce6186..8ed969c7c0 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <fslmc_logs.h> #include <rte_fslmc.h> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 1a9dd18b99..c6f8312a1d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -24,7 +24,7 @@ #include<sys/eventfd.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index eeb2494bd0..e4fa3a2e46 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -24,7 +24,7 @@ #include <rte_memory.h> #include <rte_pci.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cryptodev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index 200b71640b..acc1fde771 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -18,7 +18,7 @@ #include <rte_cycles.h> #include <rte_kvargs.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_fslmc.h> #include <mc/fsl_dpcon.h> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index e60a7dc69e..17325bbf6a 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -8,7 +8,7 @@ #include <rte_debug.h> #include <rte_dev.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <rte_kvargs.h> #include <rte_lcore.h> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 97ce08d78f..ca49a8d42a 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -14,7 +14,7 @@ #include <errno.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 671ee87ae2..bfe5a0a451 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 703b7417ed..b8d5ad0d91 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -19,8 +19,8 @@ #include <bpf/xsk.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index a658993512..ef650a4658 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -7,7 +7,7 @@ #include <dlfcn.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "rte_pmd_ark.h" diff --git a/drivers/net/ark/ark_ethdev_rx.h b/drivers/net/ark/ark_ethdev_rx.h index 001fa9bdfa..33c1f2c953 100644 --- a/drivers/net/ark/ark_ethdev_rx.h +++ b/drivers/net/ark/ark_ethdev_rx.h @@ -9,7 +9,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> extern uint64_t ark_timestamp_rx_dynflag; extern int ark_timestamp_dynfield_offset; diff --git a/drivers/net/ark/ark_ethdev_tx.h b/drivers/net/ark/ark_ethdev_tx.h index e448ce2225..12c71a7158 100644 --- a/drivers/net/ark/ark_ethdev_tx.h +++ b/drivers/net/ark/ark_ethdev_tx.h @@ -7,7 +7,7 @@ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> uint16_t eth_ark_xmit_pkts_noop(void *vtxq, diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h index 5a987e4d67..821fb55bba 100644 --- a/drivers/net/ark/ark_ext.h +++ b/drivers/net/ark/ark_ext.h @@ -5,7 +5,7 @@ #ifndef _ARK_EXT_H_ #define _ARK_EXT_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /* * This is the template file for users who which to define a dynamic diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h index 403df5900b..91726ecc20 100644 --- a/drivers/net/ark/ark_global.h +++ b/drivers/net/ark/ark_global.h @@ -9,7 +9,7 @@ #include <assert.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c index b8fb69497d..0f2d31e5be 100644 --- a/drivers/net/ark/ark_pktchkr.c +++ b/drivers/net/ark/ark_pktchkr.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktchkr.h" diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 4a02662a46..ac4322a359 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ark_pktgen.h" diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index b0716773ad..473f6209f6 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 449ffd454d..7d367c9306 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atlantic/atl_rxtx.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "atl_ethdev.h" diff --git a/drivers/net/atlantic/rte_pmd_atlantic.c b/drivers/net/atlantic/rte_pmd_atlantic.c index 2962f5c6cb..00fc2872e5 100644 --- a/drivers/net/atlantic/rte_pmd_atlantic.c +++ b/drivers/net/atlantic/rte_pmd_atlantic.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Aquantia Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "rte_pmd_atlantic.h" #include "atl_ethdev.h" diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index f531e03c02..566a3606a2 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_malloc.h> diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 91404ca01c..b83fdcca85 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -35,7 +35,7 @@ #include <rte_ethdev.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_common.h> #include <rte_cycles.h> #include <rte_io.h> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index d35c75a2e2..50db70dfcd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -10,7 +10,7 @@ #include <rte_string_fns.h> #include <rte_dev.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_alarm.h> /* diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h index f712bb3e84..fa1c3ba955 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.h +++ b/drivers/net/bnx2x/bnx2x_ethdev.h @@ -31,7 +31,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_eal.h> #include <rte_mempool.h> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index d2d76b623a..0db6e58f3d 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -12,7 +12,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> #include <rte_lcore.h> #include <rte_spinlock.h> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 74b0f3d1dc..e8a7a8ecd4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -7,8 +7,8 @@ #include <stdbool.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_alarm.h> diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h index 3cf2a1b822..50c3d92b9a 100644 --- a/drivers/net/bnxt/bnxt_stats.h +++ b/drivers/net/bnxt/bnxt_stats.h @@ -6,7 +6,7 @@ #ifndef _BNXT_STATS_H_ #define _BNXT_STATS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> void bnxt_free_stats(struct bnxt *bp); int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index d67db46c65..965381c0c4 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -8,7 +8,7 @@ #include <unistd.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_byteorder.h> diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h index 8f198bd50e..75fb8dc02e 100644 --- a/drivers/net/bonding/eth_bond_private.h +++ b/drivers/net/bonding/eth_bond_private.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_spinlock.h> #include <rte_bitmap.h> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 55c8e3167c..17e6ff8b90 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -6,7 +6,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 66ab8dd693..5241c60089 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -7,8 +7,8 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_tcp.h> #include <rte_udp.h> #include <rte_ip.h> diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c index ef20dc6675..0e3033b550 100644 --- a/drivers/net/cxgbe/base/t4_hw.c +++ b/drivers/net/cxgbe/base/t4_hw.c @@ -16,7 +16,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c index cd011bc1b8..561d759dbc 100644 --- a/drivers/net/cxgbe/base/t4vf_hw.c +++ b/drivers/net/cxgbe/base/t4vf_hw.c @@ -3,7 +3,7 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include "common.h" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index cfa385bab7..bfa57c979d 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -28,8 +28,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 3b56eccfbe..83ad758e88 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <rte_dev.h> #include <rte_kvargs.h> diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c index c2918f5356..bf1815c25f 100644 --- a/drivers/net/cxgbe/cxgbevf_ethdev.c +++ b/drivers/net/cxgbe/cxgbevf_ethdev.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include "cxgbe.h" #include "cxgbe_pfvf.h" diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index 9ee060504f..f639612ae4 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -3,8 +3,8 @@ * All rights reserved. */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include "base/common.h" diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 8c7dbe3a1d..56b8ec1f33 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -28,7 +28,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0c87c136d7..d643514de6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -29,7 +29,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index a858b1372c..b5728e09c2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -9,7 +9,7 @@ /* System headers */ #include <stdbool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_event_eth_rx_adapter.h> #include <fsl_usd.h> diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index e2459d9b99..e38fba23c0 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -26,7 +26,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_ring.h> #include <rte_ip.h> diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index 25b1d2bb6d..87c893db51 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 6f38da3cce..38774e255b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 9cca6d16c3..003b379fa7 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -9,7 +9,7 @@ #include <net/if.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 2036c6e917..9b8c4a7de5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -15,8 +15,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 19e3bffd46..db5d1222ce 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index dfe87508c2..ec355cbf35 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_malloc.h> diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index ccb184df95..33f6b1d6b3 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -15,8 +15,8 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_atomic.h> diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c index 9d74c08abe..2ce74dd5a9 100644 --- a/drivers/net/e1000/igb_pf.c +++ b/drivers/net/e1000/igb_pf.c @@ -16,7 +16,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dd520cd82c..1500d2ffff 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 20ff3653c6..c796af4aa7 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -5,8 +5,8 @@ #include <rte_string_fns.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_tcp.h> #include <rte_atomic.h> #include <rte_dev.h> diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 4d2c9c0474..0b45168c60 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -3,7 +3,7 @@ */ #include <stdbool.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_random.h> #include <dpaax_iova_table.h> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 1c8d60e264..b3f441c8f7 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -9,8 +9,8 @@ #include <rte_dev.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_string_fns.h> diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 1eec96abca..97ee7509ce 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_ip.h> diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index ad1e89a581..21d9b1cef7 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -5,7 +5,7 @@ #include <errno.h> #include <stdint.h> #include <rte_log.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow_driver.h> #include <rte_ether.h> #include <rte_hash.h> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 805eb5e46a..2a06d46872 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "enic_compat.h" #include "enic.h" diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index 1405db15ab..689bf748ae 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -4,7 +4,7 @@ */ #include "enic_compat.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "wq_enet_desc.h" #include "rq_enet_desc.h" #include "cq_enet_desc.h" diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 4b6b97eb10..a2a02227e3 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_prefetch.h> diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c index f0bea33423..1848f52717 100644 --- a/drivers/net/enic/enic_rxtx_vec_avx2.c +++ b/drivers/net/enic/enic_rxtx_vec_avx2.c @@ -4,7 +4,7 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vect.h> #include "enic_compat.h" diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c index c2c03c0281..f7b79c1c4e 100644 --- a/drivers/net/enic/enic_vf_representor.c +++ b/drivers/net/enic/enic_vf_representor.c @@ -8,8 +8,8 @@ #include <rte_bus_pci.h> #include <rte_common.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_flow_driver.h> #include <rte_kvargs.h> #include <rte_pci.h> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index ba81c82174..e3bda0df2b 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -7,8 +7,8 @@ #include <rte_alarm.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_devargs.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 492047f587..2b6ca9080d 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -9,7 +9,7 @@ #include <rte_debug.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h index 0f9a572af8..cd39d103c6 100644 --- a/drivers/net/failsafe/failsafe_private.h +++ b/drivers/net/failsafe/failsafe_private.h @@ -12,7 +12,7 @@ #include <rte_atomic.h> #include <rte_dev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_devargs.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c index fee08fa23c..fe67293299 100644 --- a/drivers/net/failsafe/failsafe_rxtx.c +++ b/drivers/net/failsafe/failsafe_rxtx.c @@ -6,7 +6,7 @@ #include <rte_atomic.h> #include <rte_debug.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "failsafe_private.h" diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c187088a33..fd471c415e 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2,8 +2,8 @@ * Copyright(c) 2013-2016 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_string_fns.h> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 4accaa2cd6..8585c5b9e4 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_net.h> #include "fm10k.h" diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index 6fcc939ad9..39e3cdac1f 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "fm10k.h" #include "base/fm10k_type.h" diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c index 41c99bdbf8..cb9cf6efa2 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Huawei Technologies Co., Ltd */ -#include<rte_ethdev_driver.h> +#include<ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_hash.h> #include <rte_jhash.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 5a2c171099..1d6b710c9f 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -4,7 +4,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index c7338d83be..70b4d32ff2 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index f58f4f7adc..45dbead512 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 449d967784..a796469435 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4,7 +4,7 @@ #include <rte_alarm.h> #include <rte_bus_pci.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 0d17170fa7..6374a76794 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -6,7 +6,7 @@ #define _HNS3_ETHDEV_H_ #include <sys/time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_byteorder.h> #include <rte_io.h> #include <rte_spinlock.h> diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index bb4ec6bb39..394ffe38cd 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -4,7 +4,7 @@ #include <linux/pci_regs.h> #include <rte_alarm.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_pci.h> #include <rte_vfio.h> diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 857cc94c98..896540df78 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index d2a5db8aab..1d500b984c 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c index ed2567a8ff..3342a781ad 100644 --- a/drivers/net/hns3/hns3_mp.c +++ b/drivers/net/hns3/hns3_mp.c @@ -3,7 +3,7 @@ */ #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <rte_io.h> diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index f2cb465eed..01550458b7 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -2,7 +2,7 @@ * Copyright(c) 2018-2019 Hisilicon Limited. */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include "hns3_ethdev.h" diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0badfc9260..676962553f 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -6,7 +6,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_net.h> #include <rte_malloc.h> diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c index a26c83d146..2bc4372449 100644 --- a/drivers/net/hns3/hns3_rxtx_vec.c +++ b/drivers/net/hns3/hns3_rxtx_vec.c @@ -3,7 +3,7 @@ */ #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 8c2c8f6108..b02bae7a0d 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -4,7 +4,7 @@ #include <arm_sve.h> #include <rte_io.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "hns3_ethdev.h" #include "hns3_rxtx.h" diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 946994b80a..d7cd049891 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -17,8 +17,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memzone.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 5d7db7fe13..2909b4d894 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -25,8 +25,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index f5defcf585..c572d003cb 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_memzone.h> #include <rte_malloc.h> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7fe760dba2..4d44282312 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 65d649b627..f3d6d899f6 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -14,7 +14,7 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 668edd6626..804fce8606 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c index d3238bfb6a..e6e468752c 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c +++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index e5a1deaeb2..ea554b4fda 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index e92f97b7ed..80b153e8f6 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 31f73f6054..33cebbe88b 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _I40E_RXTX_VEC_COMMON_H_ #define _I40E_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "i40e_ethdev.h" diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index f094de69ae..d81269624e 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -4,7 +4,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 0bcb48e24e..45fce0a022 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "base/i40e_prototype.h" diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 9e40406a3d..7ed47c1a2c 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -7,7 +7,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h" diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index cf6ea0b15c..e9c8c1157a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -19,8 +19,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index f48f574a5d..4e864b4b9c 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index aabbcf34c2..8635ff83ca 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 958c73c4fb..f437fc3170 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1ddbad0f1f..3d471d9acc 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -17,7 +17,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tcp.h> #include <rte_sctp.h> #include <rte_udp.h> diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index 7ad1e0f68a..46a18732d3 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IAVF_RXTX_VEC_COMMON_H_ #define _IAVF_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c index 75c77f9d32..8574d0830f 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "iavf.h" diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 3ef29d509d..8add888987 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -16,8 +16,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include "iavf.h" diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c index 363ce68318..113cb68765 100644 --- a/drivers/net/ice/ice_acl_filter.c +++ b/drivers/net/ice/ice_acl_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 4a9af3292c..dbe42fa3df 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -17,8 +17,8 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memzone.h> #include <rte_dev.h> diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h index ff029963bf..0cb90b5e9f 100644 --- a/drivers/net/ice/ice_dcf.h +++ b/drivers/net/ice/ice_dcf.h @@ -5,7 +5,7 @@ #ifndef _ICE_DCF_H_ #define _ICE_DCF_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <iavf_prototype.h> #include <iavf_adminq_cmd.h> diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index ea1f2951ba..86f70cf7ff 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -14,7 +14,7 @@ #include <rte_atomic.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_memzone.h> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index ec29f0fe40..c021d7ab6c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3,7 +3,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <stdio.h> #include <sys/types.h> diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 2b03c59671..7e9cbd2e9a 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -7,7 +7,7 @@ #include <rte_kvargs.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ice_common.h" #include "base/ice_adminq_cmd.h" diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index c4496dbbe1..25d15a8adb 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 2d23c8dd50..322df649b1 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -12,7 +12,7 @@ #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 69f994579a..4136d045e1 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2018 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include <rte_vect.h> diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 7bac77ecd1..5ca0985e21 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 802212fc57..dbaa7a83e5 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -8,8 +8,8 @@ #include <rte_string_fns.h> #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/igc/igc_filter.h b/drivers/net/igc/igc_filter.h index 877f51c88b..df8516bc40 100644 --- a/drivers/net/igc/igc_filter.h +++ b/drivers/net/igc/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eth_ctrl.h> #include "igc_ethdev.h" diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 4654ec41f0..c0a5d5e84f 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -4,7 +4,7 @@ #include <rte_config.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_net.h> #include "igc_logs.h" diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 2face7c635..ded3ffe48d 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -5,9 +5,9 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "ionic_logs.h" #include "ionic.h" diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index f39b54e8ef..f3d55c0fa6 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -3,7 +3,7 @@ */ #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ionic.h" #include "ionic_logs.h" diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 5d0e9d5d5a..61ad396469 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -31,7 +31,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> #include <rte_tcp.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c index 4446d2af9e..f8e751cb09 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c @@ -11,7 +11,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h index a6815a9cca..ba3f8821e2 100644 --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h @@ -15,8 +15,8 @@ #include <rte_mbuf.h> #include <rte_flow_driver.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c index f857e64afb..c702e19ea5 100644 --- a/drivers/net/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/ipn3ke/ipn3ke_flow.c @@ -13,7 +13,7 @@ #include <rte_io.h> #include <rte_debug.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> #include <rte_eth_ctrl.h> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 9e15cce34f..856d21ef9b 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_spinlock.h> #include <rte_io.h> diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index 17ac026d38..6a9b98fd7f 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_sched.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_rawdev.h> diff --git a/drivers/net/ixgbe/ixgbe_bypass.c b/drivers/net/ixgbe/ixgbe_bypass.c index ae38ce3559..67ced6c723 100644 --- a/drivers/net/ixgbe/ixgbe_bypass.c +++ b/drivers/net/ixgbe/ixgbe_bypass.c @@ -4,7 +4,7 @@ #include <time.h> #include <rte_atomic.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_bypass_api.h" #include "rte_pmd_ixgbe.h" diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c8b9ec8c11..761a0f26bb 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -27,8 +27,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 11b9effeba..27a49bbce5 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -13,7 +13,7 @@ #include <rte_debug.h> #include <rte_pci.h> #include <rte_vxlan.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_logs.h" diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 9aeb2e4a49..0b10e91a9b 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -25,7 +25,7 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_random.h> #include <rte_dev.h> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index 62f2a5f764..e45c5501e6 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -2,8 +2,8 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ip.h> #include <rte_jhash.h> #include <rte_security_driver.h> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 15982af8da..fbf2b17d16 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index c0305a8238..36e6ca9010 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -33,7 +33,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_prefetch.h> #include <rte_udp.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h index a97c27189b..adba855ca3 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h @@ -5,7 +5,7 @@ #ifndef _IXGBE_RXTX_VEC_COMMON_H_ #define _IXGBE_RXTX_VEC_COMMON_H_ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "ixgbe_ethdev.h" #include "ixgbe_rxtx.h" diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c index a5a5b2167f..f83b800ad9 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_vect.h> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c index 90c076825a..9bbffe6119 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c @@ -3,7 +3,7 @@ */ #include <stdint.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c index 8185f0d3bb..d5b636a194 100644 --- a/drivers/net/ixgbe/ixgbe_vf_representor.c +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c @@ -6,7 +6,7 @@ #include <rte_pci.h> #include <rte_malloc.h> -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h" diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d2f708242c..cf089cd9ae 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -2,7 +2,7 @@ * Copyright(c) 2010-2017 Intel Corporation */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "base/ixgbe_api.h" #include "base/ixgbe_x550.h" diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 1696787a9b..9ce74e549b 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -7,8 +7,8 @@ #include <unistd.h> #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kni.h> #include <rte_kvargs.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index ddbc8c0e0c..c6b8310b71 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -4,7 +4,7 @@ #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/liquidio/base/lio_mbox.c b/drivers/net/liquidio/base/lio_mbox.c index 1129001515..2ac2b1b334 100644 --- a/drivers/net/liquidio/base/lio_mbox.c +++ b/drivers/net/liquidio/base/lio_mbox.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include "lio_logs.h" diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index eb0fdab45a..0b189d5d15 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -3,8 +3,8 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_cycles.h> #include <rte_malloc.h> #include <rte_alarm.h> diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 8d705bfe7f..a067b60e47 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -2,7 +2,7 @@ * Copyright(c) 2017 Cavium, Inc */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_malloc.h> diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index c526f90778..5b373738e6 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -13,8 +13,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 8ed9aebab7..77c95bcb7a 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -17,8 +17,8 @@ #include <rte_version.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 765a7e5998..24321d3a39 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -11,7 +11,7 @@ #include <sys/queue.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d5d8c96351..27af426363 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -33,8 +33,8 @@ #include <rte_common.h> #include <rte_dev.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c6cb29493e..63df8fcf2b 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_interrupts.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 9ff05c6738..783ff94dce 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -34,7 +34,7 @@ #include <rte_bus_pci.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_pci.h> diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 2a86382db7..b8ecfa829b 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -27,7 +27,7 @@ #include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 26465c66a4..e4366f28bb 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -18,7 +18,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_byteorder.h> diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index 6786b12ab5..d56009c418 100644 --- a/drivers/net/mlx4/mlx4_intr.c +++ b/drivers/net/mlx4/mlx4_intr.c @@ -23,7 +23,7 @@ #include <rte_alarm.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_io.h> #include <rte_interrupts.h> diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c index eca0c20a8a..e05da89c0e 100644 --- a/drivers/net/mlx4/mlx4_mp.c +++ b/drivers/net/mlx4/mlx4_mp.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include "mlx4.h" diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index 0699bdd5f2..978cbb8201 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -26,7 +26,7 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h index 9de6c59411..7c72ce6d17 100644 --- a/drivers/net/mlx4/mlx4_rxtx.h +++ b/drivers/net/mlx4/mlx4_rxtx.h @@ -19,7 +19,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c index 37b84413fb..8262071505 100644 --- a/drivers/net/mlx4/mlx4_txq.c +++ b/drivers/net/mlx4/mlx4_txq.c @@ -27,7 +27,7 @@ #include <rte_common.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_mempool.h> diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e36a78091c..0e8de9439e 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -24,7 +24,7 @@ #include <sys/un.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c index 08ade75799..60fdee22a1 100644 --- a/drivers/net/mlx5/linux/mlx5_mp_os.c +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c @@ -7,7 +7,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 9ac1d46b1b..7efa7c6cd2 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -16,8 +16,8 @@ #include <fcntl.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c index 318e39b1df..43ff85f9c4 100644 --- a/drivers/net/mlx5/linux/mlx5_verbs.c +++ b/drivers/net/mlx5/linux/mlx5_verbs.c @@ -14,7 +14,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 40e895e080..005904bdfe 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -14,7 +14,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3730f32295..50a6d2b19f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -11,8 +11,8 @@ #include <errno.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 101e9c20d0..4bbf628885 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -15,7 +15,7 @@ #include <rte_pci.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_rwlock.h> #include <rte_interrupts.h> #include <rte_errno.h> diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 85a0979653..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,7 +6,7 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_vxlan.h> #include "mlx5_autoconf.h" diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 45ee7e4488..51b39ddde5 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -10,7 +10,7 @@ #include <stdlib.h> #include <errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_bus_pci.h> #include <rte_mbuf.h> #include <rte_common.h> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2ca6148c1d..6716a20141 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -12,7 +12,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eal_paging.h> #include <rte_flow.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c1ddff7364..707d6749e2 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 2d4381946d..9347490967 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -10,7 +10,7 @@ #include <rte_common.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index bd786fd638..6ffcfcd97a 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -11,7 +11,7 @@ #include <netinet/in.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include "mlx5_defs.h" diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 845cebe2e8..dc0131af3a 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -9,7 +9,7 @@ #include <string.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c index 7613ff770d..cf93ccac86 100644 --- a/drivers/net/mlx5/mlx5_rxmode.c +++ b/drivers/net/mlx5/mlx5_rxmode.c @@ -7,7 +7,7 @@ #include <errno.h> #include <string.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <mlx5_glue.h> #include "mlx5.h" diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 787b2b74dd..92e3a792e1 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_interrupts.h> #include <rte_debug.h> diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 82d4d4a745..a6569b250a 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -8,7 +8,7 @@ #include <stdio.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 48210bf0b2..94dd56709e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -6,7 +6,7 @@ #include <unistd.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c index b38482d4e9..696282ca31 100644 --- a/drivers/net/mlx5/mlx5_txpp.c +++ b/drivers/net/mlx5/mlx5_txpp.c @@ -5,7 +5,7 @@ #include <stdint.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <rte_alarm.h> #include <rte_malloc.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index b81bb4a12d..5142e50858 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_eal_paging.h> diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index dbb9d362f3..64678d3f51 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -8,7 +8,7 @@ #include <stdint.h> #include <unistd.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <rte_malloc.h> #include <rte_hypervisor.h> diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c index 076c688699..8609d38eca 100644 --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c @@ -5,7 +5,7 @@ #include <rte_errno.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_interrupts.h> #include <mlx5_glue.h> diff --git a/drivers/net/mlx5/windows/mlx5_mp_os.c b/drivers/net/mlx5/windows/mlx5_mp_os.c index db793b1f7d..8313c29ffb 100644 --- a/drivers/net/mlx5/windows/mlx5_mp_os.c +++ b/drivers/net/mlx5/windows/mlx5_mp_os.c @@ -6,7 +6,7 @@ #include <time.h> #include <rte_eal.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_string_fns.h> #include <mlx5_common_mp.h> diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index b036432937..e37cc65c17 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -9,7 +9,7 @@ #include <stdlib.h> #include <rte_windows.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <mlx5_glue.h> #include <mlx5_devx_cmds.h> diff --git a/drivers/net/mlx5/windows/mlx5_vlan_os.c b/drivers/net/mlx5/windows/mlx5_vlan_os.c index d3b11e0001..3917c822e4 100644 --- a/drivers/net/mlx5/windows/mlx5_vlan_os.c +++ b/drivers/net/mlx5/windows/mlx5_vlan_os.c @@ -13,7 +13,7 @@ */ #include <sys/types.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_common.h> #include <mlx5.h> diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index 2cd73919ce..b0940b4462 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index f25cf9e46d..1d67f2abf1 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -5,7 +5,7 @@ */ #include <rte_string_fns.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_log.h> #include <rte_malloc.h> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 5a401b4b06..04904b1514 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -24,7 +24,7 @@ #include <rte_atomic.h> #include <rte_branch_prediction.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_cycles.h> #include <rte_errno.h> #include <rte_memory.h> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c index 1ce260c89b..e317539de7 100644 --- a/drivers/net/netvsc/hn_rndis.c +++ b/drivers/net/netvsc/hn_rndis.c @@ -12,7 +12,7 @@ #include <unistd.h> #include <time.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c index 86392917c5..2dc7abe354 100644 --- a/drivers/net/netvsc/hn_vf.c +++ b/drivers/net/netvsc/hn_vf.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_lcore.h> #include <rte_memory.h> #include <rte_bus_vmbus.h> diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index c55bcdf1ef..7e91d59847 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -9,7 +9,7 @@ #include <netcope/rxmac.h> #include <netcope/txmac.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_kvargs.h> #include "nfb_stats.h" diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h index b6578cc38a..28daeae0b8 100644 --- a/drivers/net/nfb/nfb_tx.h +++ b/drivers/net/nfb/nfb_tx.h @@ -10,7 +10,7 @@ #include <nfb/nfb.h> #include <nfb/ndp.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ethdev.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9ea24e5bda..9927c9c44b 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -17,8 +17,8 @@ #include <rte_common.h> #include <rte_log.h> #include <rte_debug.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ether.h> #include <rte_malloc.h> diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h index 1427954c17..78f7b8ca2f 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp.h +++ b/drivers/net/nfp/nfpcore/nfp_cpp.h @@ -6,7 +6,7 @@ #ifndef __NFP_CPP_H__ #define __NFP_CPP_H__ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp-common/nfp_platform.h" #include "nfp-common/nfp_resid.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index 36725d69ab..bad80a5a1c 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -33,7 +33,7 @@ #include <sys/file.h> #include <sys/stat.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include "nfp_cpp.h" diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c index dec4a8b6d1..848c452eab 100644 --- a/drivers/net/nfp/nfpcore/nfp_cppcore.c +++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c @@ -12,7 +12,7 @@ #include <sys/types.h> #include <rte_byteorder.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "nfp_cpp.h" #include "nfp_target.h" diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 49ee8da8e4..32764e8f0e 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -4,8 +4,8 @@ */ #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index 780a094ffa..b73515de37 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -8,7 +8,7 @@ #include <stdbool.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_eventdev.h> #include <rte_mempool.h> #include <rte_memory.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c index bbe43a874b..61865ef0bc 100644 --- a/drivers/net/octeontx/octeontx_rxtx.c +++ b/drivers/net/octeontx/octeontx_rxtx.c @@ -9,7 +9,7 @@ #include <rte_atomic.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index 7c24d8b4fd..2ed28ea563 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -5,7 +5,7 @@ #ifndef __OCTEONTX_RXTX_H__ #define __OCTEONTX_RXTX_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define OFFLOAD_FLAGS \ uint16_t rx_offload_flags; \ diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 9bfe95d6b1..e9fbbca4da 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -4,7 +4,7 @@ #include <inttypes.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_io.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c index 439ec4fa89..a79b997376 100644 --- a/drivers/net/octeontx2/otx2_link.c +++ b/drivers/net/octeontx2/otx2_link.c @@ -3,7 +3,7 @@ */ #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include "otx2_ethdev.h" diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index b8ef4c181d..91e5c0f6bd 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -2,7 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "otx2_ethdev.h" diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index a32b1f3f37..ff02ade70d 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -19,8 +19,8 @@ #include <pcap.h> #include <rte_cycles.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_kvargs.h> #include <rte_malloc.h> #include <rte_mbuf.h> diff --git a/drivers/net/pfe/pfe_eth.h b/drivers/net/pfe/pfe_eth.h index 9820d7bf47..fbc11b4ffb 100644 --- a/drivers/net/pfe/pfe_eth.h +++ b/drivers/net/pfe/pfe_eth.h @@ -7,7 +7,7 @@ #include <compat.h> #include <rte_ethdev.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #define ETH_ALEN 6 #define GEMAC_NO_PHY BIT(0) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3b079693fb..8cf59e210d 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -5,7 +5,7 @@ #include <sys/ioctl.h> #include <sys/epoll.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_ether.h> #include <dpaa_of.h> diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 61a65ac42e..da4b87f5e2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -11,8 +11,8 @@ #include <sys/queue.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_dev.h> #include <rte_ip.h> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 41402a5159..472d838582 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -4,7 +4,7 @@ #include "rte_eth_ring.h" #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_string_fns.h> diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index ed059e142f..fdee800482 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -14,7 +14,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_kvargs.h> #include <rte_spinlock.h> #include <rte_atomic.h> diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index f3e00e2e38..f20154b568 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -11,7 +11,7 @@ #define _SFC_DP_RX_H #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" diff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h index 3ecdfcdd28..b4af68984a 100644 --- a/drivers/net/sfc/sfc_dp_tx.h +++ b/drivers/net/sfc/sfc_dp_tx.h @@ -10,7 +10,7 @@ #ifndef _SFC_DP_TX_H #define _SFC_DP_TX_H -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "sfc_dp.h" #include "sfc_debug.h" diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index f2f5336435..d6f6a84eab 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -8,8 +8,8 @@ */ #include <rte_dev.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_errno.h> diff --git a/drivers/net/sfc/sfc_ev.h b/drivers/net/sfc/sfc_ev.h index 3c7e5580e2..03bfb14b5c 100644 --- a/drivers/net/sfc/sfc_ev.h +++ b/drivers/net/sfc/sfc_ev.h @@ -10,7 +10,7 @@ #ifndef _SFC_EV_H_ #define _SFC_EV_H_ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index 4321045d1a..ab1d2cc595 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -10,7 +10,7 @@ #include <rte_byteorder.h> #include <rte_tailq.h> #include <rte_common.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h index d6ee9cf802..0d64b9c8bb 100644 --- a/drivers/net/sfc/sfc_rx.h +++ b/drivers/net/sfc/sfc_rx.h @@ -12,7 +12,7 @@ #include <rte_mbuf.h> #include <rte_mempool.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h index d583ee9c3d..3367bade37 100644 --- a/drivers/net/sfc/sfc_tx.h +++ b/drivers/net/sfc/sfc_tx.h @@ -11,7 +11,7 @@ #define _SFC_TX_H #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include "efx.h" diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 3387ab485f..99d8468c94 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -6,8 +6,8 @@ #include <stdlib.h> #include <string.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index 9c8737c9e2..faf90a5a8c 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -19,7 +19,7 @@ #include <rte_pipeline.h> #include <rte_ethdev_core.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_tm_driver.h> #include <rte_flow_driver.h> #include <rte_mtr_driver.h> diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 7874c4f4f8..6eaeadf1c8 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -15,8 +15,8 @@ #include <libsze2.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 2542de3065..c36d4bf76e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -7,8 +7,8 @@ #include <rte_byteorder.h> #include <rte_common.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> #include <rte_kvargs.h> diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h index ba45de8409..a98ea11a33 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -13,7 +13,7 @@ #include <linux/if_tun.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_gso.h> #include "tap_log.h" diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index c2e7c334d4..c45d6e00a9 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -23,8 +23,8 @@ #include <rte_dev.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> #include <rte_memory.h> diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h index 3914117997..b8dd905d0b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.h +++ b/drivers/net/thunderx/nicvf_ethdev.h @@ -5,7 +5,7 @@ #ifndef __THUNDERX_NICVF_ETHDEV_H__ #define __THUNDERX_NICVF_ETHDEV_H__ -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define THUNDERX_NICVF_PMD_VERSION "2.0" #define THUNDERX_REG_BYTES 8 diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index d0ea95f1d1..91e09ff8d5 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -13,7 +13,7 @@ #include <rte_common.h> #include <rte_cycles.h> #include <rte_errno.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_ether.h> #include <rte_log.h> #include <rte_mbuf.h> diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 1f274b2954..d6ed660b4e 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -6,7 +6,7 @@ #define __THUNDERX_NICVF_RXTX_H__ #include <rte_byteorder.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #define NICVF_RX_OFFLOAD_NONE 0x1 #define NICVF_RX_OFFLOAD_CKSUM 0x2 diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index cf1c281a06..0ca207d0dd 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -11,7 +11,7 @@ #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_interrupts.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memory.h> struct nicvf_rbdr { diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index eef4b6d4a5..23f9d17091 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -7,7 +7,7 @@ #include <stdint.h> #include <string.h> #include <rte_common.h> -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_interrupts.h> #include <rte_log.h> diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index daa523b204..9f4eee4081 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -2,7 +2,7 @@ * Copyright(c) 2015-2020 */ -#include <rte_ethdev_pci.h> +#include <ethdev_pci.h> #include <rte_security_driver.h> #include <rte_cryptodev.h> diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c index 151f2c7a45..e4bd990b96 100644 --- a/drivers/net/txgbe/txgbe_pf.c +++ b/drivers/net/txgbe/txgbe_pf.c @@ -15,7 +15,7 @@ #include <rte_debug.h> #include <rte_eal.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_memcpy.h> #include <rte_malloc.h> #include <rte_random.h> diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 3ad92248c6..ac09e75a3e 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -19,7 +19,7 @@ #include <rte_log.h> #include <rte_debug.h> #include <rte_ethdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_security_driver.h> #include <rte_memzone.h> #include <rte_atomic.h> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 5845bb15f3..d198fc8a8e 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -8,8 +8,8 @@ #include <sys/epoll.h> #include <rte_mbuf.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_driver.h> +#include <ethdev_vdev.h> #include <rte_malloc.h> #include <rte_memcpy.h> #include <rte_bus_vdev.h> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 92a3d4efa5..edcd6203d9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -8,8 +8,8 @@ #include <errno.h> #include <unistd.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_memcpy.h> #include <rte_string_fns.h> #include <rte_memzone.h> diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index ab61e911b8..0382dc5b2c 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> struct virtqueue; struct virtnet_ctl; diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 622d4bf201..fb7382eff7 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c index a26182bb46..f248869a8f 100644 --- a/drivers/net/virtio/virtio_rxtx_simple.c +++ b/drivers/net/virtio/virtio_rxtx_simple.c @@ -15,7 +15,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_string_fns.h> #include <rte_errno.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c index a260ebdf57..f09a1eda49 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c index 12e034dc0a..2cba800807 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c @@ -12,7 +12,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c index 1056e9c20b..85a5a6664a 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c @@ -14,7 +14,7 @@ #include <rte_branch_prediction.h> #include <rte_cycles.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_errno.h> #include <rte_memory.h> #include <rte_mempool.h> diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 241808cd8f..308275b70e 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -13,7 +13,7 @@ #include <rte_malloc.h> #include <rte_kvargs.h> -#include <rte_ethdev_vdev.h> +#include <ethdev_vdev.h> #include <rte_bus_vdev.h> #include <rte_alarm.h> #include <rte_cycles.h> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 23a2ebbefa..ecdecc427c 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -26,8 +26,8 @@ #include <rte_eal.h> #include <rte_alarm.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> -#include <rte_ethdev_pci.h> +#include <ethdev_driver.h> +#include <ethdev_pci.h> #include <rte_string_fns.h> #include <rte_malloc.h> #include <rte_dev.h> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 95c697f8e3..5cf53d4de8 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -32,7 +32,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ether.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> #include <rte_prefetch.h> #include <rte_ip.h> #include <rte_udp.h> diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/ethdev_driver.h similarity index 100% rename from lib/librte_ethdev/rte_ethdev_driver.h rename to lib/librte_ethdev/ethdev_driver.h diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/ethdev_pci.h similarity index 99% rename from lib/librte_ethdev/rte_ethdev_pci.h rename to lib/librte_ethdev/ethdev_pci.h index bf715896ae..8edca82ce8 100644 --- a/lib/librte_ethdev/rte_ethdev_pci.h +++ b/lib/librte_ethdev/ethdev_pci.h @@ -10,7 +10,7 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_config.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * Copy pci device info to the Ethernet device data. diff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c index 162a502fe7..5960c75cc5 100644 --- a/lib/librte_ethdev/ethdev_private.c +++ b/lib/librte_ethdev/ethdev_private.c @@ -3,7 +3,7 @@ */ #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" uint16_t diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/ethdev_vdev.h similarity index 97% rename from lib/librte_ethdev/rte_ethdev_vdev.h rename to lib/librte_ethdev/ethdev_vdev.h index 4ba3f28964..46c75d9e5f 100644 --- a/lib/librte_ethdev/rte_ethdev_vdev.h +++ b/lib/librte_ethdev/ethdev_vdev.h @@ -9,7 +9,7 @@ #include <rte_config.h> #include <rte_malloc.h> #include <rte_bus_vdev.h> -#include <rte_ethdev_driver.h> +#include <ethdev_driver.h> /** * @internal diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index e4b610246f..829abd456b 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,12 +11,9 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_driver.h', 'rte_ethdev_core.h', - 'rte_ethdev_pci.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c index 6338355e25..ca2ce87f7a 100644 --- a/lib/librte_ethdev/rte_class_eth.c +++ b/lib/librte_ethdev/rte_class_eth.c @@ -12,7 +12,7 @@ #include "rte_ethdev.h" #include "rte_ethdev_core.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_private.h" enum eth_params { diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index daf5f24f7e..f40df65e34 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -41,7 +41,7 @@ #include "rte_ethdev_trace.h" #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "ethdev_profile.h" #include "ethdev_private.h" diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index eb299955d4..89b8ba2fc4 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -20,7 +20,7 @@ * - The driver-oriented Ethernet API that exports functions allowing * an Ethernet Poll Mode Driver (PMD) to allocate an Ethernet device instance, * create memzone for HW rings and process registered callbacks, and so on. - * PMDs should include rte_ethdev_driver.h instead of this header. + * PMDs should include ethdev_driver.h instead of this header. * * By default, all the functions of the Ethernet Device API exported by a PMD * are lock-free functions which assume to not be invoked in parallel on diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h index f3d72827cc..dabd819d10 100644 --- a/lib/librte_ethdev/rte_flow_driver.h +++ b/lib/librte_ethdev/rte_flow_driver.h @@ -18,7 +18,7 @@ #include <stdint.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h index 3b39532935..a0ddc2b5f4 100644 --- a/lib/librte_ethdev/rte_mtr_driver.h +++ b/lib/librte_ethdev/rte_mtr_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h index b86ed89c00..45290fb3fd 100644 --- a/lib/librte_ethdev/rte_tm_driver.h +++ b/lib/librte_ethdev/rte_tm_driver.h @@ -18,7 +18,7 @@ #include <rte_errno.h> #include "rte_ethdev.h" -#include "rte_ethdev_driver.h" +#include "ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 06/10] eventdev: make driver-only headers private 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (4 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 05/10] ethdev: make driver-only headers private Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-02-22 22:34 ` Stephen Hemminger 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 07/10] build: separate out headers for include checking Bruce Richardson ` (4 subsequent siblings) 10 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Timothy McDaniel, Hemant Agrawal, Nipun Gupta, Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma, Peter Mccarthy, Harry van Haaren, Abhinandan Gujjar, Jay Jayatheerthan, Erik Gabriel Carrillo The rte_eventdev_pmd*.h files are for drivers only and should be private to DPDK, and not installed for app use. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/rel_notes/release_21_02.rst | 6 ++++++ drivers/event/dlb/dlb.c | 2 +- drivers/event/dlb/dlb_priv.h | 4 ++-- drivers/event/dlb/rte_pmd_dlb.c | 2 +- drivers/event/dlb2/dlb2.c | 2 +- drivers/event/dlb2/pf/dlb2_pf.c | 4 ++-- drivers/event/dlb2/rte_pmd_dlb2.c | 2 +- drivers/event/dpaa/dpaa_eventdev.c | 2 +- drivers/event/dpaa/dpaa_eventdev.h | 4 ++-- drivers/event/dpaa2/dpaa2_eventdev.h | 4 ++-- drivers/event/dsw/dsw_evdev.c | 4 ++-- drivers/event/octeontx/ssovf_evdev.h | 2 +- drivers/event/octeontx2/otx2_evdev.c | 2 +- drivers/event/octeontx2/otx2_evdev.h | 2 +- drivers/event/opdl/opdl_evdev.h | 2 +- drivers/event/skeleton/skeleton_eventdev.h | 4 ++-- drivers/event/sw/sw_evdev.h | 2 +- lib/librte_eventdev/{rte_eventdev_pmd.h => eventdev_pmd.h} | 0 .../{rte_eventdev_pmd_pci.h => eventdev_pmd_pci.h} | 2 +- .../{rte_eventdev_pmd_vdev.h => eventdev_pmd_vdev.h} | 2 +- lib/librte_eventdev/meson.build | 3 --- lib/librte_eventdev/rte_event_crypto_adapter.c | 2 +- lib/librte_eventdev/rte_event_eth_rx_adapter.c | 2 +- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- lib/librte_eventdev/rte_event_timer_adapter.c | 2 +- lib/librte_eventdev/rte_eventdev.c | 2 +- 26 files changed, 35 insertions(+), 32 deletions(-) rename lib/librte_eventdev/{rte_eventdev_pmd.h => eventdev_pmd.h} (100%) rename lib/librte_eventdev/{rte_eventdev_pmd_pci.h => eventdev_pmd_pci.h} (99%) rename lib/librte_eventdev/{rte_eventdev_pmd_vdev.h => eventdev_pmd_vdev.h} (98%) diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 3831d1ca1e..17fcfd661c 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -151,6 +151,12 @@ Removed Items ``ethdev_pci.h`` respectively in the source tree, to reflect the fact that they are non-public headers. +* The internal header files ``rte_eventdev_pmd.h``, ``rte_eventdev_pmd_vdev.h`` and + ``rte_eventdev_pmd_pci.h`` are no longer installed as part of the DPDK ``ninja + install`` action and are renamed to ``eventdev_pmd.h``, ``eventdev_pmd_vdev.h`` and + ``eventdev_pmd_pci.h`` respectively in the source tree, to reflect the fact that + they are non-public headers. + * Removed support for NetXtreme devices belonging to ``BCM573xx and BCM5740x`` families. Specifically the support for the following Broadcom PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c index a65f70882f..64e6df7373 100644 --- a/drivers/event/dlb/dlb.c +++ b/drivers/event/dlb/dlb.c @@ -31,7 +31,7 @@ #include <rte_string_fns.h> #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> +#include <eventdev_pmd.h> #include "dlb_priv.h" #include "dlb_iface.h" diff --git a/drivers/event/dlb/dlb_priv.h b/drivers/event/dlb/dlb_priv.h index 58ff4287df..272e17482f 100644 --- a/drivers/event/dlb/dlb_priv.h +++ b/drivers/event/dlb/dlb_priv.h @@ -10,8 +10,8 @@ #include <rte_bus_pci.h> #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> -#include <rte_eventdev_pmd_pci.h> +#include <eventdev_pmd.h> +#include <eventdev_pmd_pci.h> #include <rte_pci.h> #include "dlb_user.h" diff --git a/drivers/event/dlb/rte_pmd_dlb.c b/drivers/event/dlb/rte_pmd_dlb.c index bc802d381a..8f56dc306a 100644 --- a/drivers/event/dlb/rte_pmd_dlb.c +++ b/drivers/event/dlb/rte_pmd_dlb.c @@ -3,7 +3,7 @@ */ #include "rte_eventdev.h" -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_pmd_dlb.h" #include "dlb_priv.h" #include "dlb_inline_fns.h" diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 5782960158..b28ec58bfb 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -20,7 +20,7 @@ #include <rte_dev.h> #include <rte_errno.h> #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> +#include <eventdev_pmd.h> #include <rte_io.h> #include <rte_kvargs.h> #include <rte_log.h> diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c index 632c4e099f..1a7d8fc294 100644 --- a/drivers/event/dlb2/pf/dlb2_pf.c +++ b/drivers/event/dlb2/pf/dlb2_pf.c @@ -26,8 +26,8 @@ #include <rte_pci.h> #include <rte_bus_pci.h> #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> -#include <rte_eventdev_pmd_pci.h> +#include <eventdev_pmd.h> +#include <eventdev_pmd_pci.h> #include <rte_memory.h> #include <rte_string_fns.h> diff --git a/drivers/event/dlb2/rte_pmd_dlb2.c b/drivers/event/dlb2/rte_pmd_dlb2.c index b09b585f0b..43990e46ac 100644 --- a/drivers/event/dlb2/rte_pmd_dlb2.c +++ b/drivers/event/dlb2/rte_pmd_dlb2.c @@ -3,7 +3,7 @@ */ #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> +#include <eventdev_pmd.h> #include "rte_pmd_dlb2.h" #include "dlb2_priv.h" diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 01ddd0eb63..460375ca30 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -24,7 +24,7 @@ #include <rte_memzone.h> #include <rte_pci.h> #include <rte_eventdev.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd_vdev.h> #include <rte_ethdev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h index 0b3da83a4f..b4535c7b86 100644 --- a/drivers/event/dpaa/dpaa_eventdev.h +++ b/drivers/event/dpaa/dpaa_eventdev.h @@ -5,8 +5,8 @@ #ifndef __DPAA_EVENTDEV_H__ #define __DPAA_EVENTDEV_H__ -#include <rte_eventdev_pmd.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd.h> +#include <eventdev_pmd_vdev.h> #include <rte_atomic.h> #include <rte_per_lcore.h> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h index 785e52032e..bb87bdbab2 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.h +++ b/drivers/event/dpaa2/dpaa2_eventdev.h @@ -5,8 +5,8 @@ #ifndef __DPAA2_EVENTDEV_H__ #define __DPAA2_EVENTDEV_H__ -#include <rte_eventdev_pmd.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd.h> +#include <eventdev_pmd_vdev.h> #include <rte_atomic.h> #include <mc/fsl_dpcon.h> #include <mc/fsl_mc_sys.h> diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 933a5a559b..ae188f7e6b 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -5,8 +5,8 @@ #include <stdbool.h> #include <rte_cycles.h> -#include <rte_eventdev_pmd.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd.h> +#include <eventdev_pmd_vdev.h> #include <rte_random.h> #include <rte_ring_elem.h> diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index 10163151cd..bb1056a955 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -6,7 +6,7 @@ #define __SSOVF_EVDEV_H__ #include <rte_event_eth_tx_adapter.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd_vdev.h> #include <rte_io.h> #include <octeontx_mbox.h> diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c index 0fe014c24a..bb1ff456fb 100644 --- a/drivers/event/octeontx2/otx2_evdev.c +++ b/drivers/event/octeontx2/otx2_evdev.c @@ -7,7 +7,7 @@ #include <rte_bus_pci.h> #include <rte_common.h> #include <rte_eal.h> -#include <rte_eventdev_pmd_pci.h> +#include <eventdev_pmd_pci.h> #include <rte_kvargs.h> #include <rte_mbuf_pool_ops.h> #include <rte_pci.h> diff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h index 0513cb81c9..2971af73b6 100644 --- a/drivers/event/octeontx2/otx2_evdev.h +++ b/drivers/event/octeontx2/otx2_evdev.h @@ -6,7 +6,7 @@ #define __OTX2_EVDEV_H__ #include <rte_eventdev.h> -#include <rte_eventdev_pmd.h> +#include <eventdev_pmd.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> diff --git a/drivers/event/opdl/opdl_evdev.h b/drivers/event/opdl/opdl_evdev.h index 610b58b356..2dca0a8a98 100644 --- a/drivers/event/opdl/opdl_evdev.h +++ b/drivers/event/opdl/opdl_evdev.h @@ -6,7 +6,7 @@ #define _OPDL_EVDEV_H_ #include <rte_eventdev.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd_vdev.h> #include <rte_atomic.h> #include "opdl_ring.h" diff --git a/drivers/event/skeleton/skeleton_eventdev.h b/drivers/event/skeleton/skeleton_eventdev.h index ba64b8aea4..9193f45f47 100644 --- a/drivers/event/skeleton/skeleton_eventdev.h +++ b/drivers/event/skeleton/skeleton_eventdev.h @@ -5,8 +5,8 @@ #ifndef __SKELETON_EVENTDEV_H__ #define __SKELETON_EVENTDEV_H__ -#include <rte_eventdev_pmd_pci.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd_pci.h> +#include <eventdev_pmd_vdev.h> #ifdef RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG #define PMD_DRV_LOG(level, fmt, args...) \ diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h index 1fc07b64fc..5ab6465c83 100644 --- a/drivers/event/sw/sw_evdev.h +++ b/drivers/event/sw/sw_evdev.h @@ -7,7 +7,7 @@ #include "sw_evdev_log.h" #include <rte_eventdev.h> -#include <rte_eventdev_pmd_vdev.h> +#include <eventdev_pmd_vdev.h> #include <rte_atomic.h> #define SW_DEFAULT_CREDIT_QUANTA 32 diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/eventdev_pmd.h similarity index 100% rename from lib/librte_eventdev/rte_eventdev_pmd.h rename to lib/librte_eventdev/eventdev_pmd.h diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/eventdev_pmd_pci.h similarity index 99% rename from lib/librte_eventdev/rte_eventdev_pmd_pci.h rename to lib/librte_eventdev/eventdev_pmd_pci.h index 5f238bf496..d14ea634b8 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h +++ b/lib/librte_eventdev/eventdev_pmd_pci.h @@ -26,7 +26,7 @@ extern "C" { #include <rte_pci.h> #include <rte_bus_pci.h> -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" typedef int (*eventdev_pmd_pci_callback_t)(struct rte_eventdev *dev); diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/eventdev_pmd_vdev.h similarity index 98% rename from lib/librte_eventdev/rte_eventdev_pmd_vdev.h rename to lib/librte_eventdev/eventdev_pmd_vdev.h index 8c64a06743..bc0cf44c8c 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h +++ b/lib/librte_eventdev/eventdev_pmd_vdev.h @@ -24,7 +24,7 @@ extern "C" { #include <rte_eal.h> #include <rte_bus_vdev.h> -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" /** * @internal diff --git a/lib/librte_eventdev/meson.build b/lib/librte_eventdev/meson.build index 0adc2cd2fd..79d36d37bb 100644 --- a/lib/librte_eventdev/meson.build +++ b/lib/librte_eventdev/meson.build @@ -15,9 +15,6 @@ sources = files('rte_eventdev.c', 'rte_event_crypto_adapter.c', 'rte_event_eth_tx_adapter.c') headers = files('rte_eventdev.h', - 'rte_eventdev_pmd.h', - 'rte_eventdev_pmd_pci.h', - 'rte_eventdev_pmd_vdev.h', 'rte_eventdev_trace.h', 'rte_eventdev_trace_fp.h', 'rte_event_ring.h', diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c index b04312128a..d903cdd480 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c @@ -15,7 +15,7 @@ #include <rte_service_component.h> #include "rte_eventdev.h" -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_eventdev_trace.h" #include "rte_event_crypto_adapter.h" diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c index 3c73046551..d8c635e999 100644 --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c @@ -19,7 +19,7 @@ #include <rte_interrupts.h> #include "rte_eventdev.h" -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_eventdev_trace.h" #include "rte_event_eth_rx_adapter.h" diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index cc27bbca32..5b4c42dcff 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -5,7 +5,7 @@ #include <rte_service_component.h> #include <rte_ethdev.h> -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_eventdev_trace.h" #include "rte_event_eth_tx_adapter.h" diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index 4c5e49ea3b..dd7b83087d 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -21,7 +21,7 @@ #include <rte_cycles.h> #include "rte_eventdev.h" -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_eventdev_trace.h" #include "rte_event_timer_adapter.h" #include "rte_event_timer_adapter_pmd.h" diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index afbadc535b..b57363f804 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -35,7 +35,7 @@ #include <rte_telemetry.h> #include "rte_eventdev.h" -#include "rte_eventdev_pmd.h" +#include "eventdev_pmd.h" #include "rte_eventdev_trace.h" static struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS]; -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v7 06/10] eventdev: make driver-only headers private 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 06/10] eventdev: " Bruce Richardson @ 2021-02-22 22:34 ` Stephen Hemminger 0 siblings, 0 replies; 165+ messages in thread From: Stephen Hemminger @ 2021-02-22 22:34 UTC (permalink / raw) To: Bruce Richardson Cc: dev, david.marchand, Timothy McDaniel, Hemant Agrawal, Nipun Gupta, Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma, Peter Mccarthy, Harry van Haaren, Abhinandan Gujjar, Jay Jayatheerthan, Erik Gabriel Carrillo There are many vendors (including some internal Microsoft projects) with drivers that are not in the DPDK tree. Breaking them is not something that should be done, and certainly not in a release that claims API/ABI compatibility. Although these fields should not have been exposed to user in normal header files, you can't just remove them now. Please revert this commit before 20.02 final release. A better solution (like __rte_internal) can be added in the 21.11 release. ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 07/10] build: separate out headers for include checking 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (5 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 06/10] eventdev: " Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes Bruce Richardson ` (3 subsequent siblings) 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev Cc: david.marchand, Bruce Richardson, Konstantin Ananyev, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Yipeng Wang, Sameh Gobriel, Bernard Iremonger, Vladimir Medvedkin, Ori Kam, Honnappa Nagarahalli, Olivier Matz, Cristian Dumitrescu For some libraries, there may be some header files which are not for direct inclusion, but rather are to be included via other header files. To allow later checking of these files for missing includes, we separate out the indirect include files from the direct ones. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- doc/guides/contributing/coding_style.rst | 12 ++++++++++++ lib/librte_eal/include/meson.build | 2 +- lib/librte_eal/x86/include/meson.build | 14 +++++++++----- lib/librte_ethdev/meson.build | 5 +++-- lib/librte_hash/meson.build | 4 ++-- lib/librte_ipsec/meson.build | 3 ++- lib/librte_lpm/meson.build | 2 +- lib/librte_regexdev/meson.build | 2 +- lib/librte_ring/meson.build | 4 +++- lib/librte_stack/meson.build | 4 +++- lib/librte_table/meson.build | 7 +++---- lib/meson.build | 3 +++ meson.build | 1 + meson_options.txt | 2 ++ 14 files changed, 46 insertions(+), 19 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index bb3f3efcbc..734d1901b2 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -891,6 +891,18 @@ headers installed to $PREFIX/include when ``ninja install`` is run. As with source files, these should be specified using the meson ``files()`` function. + When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``indirect_headers`` + variable rather than ``headers``. + +indirect_headers + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``. includes: **Default Value = []**. diff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build index 0dea342e1d..3969cf4ac7 100644 --- a/lib/librte_eal/include/meson.build +++ b/lib/librte_eal/include/meson.build @@ -16,7 +16,6 @@ headers += files( 'rte_dev.h', 'rte_devargs.h', 'rte_eal.h', - 'rte_eal_interrupts.h', 'rte_eal_memconfig.h', 'rte_eal_trace.h', 'rte_errno.h', @@ -49,6 +48,7 @@ headers += files( 'rte_version.h', 'rte_vfio.h', ) +indirect_headers += files('rte_eal_interrupts.h') # special case install the generic headers, since they go in a subdir generic_headers = files( diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build index 549cc21a42..1a6ad0b173 100644 --- a/lib/librte_eal/x86/include/meson.build +++ b/lib/librte_eal/x86/include/meson.build @@ -2,11 +2,7 @@ # Copyright(c) 2017 Intel Corporation arch_headers = files( - 'rte_atomic_32.h', - 'rte_atomic_64.h', 'rte_atomic.h', - 'rte_byteorder_32.h', - 'rte_byteorder_64.h', 'rte_byteorder.h', 'rte_cpuflags.h', 'rte_cycles.h', @@ -22,4 +18,12 @@ arch_headers = files( 'rte_ticketlock.h', 'rte_vect.h', ) -install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +arch_indirect_headers = files( + 'rte_atomic_32.h', + 'rte_atomic_64.h', + 'rte_byteorder_32.h', + 'rte_byteorder_64.h', +) +install_headers(arch_headers + arch_indirect_headers, + subdir: get_option('include_subdir_arch')) +dpdk_chkinc_headers += arch_headers diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index 829abd456b..c37b2e3772 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -11,10 +11,8 @@ sources = files('ethdev_private.c', 'rte_tm.c') headers = files('rte_ethdev.h', - 'rte_ethdev_core.h', 'rte_ethdev_trace.h', 'rte_ethdev_trace_fp.h', - 'rte_eth_ctrl.h', 'rte_dev_info.h', 'rte_flow.h', 'rte_flow_driver.h', @@ -22,5 +20,8 @@ headers = files('rte_ethdev.h', 'rte_mtr_driver.h', 'rte_tm.h', 'rte_tm_driver.h') +indirect_headers += files( + 'rte_ethdev_core.h', + 'rte_eth_ctrl.h') deps += ['net', 'kvargs', 'meter', 'telemetry'] diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index 0977a63fd2..242859f5ad 100644 --- a/lib/librte_hash/meson.build +++ b/lib/librte_hash/meson.build @@ -1,12 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -headers = files('rte_crc_arm64.h', - 'rte_fbk_hash.h', +headers = files('rte_fbk_hash.h', 'rte_hash_crc.h', 'rte_hash.h', 'rte_jhash.h', 'rte_thash.h') +indirect_headers += files('rte_crc_arm64.h') sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c') deps += ['ring'] diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build index fc69970ec5..1497f573bb 100644 --- a/lib/librte_ipsec/meson.build +++ b/lib/librte_ipsec/meson.build @@ -3,6 +3,7 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') -headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') +indirect_headers += files('rte_ipsec_group.h') deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build index f93c866409..90cbf8646a 100644 --- a/lib/librte_lpm/meson.build +++ b/lib/librte_lpm/meson.build @@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers # without worrying about which architecture we actually need -headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') +indirect_headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h') deps += ['hash'] deps += ['rcu'] diff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build index c417b9caf0..1b3b6db22a 100644 --- a/lib/librte_regexdev/meson.build +++ b/lib/librte_regexdev/meson.build @@ -3,6 +3,6 @@ sources = files('rte_regexdev.c') headers = files('rte_regexdev.h', - 'rte_regexdev_core.h', 'rte_regexdev_driver.h') +indirect_headers += files('rte_regexdev_core.h') deps += ['mbuf'] diff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build index f007893b5f..ea050d564a 100644 --- a/lib/librte_ring/meson.build +++ b/lib/librte_ring/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_ring.c') -headers = files('rte_ring.h', +headers = files('rte_ring.h') +# most sub-headers are not for direct inclusion +indirect_headers += files ( 'rte_ring_core.h', 'rte_ring_elem.h', 'rte_ring_elem_pvt.h', diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build index 8f82a40ec2..9ff33722b2 100644 --- a/lib/librte_stack/meson.build +++ b/lib/librte_stack/meson.build @@ -2,7 +2,9 @@ # Copyright(c) 2019 Intel Corporation sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c') -headers = files('rte_stack.h', +headers = files('rte_stack.h') +# subheaders, not for direct inclusion by apps +indirect_headers += files( 'rte_stack_std.h', 'rte_stack_lf.h', 'rte_stack_lf_generic.h', diff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build index d69678386e..aa1e1d0385 100644 --- a/lib/librte_table/meson.build +++ b/lib/librte_table/meson.build @@ -20,7 +20,6 @@ headers = files('rte_table.h', 'rte_table_hash.h', 'rte_table_hash_cuckoo.h', 'rte_table_hash_func.h', - 'rte_table_hash_func_arm64.h', 'rte_lru.h', 'rte_table_array.h', 'rte_table_stub.h', @@ -28,6 +27,6 @@ headers = files('rte_table.h', 'rte_swx_table_em.h',) deps += ['mbuf', 'port', 'lpm', 'hash', 'acl'] -if arch_subdir == 'x86' - headers += files('rte_lru_x86.h') -endif +indirect_headers += files('rte_lru_x86.h', + 'rte_lru_arm64.h', + 'rte_table_hash_func_arm64.h') diff --git a/lib/meson.build b/lib/meson.build index 44f0a62142..7712aa4977 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -66,6 +66,7 @@ foreach l:libraries use_function_versioning = false sources = [] headers = [] + indirect_headers = [] # public headers not directly included by apps includes = [] cflags = default_cflags objs = [] # other object files to link against, used e.g. for @@ -103,6 +104,8 @@ foreach l:libraries enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) + install_headers(indirect_headers) + dpdk_chkinc_headers += headers libname = 'rte_' + name includes += include_directories(dir_name) diff --git a/meson.build b/meson.build index 2b9c37eb42..e6e34d0a98 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] diff --git a/meson_options.txt b/meson_options.txt index 4604328224..5c382487da 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (6 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 07/10] build: separate out headers for include checking Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-02-02 11:36 ` David Marchand 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 09/10] devtools: remove check-includes script Bruce Richardson ` (2 subsequent siblings) 10 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon To verify that all DPDK headers are ok for inclusion directly in a C file, and are not missing any other pre-requisite headers, we can auto-generate for each header an empty C file that includes that header. Compiling these files will throw errors if any header has unmet dependencies. To ensure ongoing compliance, we enable this build test as part of the default x86 build in "test-meson-builds.sh". Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 + buildtools/chkincs/gen_c_file_for_header.py | 12 +++++++ buildtools/chkincs/main.c | 4 +++ buildtools/chkincs/meson.build | 36 +++++++++++++++++++++ devtools/test-meson-builds.sh | 2 +- doc/guides/rel_notes/release_21_02.rst | 8 +++++ meson.build | 5 +++ 7 files changed, 67 insertions(+), 1 deletion(-) create mode 100755 buildtools/chkincs/gen_c_file_for_header.py create mode 100644 buildtools/chkincs/main.c create mode 100644 buildtools/chkincs/meson.build diff --git a/MAINTAINERS b/MAINTAINERS index 1a12916f56..aeefe3b1be 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -98,6 +98,7 @@ F: Makefile F: meson.build F: meson_options.txt F: config/ +F: buildtools/chkincs/ F: buildtools/call-sphinx-build.py F: buildtools/list-dir-globs.py F: buildtools/pkg-config/ diff --git a/buildtools/chkincs/gen_c_file_for_header.py b/buildtools/chkincs/gen_c_file_for_header.py new file mode 100755 index 0000000000..ed46948aea --- /dev/null +++ b/buildtools/chkincs/gen_c_file_for_header.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +from sys import argv +from os.path import abspath + +(h_file, c_file) = argv[1:] + +contents = '#include "' + abspath(h_file) + '"' +with open(c_file, 'w') as cf: + cf.write(contents) diff --git a/buildtools/chkincs/main.c b/buildtools/chkincs/main.c new file mode 100644 index 0000000000..d25bb8852a --- /dev/null +++ b/buildtools/chkincs/main.c @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2021 Intel Corporation + */ +int main(void) { return 0; } diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build new file mode 100644 index 0000000000..f345e87551 --- /dev/null +++ b/buildtools/chkincs/meson.build @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +if not get_option('check_includes') + build = false + subdir_done() +endif + +if is_windows + # for windows, the shebang line in the script won't work. + error('option "check_includes" is not supported on windows') +endif + +gen_c_file_for_header = find_program('gen_c_file_for_header.py') +gen_c_files = generator(gen_c_file_for_header, + output: '@BASENAME@.c', + arguments: ['@INPUT@', '@OUTPUT@']) + +cflags = machine_args +cflags += '-Wno-unused-function' # needed if we include generic headers +cflags += '-DALLOW_EXPERIMENTAL_API' + +sources = files('main.c') +sources += gen_c_files.process(dpdk_chkinc_headers) + +deps = [] +foreach l:enabled_libs + deps += get_variable('static_rte_' + l) +endforeach + +executable('chkincs', sources, + c_args: cflags, + include_directories: includes, + dependencies: deps, + link_whole: dpdk_static_libraries + dpdk_drivers, + install: false) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index efa91e0e40..a99a177e0c 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,7 +227,7 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc skipABI \ +build build-x86-default cc skipABI -Dcheck_includes=true \ -Dlibdir=lib -Dmachine=$default_machine $use_shared # 32-bit with default compiler diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index 17fcfd661c..fc3bf51cb6 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -132,6 +132,14 @@ New Features * Added support for aes-cbc sha256-128-hmac cipher combination in OCTEON TX2 crypto PMD lookaside protocol offload for IPsec. +* **Added support for build-time checking of header includes** + + A new build option ``check_includes`` has been added, which, when enabled, + will perform build-time checking on DPDK public header files, to ensure none + are missing dependent header includes. This feature, disabled by default, is + intended for use by developers contributing to the DPDK SDK itself, and is + integrated into the build scripts and automated CI for patch contributions. + Removed Items ------------- diff --git a/meson.build b/meson.build index e6e34d0a98..fcc4d4c900 100644 --- a/meson.build +++ b/meson.build @@ -68,6 +68,11 @@ if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-02-02 11:36 ` David Marchand 2021-02-02 12:23 ` Bruce Richardson 0 siblings, 1 reply; 165+ messages in thread From: David Marchand @ 2021-02-02 11:36 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Fri, Jan 29, 2021 at 5:49 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build > new file mode 100644 > index 0000000000..f345e87551 > --- /dev/null > +++ b/buildtools/chkincs/meson.build > @@ -0,0 +1,36 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2021 Intel Corporation > + > +if not get_option('check_includes') > + build = false > + subdir_done() > +endif > + > +if is_windows > + # for windows, the shebang line in the script won't work. > + error('option "check_includes" is not supported on windows') > +endif > + > +gen_c_file_for_header = find_program('gen_c_file_for_header.py') > +gen_c_files = generator(gen_c_file_for_header, > + output: '@BASENAME@.c', > + arguments: ['@INPUT@', '@OUTPUT@']) > + > +cflags = machine_args > +cflags += '-Wno-unused-function' # needed if we include generic headers With http://patchwork.dpdk.org/patch/87567/, we have no direct inclusion of the generic headers remaining. This flag could be removed. WDYT? > +cflags += '-DALLOW_EXPERIMENTAL_API' > + > +sources = files('main.c') > +sources += gen_c_files.process(dpdk_chkinc_headers) > + -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes 2021-02-02 11:36 ` David Marchand @ 2021-02-02 12:23 ` Bruce Richardson 0 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-02-02 12:23 UTC (permalink / raw) To: David Marchand; +Cc: dev, Thomas Monjalon On Tue, Feb 02, 2021 at 12:36:34PM +0100, David Marchand wrote: > On Fri, Jan 29, 2021 at 5:49 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build > > new file mode 100644 > > index 0000000000..f345e87551 > > --- /dev/null > > +++ b/buildtools/chkincs/meson.build > > @@ -0,0 +1,36 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2021 Intel Corporation > > + > > +if not get_option('check_includes') > > + build = false > > + subdir_done() > > +endif > > + > > +if is_windows > > + # for windows, the shebang line in the script won't work. > > + error('option "check_includes" is not supported on windows') > > +endif > > + > > +gen_c_file_for_header = find_program('gen_c_file_for_header.py') > > +gen_c_files = generator(gen_c_file_for_header, > > + output: '@BASENAME@.c', > > + arguments: ['@INPUT@', '@OUTPUT@']) > > + > > +cflags = machine_args > > +cflags += '-Wno-unused-function' # needed if we include generic headers > > With http://patchwork.dpdk.org/patch/87567/, we have no direct > inclusion of the generic headers remaining. > This flag could be removed. > WDYT? > If it can be removed, it should be, IMHO. /Bruce ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 09/10] devtools: remove check-includes script 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (7 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes Bruce Richardson @ 2021-01-29 16:48 ` Bruce Richardson 2021-01-29 16:55 ` [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds Bruce Richardson 2021-01-29 20:14 ` [dpdk-dev] [PATCH v7 00/10] add checking of header includes David Marchand 10 siblings, 0 replies; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:48 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon The check-includes script allowed checking header files in a given directory to ensure that each header compiled alone without requiring any other header inclusions. With header checking now being done by the chkincs app in the build system this script can be removed. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- MAINTAINERS | 1 - devtools/check-includes.sh | 259 ------------------------- doc/guides/rel_notes/release_21_02.rst | 3 + 3 files changed, 3 insertions(+), 260 deletions(-) delete mode 100755 devtools/check-includes.sh diff --git a/MAINTAINERS b/MAINTAINERS index aeefe3b1be..71c3413cfa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -81,7 +81,6 @@ F: devtools/check-dup-includes.sh F: devtools/check-maintainers.sh F: devtools/check-forbidden-tokens.awk F: devtools/check-git-log.sh -F: devtools/check-includes.sh F: devtools/check-spdx-tag.sh F: devtools/check-symbol-maps.sh F: devtools/checkpatches.sh diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh deleted file mode 100755 index 940cf0eb2a..0000000000 --- a/devtools/check-includes.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016 6WIND S.A. - -# This script checks that header files in a given directory do not miss -# dependencies when included on their own, do not conflict and accept being -# compiled with the strictest possible flags. -# -# Files are looked up in the directory provided as the first argument, -# otherwise build/include by default. -# -# Recognized environment variables: -# -# VERBOSE=1 is the same as -v. -# -# QUIET=1 is the same as -q. -# -# SUMMARY=1 is the same as -s. -# -# CC, CPPFLAGS, CFLAGS, CXX, CXXFLAGS are taken into account. -# -# PEDANTIC_CFLAGS, PEDANTIC_CXXFLAGS and PEDANTIC_CPPFLAGS provide strict -# C/C++ compilation flags. -# -# IGNORE contains a list of globbing patterns matching files (relative to the -# include directory) to avoid. It is set by default to known DPDK headers -# which must not be included on their own. -# -# IGNORE_CXX provides additional files for C++. - -while getopts hqvs arg; do - case $arg in - h) - cat <<EOF -usage: $0 [-h] [-q] [-v] [-s] [DIR] - -This script checks that header files in a given directory do not miss -dependencies when included on their own, do not conflict and accept being -compiled with the strictest possible flags. - - -h display this help and exit - -q quiet mode, disable normal output - -v show command lines being executed - -s show summary - -With no DIR, default to build/include. - -Any failed header check yields a nonzero exit status. -EOF - exit - ;; - q) - QUIET=1 - ;; - v) - VERBOSE=1 - ;; - s) - SUMMARY=1 - ;; - *) - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -include_dir=${1:-build/include} - -: ${PEDANTIC_CFLAGS=-std=c99 -pedantic -Wall -Wextra -Werror} -: ${PEDANTIC_CXXFLAGS=} -: ${PEDANTIC_CPPFLAGS=-D_XOPEN_SOURCE=600} -: ${CC:=cc} -: ${CXX:=c++} -: ${IGNORE= \ - 'rte_atomic_32.h' \ - 'rte_atomic_64.h' \ - 'rte_byteorder_32.h' \ - 'rte_byteorder_64.h' \ - 'generic/*' \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ - 'rte_eal_interrupts.h' \ -} -: ${IGNORE_CXX= \ - 'rte_vhost.h' \ - 'rte_eth_vhost.h' \ -} - -temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c) -pass_cc= -failures_cc=0 - -temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc) -pass_cxx= -failures_cxx=0 - -# Process output parameters. - -[ "$QUIET" = 1 ] && -exec 1> /dev/null - -[ "$VERBOSE" = 1 ] && -output () -{ - local CCV - local CXXV - - shift - CCV=$CC - CXXV=$CXX - CC="echo $CC" CXX="echo $CXX" "$@" - CC=$CCV - CXX=$CXXV - - "$@" -} || -output () -{ - - printf ' %s\n' "$1" - shift - "$@" -} - -trap 'rm -f "$temp_cc" "$temp_cxx"' EXIT - -compile_cc () -{ - ${CC} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CFLAGS} ${CFLAGS} \ - -c -o /dev/null "${temp_cc}" -} - -compile_cxx () -{ - ${CXX} -I"$include_dir" \ - ${PEDANTIC_CPPFLAGS} ${CPPFLAGS} \ - ${PEDANTIC_CXXFLAGS} ${CXXFLAGS} \ - -c -o /dev/null "${temp_cxx}" -} - -ignore () -{ - file="$1" - shift - while [ $# -ne 0 ]; do - case "$file" in - $1) - return 0 - ;; - esac - shift - done - return 1 -} - -# Check C/C++ compilation for each header file. - -while read -r path -do - file=${path#$include_dir} - file=${file##/} - if ignore "$file" $IGNORE; then - output "SKIP $file" : - continue - fi - if printf "\ -#include <%s> - -int main(void) -{ - return 0; -} -" "$file" > "$temp_cc" && - output "CC $file" compile_cc - then - pass_cc="$pass_cc $file" - else - failures_cc=$(($failures_cc + 1)) - fi - if ignore "$file" $IGNORE_CXX; then - output "SKIP CXX $file" : - continue - fi - if printf "\ -#include <%s> - -int main() -{ -} -" "$file" > "$temp_cxx" && - output "CXX $file" compile_cxx - then - pass_cxx="$pass_cxx $file" - else - failures_cxx=$(($failures_cxx + 1)) - fi -done <<EOF -$(find "$include_dir" -name '*.h') -EOF - -# Check C compilation with all includes. - -: > "$temp_cc" && -for file in $pass_cc; do - printf "\ -#include <%s> -" "$file" >> $temp_cc -done -if printf "\ -int main(void) -{ - return 0; -} -" >> "$temp_cc" && - output "CC (all includes that did not fail)" compile_cc -then - : -else - failures_cc=$(($failures_cc + 1)) -fi - -# Check C++ compilation with all includes. - -: > "$temp_cxx" && -for file in $pass_cxx; do - printf "\ -#include <%s> -" "$file" >> $temp_cxx -done -if printf "\ -int main() -{ -} -" >> "$temp_cxx" && - output "CXX (all includes that did not fail)" compile_cxx -then - : -else - failures_cxx=$(($failures_cxx + 1)) -fi - -# Report results. - -if [ "$SUMMARY" = 1 ]; then - printf "\ -Summary: - %u failure(s) for C using '%s'. - %u failure(s) for C++ using '%s'. -" $failures_cc "$CC" $failures_cxx "$CXX" 1>&2 -fi - -# Exit with nonzero status if there are failures. - -[ $failures_cc -eq 0 ] && -[ $failures_cxx -eq 0 ] diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index fc3bf51cb6..5df712809c 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -170,6 +170,9 @@ Removed Items PCI device IDs ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df, 0x16d0,`` ``0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9`` has been removed. +* The ``check-includes.sh`` script for checking DPDK header files has been + removed, being replaced by the ``check_includes`` build option described above. + API Changes ----------- -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (8 preceding siblings ...) 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 09/10] devtools: remove check-includes script Bruce Richardson @ 2021-01-29 16:55 ` Bruce Richardson 2021-01-29 21:37 ` Aaron Conole 2021-01-29 20:14 ` [dpdk-dev] [PATCH v7 00/10] add checking of header includes David Marchand 10 siblings, 1 reply; 165+ messages in thread From: Bruce Richardson @ 2021-01-29 16:55 UTC (permalink / raw) To: dev; +Cc: david.marchand, Bruce Richardson, Aaron Conole, Michael Santana For CI builds, turn on the checking of includes. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- .ci/linux-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index afa3689a09..fdbeb5a616 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -57,6 +57,7 @@ fi OPTS="$OPTS -Dmachine=default" OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS --buildtype=debugoptimized" +OPTS="$OPTS -Dcheck_includes=true" meson build --werror $OPTS ninja -C build -- 2.27.0 ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds 2021-01-29 16:55 ` [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds Bruce Richardson @ 2021-01-29 21:37 ` Aaron Conole 0 siblings, 0 replies; 165+ messages in thread From: Aaron Conole @ 2021-01-29 21:37 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, david.marchand, Michael Santana Bruce Richardson <bruce.richardson@intel.com> writes: > For CI builds, turn on the checking of includes. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- Acked-by: Aaron Conole <aconole@redhat.com> ^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [dpdk-dev] [PATCH v7 00/10] add checking of header includes 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson ` (9 preceding siblings ...) 2021-01-29 16:55 ` [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds Bruce Richardson @ 2021-01-29 20:14 ` David Marchand 10 siblings, 0 replies; 165+ messages in thread From: David Marchand @ 2021-01-29 20:14 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Thomas Monjalon On Fri, Jan 29, 2021 at 5:48 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > As a general principle, each header file should include any other > headers it needs to provide data type definitions or macros. For > example, any header using the uintX_t types in structures or function > prototypes should include "stdint.h" to provide those type definitions. > > In practice, while many, but not all, headers in DPDK did include all > necessary headers, it was never actually checked that each header could > be included in a C file and compiled without having any compiler errors > about missing definitions. The script "check-includes.sh" could be used > for this job, but it was not called out in the documentation, so many > contributors may not have been aware of it's existance. It also was > difficult to run from a source-code directory, as the script did not > automatically allow finding of headers from one DPDK library directory > to another [this was probably based on running it on a build created by > the "make" build system, where all headers were in a single directory]. > To attempt to have a build-system integrated replacement, this patchset > adds a "chkincs" app in the buildtools directory to verify this on an > ongoing basis. > > This chkincs app does nothing when run, and is not installed as part of > a DPDK "ninja install", it's for build-time checking only. Its source > code consists of one C file per public DPDK header, where that C file > contains nothing except an include for that header. Therefore, if any > header is added to the lib folder which fails to compile when included > alone, the build of chkincs will fail with a suitable error message. > Since this compile checking is not needed on most builds of DPDK, the > building of chkincs is disabled by default, but can be enabled by the > "test_includes" meson option. To catch errors with patch submissions, > the final patch of this series enables it for a single build in > test-meson-builds script. > > Future work could involve doing similar checks on headers for C++ > compatibility, which was something done by the check-includes.sh script > but which is missing here. > > V7: > * fixed issue with compilers not supporting __has_attribute > * added patch to add missing headers to power library .h file > * added patch to make eventdev headers non-public > * renamed headers_no_chkincs to indirect_headers I squashed patch 7/8 as commented by Thomas. The series looks good. Series applied, thanks Bruce. -- David Marchand ^ permalink raw reply [flat|nested] 165+ messages in thread
end of thread, other threads:[~2021-02-22 22:34 UTC | newest] Thread overview: 165+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-14 11:05 [dpdk-dev] [PATCH 00/20] ensure headers have correct includes Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 01/20] eal: fix missing header inclusion Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 02/20] telemetry: fix missing header include Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 03/20] ethdev: " Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 04/20] ring: fix missing includes for c11 model header Bruce Richardson 2021-01-14 12:57 ` David Marchand 2021-01-14 13:54 ` Ananyev, Konstantin 2021-01-14 11:05 ` [dpdk-dev] [PATCH 05/20] net: fix missing header include Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 06/20] mbuf: " Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 07/20] bitratestats: " Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 08/20] rib: fix missing header includes Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 09/20] vhost: " Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 10/20] ipsec: fix missing header include Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 11/20] fib: fix missing header includes Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 12/20] table: fix missing header include Bruce Richardson 2021-01-14 11:05 ` [dpdk-dev] [PATCH 13/20] pipeline: fix missing header includes Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 14/20] metrics: fix variable declaration in header Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 15/20] node: fix missing header include Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 16/20] app: fix extra include paths for app builds Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 17/20] app/chkincs: add chkincs app to verify headers Bruce Richardson 2021-01-14 12:16 ` David Marchand 2021-01-14 12:28 ` Bruce Richardson 2021-01-14 12:49 ` David Marchand 2021-01-14 16:04 ` David Marchand 2021-01-14 16:18 ` Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 18/20] eal: add missing include to mcslock Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 19/20] eal/x86: add architecture-specific headers to chkincs Bruce Richardson 2021-01-14 11:06 ` [dpdk-dev] [PATCH 20/20] test-meson-builds: add includes check to default x86 build Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 01/19] eal: fix missing header inclusion Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 02/19] telemetry: fix missing header include Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 03/19] ethdev: " Bruce Richardson 2021-01-15 15:38 ` Andrew Rybchenko 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 04/19] net: " Bruce Richardson 2021-01-16 12:10 ` Ophir Munk 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 05/19] mbuf: " Bruce Richardson 2021-01-15 15:40 ` Andrew Rybchenko 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 06/19] bitratestats: " Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 07/19] rib: fix missing header includes Bruce Richardson 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 08/19] vhost: " Bruce Richardson 2021-01-21 8:38 ` Maxime Coquelin 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 09/19] ipsec: fix missing header include Bruce Richardson 2021-01-15 11:35 ` Ananyev, Konstantin 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:45 ` Medvedkin, Vladimir 2021-01-15 11:49 ` Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 10/19] fib: fix missing header includes Bruce Richardson 2021-01-15 11:37 ` Medvedkin, Vladimir 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 11/19] table: fix missing header include Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 12/19] pipeline: fix missing header includes Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 13/19] metrics: fix variable declaration in header Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 14/19] node: fix missing header include Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 15/19] app: fix extra include paths for app builds Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 16/19] app/chkincs: add chkincs app to verify headers Bruce Richardson 2021-01-15 11:51 ` Ferruh Yigit 2021-01-15 11:59 ` Bruce Richardson 2021-01-15 14:09 ` Thomas Monjalon 2021-01-15 14:55 ` Bruce Richardson 2021-01-15 14:59 ` Bruce Richardson 2021-01-20 14:34 ` Bruce Richardson 2021-01-20 15:05 ` David Marchand 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 17/19] eal: add missing include to mcslock Bruce Richardson 2021-01-15 13:25 ` Honnappa Nagarahalli 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 18/19] eal/x86: add architecture-specific headers to chkincs Bruce Richardson 2021-01-15 11:10 ` [dpdk-dev] [PATCH v2 19/19] test-meson-builds: add includes check to default x86 build Bruce Richardson 2021-01-21 9:25 ` [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes David Marchand 2021-01-21 9:33 ` Bruce Richardson 2021-01-21 9:36 ` Thomas Monjalon 2021-01-21 9:43 ` Bruce Richardson 2021-01-21 15:15 ` Bruce Richardson 2021-01-21 23:20 ` Thomas Monjalon 2021-01-22 10:44 ` Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 1/4] eal: add missing include to mcslock Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 2/4] build: separate out headers for include checking Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 3/4] buildtools/chkincs: add app to verify header includes Bruce Richardson 2021-01-25 14:11 ` [dpdk-dev] [PATCH v3 4/4] devtools: remove check-includes script Bruce Richardson 2021-01-25 15:51 ` [dpdk-dev] [PATCH v3 0/4] add checking of header includes David Marchand 2021-01-25 18:17 ` Bruce Richardson 2021-01-26 11:15 ` Bruce Richardson 2021-01-26 14:04 ` David Marchand 2021-01-26 14:24 ` Bruce Richardson 2021-01-26 14:39 ` Bruce Richardson 2021-01-26 15:31 ` Thomas Monjalon 2021-01-26 15:42 ` Bruce Richardson 2021-01-26 15:50 ` Thomas Monjalon 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 0/7] " Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 1/7] eal: add missing include to mcslock Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 2/7] eal: fix error attribute use for clang Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 3/7] rib: fix missing header include Bruce Richardson 2021-01-26 14:21 ` Medvedkin, Vladimir 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 4/7] build: separate out headers for include checking Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 5/7] buildtools/chkincs: add app to verify header includes Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 6/7] devtools: remove check-includes script Bruce Richardson 2021-01-26 14:18 ` [dpdk-dev] [PATCH v4 7/7] ci: add checking of includes to CI builds Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 0/8] add checking of header includes Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 1/8] eal: add missing include to mcslock Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 2/8] eal: fix error attribute use for clang Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 3/8] ethdev: make driver-only headers private Bruce Richardson 2021-01-27 8:56 ` David Marchand 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 4/8] rib: fix missing header include Bruce Richardson 2021-01-27 11:08 ` Medvedkin, Vladimir 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 5/8] build: separate out headers for include checking Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 7/8] devtools: remove check-includes script Bruce Richardson 2021-01-26 21:38 ` [dpdk-dev] [PATCH v5 8/8] ci: add checking of includes to CI builds Bruce Richardson 2021-01-27 14:46 ` Aaron Conole 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 1/8] eal: add missing include to mcslock Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 2/8] eal: fix error attribute use for clang Bruce Richardson 2021-01-28 11:00 ` David Marchand 2021-01-28 11:20 ` Bruce Richardson 2021-01-28 13:36 ` David Marchand 2021-01-28 14:16 ` Bruce Richardson 2021-01-28 15:16 ` Bruce Richardson 2021-01-28 16:46 ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon 2021-01-28 17:36 ` Bruce Richardson 2021-01-29 8:35 ` David Marchand 2021-01-29 8:54 ` Thomas Monjalon 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 3/8] rib: fix missing header include Bruce Richardson 2021-01-28 11:01 ` David Marchand 2021-01-28 11:20 ` Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 4/8] ethdev: make driver-only headers private Bruce Richardson 2021-01-27 17:48 ` Maxime Coquelin 2021-01-28 10:17 ` Thomas Monjalon 2021-01-28 11:01 ` David Marchand 2021-01-28 16:38 ` Webster, Steven 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking Bruce Richardson 2021-01-28 11:07 ` Thomas Monjalon 2021-01-28 11:23 ` Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 6/8] buildtools/chkincs: add app to verify header includes Bruce Richardson 2021-01-28 11:02 ` David Marchand 2021-01-28 11:27 ` Bruce Richardson 2021-01-28 11:31 ` David Marchand 2021-01-28 11:48 ` Bruce Richardson 2021-01-28 17:23 ` Bruce Richardson 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 7/8] devtools: remove check-includes script Bruce Richardson 2021-01-28 11:10 ` Thomas Monjalon 2021-01-28 11:38 ` Bruce Richardson 2021-01-28 14:05 ` Thomas Monjalon 2021-01-27 17:33 ` [dpdk-dev] [PATCH v6 8/8] ci: add checking of includes to CI builds Bruce Richardson 2021-01-28 11:12 ` Thomas Monjalon 2021-01-28 11:41 ` Bruce Richardson 2021-01-28 18:34 ` Bruce Richardson 2021-01-29 17:42 ` David Marchand 2021-01-29 21:38 ` Aaron Conole 2021-01-28 10:55 ` [dpdk-dev] [PATCH v6 0/8] add checking of header includes David Marchand 2021-01-28 11:47 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 00/10] " Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 01/10] eal: add missing include to mcslock Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 02/10] eal: fix error attribute use for clang Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 03/10] power: fix missing header includes Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 04/10] rib: fix missing header include Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 05/10] ethdev: make driver-only headers private Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 06/10] eventdev: " Bruce Richardson 2021-02-22 22:34 ` Stephen Hemminger 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 07/10] build: separate out headers for include checking Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 08/10] buildtools/chkincs: add app to verify header includes Bruce Richardson 2021-02-02 11:36 ` David Marchand 2021-02-02 12:23 ` Bruce Richardson 2021-01-29 16:48 ` [dpdk-dev] [PATCH v7 09/10] devtools: remove check-includes script Bruce Richardson 2021-01-29 16:55 ` [dpdk-dev] [PATCH v7 10/10] ci: add checking of includes to CI builds Bruce Richardson 2021-01-29 21:37 ` Aaron Conole 2021-01-29 20:14 ` [dpdk-dev] [PATCH v7 00/10] add checking of header includes David Marchand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).