[RFC,3/5] meson: fix compatibility with make build defines
Checks
Commit Message
The defines used to indicate what crypto, compression and eventdev drivers
were being built were different to those used in the make build, with meson
defining them with "_PMD" at the end, while make defined them with "_PMD"
in the middle and the specific driver name at the end. This might cause
compatibility issues for applications which used the older defines, which
switching to build against new DPDK releases.
As well as changing the default to match that of make, meson also
special-cases the crypto/compression/event drivers to have both defines
provided, and puts in a deprecation notice to allow future removal of the
meson-original defines. This ensures compatibility for these macros with
both meson and make from older versions.
Fixes: dcadbbde8e61 ("crypto/null: build with meson")
Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Fixes: eca504f318db ("drivers/event: build skeleton and SW drivers with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 8 ++++++++
drivers/compress/meson.build | 2 +-
drivers/crypto/meson.build | 2 +-
drivers/event/meson.build | 2 +-
drivers/meson.build | 15 +++++++++++++++
5 files changed, 26 insertions(+), 3 deletions(-)
@@ -11,6 +11,14 @@ here.
Deprecation Notices
-------------------
+* build: The macros defined to indicate which crypto drivers, event drivers
+ and which compression drivers have been
+ included in the meson build are changing format from
+ ``RTE_LIBRTE_<name>_PMD`` to ``RTE_LIBRTE_PMD_<name>`` to match those
+ macros used for the drivers in the make build. Both sets of macros
+ are present in this release, but those ending in ``_PMD`` will be removed
+ in a future release, and should not be used.
+
* meson: The minimum supported version of meson for configuring and building
DPDK will be increased to v0.47.1 (from 0.41) from DPDK 19.05 onwards. For
those users with a version earlier than 0.47.1, an updated copy of meson
@@ -8,5 +8,5 @@ endif
drivers = ['isal', 'octeontx', 'qat', 'zlib']
std_deps = ['compressdev'] # compressdev pulls in all other needed deps
-config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
+config_flag_fmt = 'RTE_LIBRTE_PMD_@0@'
driver_name_fmt = 'rte_pmd_@0@'
@@ -26,5 +26,5 @@ drivers = ['aesni_gcm',
'zuc']
std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
-config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
+config_flag_fmt = 'RTE_LIBRTE_PMD_@0@'
driver_name_fmt = 'rte_pmd_@0@'
@@ -11,5 +11,5 @@ if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and
drivers += 'octeontx'
endif
std_deps = ['eventdev', 'kvargs']
-config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
+config_flag_fmt = 'RTE_LIBRTE_PMD_@0@_EVENTDEV'
driver_name_fmt = 'rte_pmd_@0@_event'
@@ -117,6 +117,21 @@ foreach subpath:subdirs
fmt_name = name
endif
dpdk_conf.set(config_flag_fmt.format(fmt_name.to_upper()),1)
+ # for driver compatibility, since we changed the
+ # default to match that of make. Remove in future release
+ # after following deprecation process
+ if config_flag_fmt.contains('_PMD_@0@') and (class == 'crypto'
+ or class == 'compress'
+ or class == 'event')
+ alt_flag_fmt = '_@0@_PMD'.join(
+ config_flag_fmt.split('_PMD_@0@'))
+ if config_flag_fmt.contains('EVENTDEV')
+ alt_flag_fmt = '_@0@_EVENTDEV_PMD'.join(
+ config_flag_fmt.split('_PMD_@0@_EVENTDEV'))
+ endif
+ dpdk_conf.set(alt_flag_fmt.format(
+ fmt_name.to_upper()), 1)
+ endif
lib_name = driver_name_fmt.format(fmt_name)
dpdk_extra_ldflags += pkgconfig_extra_libs