DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 2/3] buildtools/chkincs: check sdk headers for C++ compatibility
Date: Tue, 15 Feb 2022 17:30:28 +0000	[thread overview]
Message-ID: <20220215173029.1893710-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20220215173029.1893710-1-bruce.richardson@intel.com>

With a one-line change to the lib meson.build file we can add the sdk
headers to the list of files to be checked using the chkincs binary.
Unfortunately, many of those sdk header depend upon headers in the PCI
and vdev bus drivers, so we need to update chkincs build to ensure those
dependencies are added. We also need to allow internal APIs to be
present in these SDK headers.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/chkincs/meson.build | 6 +++++-
 lib/meson.build                | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
index 790f700619..9442235200 100644
--- a/buildtools/chkincs/meson.build
+++ b/buildtools/chkincs/meson.build
@@ -13,11 +13,15 @@ gen_c_files = generator(gen_c_file_for_header,

 cflags = machine_args
 cflags += '-DALLOW_EXPERIMENTAL_API'
+cflags += '-DALLOW_INTERNAL_API'

 sources = files('main.c')
 sources += gen_c_files.process(dpdk_chkinc_headers)

-deps = []
+# some driver sdk headers depend on these two buses, which are mandatory in build
+# so we always include them in deps list
+deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
+# add the rest of the libs to the dependencies
 foreach l:enabled_libs
     deps += get_variable('shared_rte_' + l)
 endforeach
diff --git a/lib/meson.build b/lib/meson.build
index 8e5acd7819..24adbe44c9 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -171,6 +171,7 @@ foreach l:libraries
         install_headers(driver_sdk_headers)
     endif
     dpdk_chkinc_headers += headers
+    dpdk_chkinc_headers += driver_sdk_headers

     libname = 'rte_' + name
     includes += include_directories(l)
--
2.32.0


  parent reply	other threads:[~2022-02-15 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 17:30 [PATCH 0/3] extend C++ compatibility checks Bruce Richardson
2022-02-15 17:30 ` [PATCH 1/3] ethdev: fix missing cast for C++ compatibility Bruce Richardson
2022-02-16 10:32   ` Ferruh Yigit
2022-02-16 11:01     ` Bruce Richardson
2022-02-15 17:30 ` Bruce Richardson [this message]
2022-02-15 17:30 ` [PATCH 3/3] buildtools/chkincs: add checks for missing C++ guards Bruce Richardson
2022-02-17  8:06 ` [PATCH 0/3] extend C++ compatibility checks Tyler Retzlaff
2022-02-22 14:21   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220215173029.1893710-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).