From: Bruce Richardson Date: Fri, 31 Aug 2018 13:35:10 +0000 (+0100) Subject: net/*/base: allow use of experimental APIs in base code X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=589dd86aaf12e02840b336db934db04593a414e4;p=dpdk.git net/*/base: allow use of experimental APIs in base code The driver setting of "allow_experimental_apis" was not being used when building the base code. To allow this we can manually put in a check in the base code files for the setting and set the appropriate cflag if it's needed. Signed-off-by: Bruce Richardson Acked-by: Andrew Rybchenko Tested-by: Ilya Maximets --- diff --git a/drivers/net/e1000/base/meson.build b/drivers/net/e1000/base/meson.build index 5e1716defe..f26f242987 100644 --- a/drivers/net/e1000/base/meson.build +++ b/drivers/net/e1000/base/meson.build @@ -25,6 +25,9 @@ error_cflags = ['-Wno-uninitialized', '-Wno-unused-parameter', '-Wno-unused-variable', '-Wno-misleading-indentation', '-Wno-implicit-fallthrough'] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: error_cflags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build index a8fc5fa8b4..5525cdc82c 100644 --- a/drivers/net/fm10k/base/meson.build +++ b/drivers/net/fm10k/base/meson.build @@ -15,6 +15,9 @@ error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value', '-Wno-unused-variable', '-Wno-missing-field-initializers' ] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: error_cflags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build index e6163eaa6c..d4c8f872d5 100644 --- a/drivers/net/i40e/base/meson.build +++ b/drivers/net/i40e/base/meson.build @@ -16,6 +16,9 @@ error_cflags = ['-Wno-sign-compare', '-Wno-unused-value', '-Wno-strict-aliasing', '-Wno-unused-but-set-variable' ] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: error_cflags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build index 3147e11017..21ac64bf5c 100644 --- a/drivers/net/ixgbe/base/meson.build +++ b/drivers/net/ixgbe/base/meson.build @@ -20,6 +20,9 @@ sources = [ error_cflags = ['-Wno-unused-value', '-Wno-unused-but-set-variable'] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: error_cflags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build index 09f657abb2..a06a2c89c9 100644 --- a/drivers/net/octeontx/base/meson.build +++ b/drivers/net/octeontx/base/meson.build @@ -13,8 +13,12 @@ foreach d: depends static_objs += [get_variable('static_rte_' + d)] endforeach +c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif base_lib = static_library('octeontx_base', sources, - c_args: cflags, + c_args: c_args, dependencies: static_objs, ) diff --git a/drivers/net/sfc/base/meson.build b/drivers/net/sfc/base/meson.build index da2bf44d8a..ab66f32f91 100644 --- a/drivers/net/sfc/base/meson.build +++ b/drivers/net/sfc/base/meson.build @@ -58,6 +58,9 @@ extra_flags = [ ] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: extra_flags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/thunderx/base/meson.build b/drivers/net/thunderx/base/meson.build index c9d5a8f4e4..bf4e8608ad 100644 --- a/drivers/net/thunderx/base/meson.build +++ b/drivers/net/thunderx/base/meson.build @@ -7,8 +7,12 @@ sources = [ 'nicvf_bsvf.c' ] +c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif base_lib = static_library('nicvf_base', sources, - c_args: cflags, + c_args: c_args, dependencies: static_rte_ethdev )