net/*/base: allow use of experimental APIs in base code
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 31 Aug 2018 13:35:10 +0000 (14:35 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:01 +0000 (01:41 +0200)
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 <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
drivers/net/e1000/base/meson.build
drivers/net/fm10k/base/meson.build
drivers/net/i40e/base/meson.build
drivers/net/ixgbe/base/meson.build
drivers/net/octeontx/base/meson.build
drivers/net/sfc/base/meson.build
drivers/net/thunderx/base/meson.build

index 5e1716d..f26f242 100644 (file)
@@ -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
index a8fc5fa..5525cdc 100644 (file)
@@ -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
index e6163ea..d4c8f87 100644 (file)
@@ -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
index 3147e11..21ac64b 100644 (file)
@@ -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
index 09f657a..a06a2c8 100644 (file)
@@ -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,
 )
 
index da2bf44..ab66f32 100644 (file)
@@ -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
index c9d5a8f..bf4e860 100644 (file)
@@ -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
 )