From patchwork Wed Oct 14 14:13:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 80751 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A22FFA04B7; Wed, 14 Oct 2020 16:14:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 667471DE7A; Wed, 14 Oct 2020 16:13:37 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 450811DE68; Wed, 14 Oct 2020 16:13:33 +0200 (CEST) IronPort-SDR: hiRZVl2uF/Ii/WDdPoj4snziTE578x3tLez+5YjPp59cmh3NB9y5WsQwF63f88XYbmh7rVhWvf 9HpnbYeMOPAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="145421299" X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="145421299" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 07:13:25 -0700 IronPort-SDR: aifOBv1QxCu/C0UKjsixIXVdeuzhYPgSfTbxv6BKlu13aaWH+X/X5n0j66xLiXRs5BU46u3eGc T1Uc7yb6rjNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="299965400" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by fmsmga007.fm.intel.com with ESMTP; 14 Oct 2020 07:13:23 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, arybchenko@solarflare.com, ferruh.yigit@intel.com, thomas@monjalon.net, bluca@debian.org, Bruce Richardson , stable@dpdk.org Date: Wed, 14 Oct 2020 15:13:00 +0100 Message-Id: <20201014141304.632120-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201014141304.632120-1-bruce.richardson@intel.com> References: <20200916164429.244847-1-bruce.richardson@intel.com> <20201014141304.632120-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 3/7] build: add defines for compatibility with make build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. This ensures compatibility for these macros with both meson and make from older versions. For a selection of other libraries and drivers, there were other incompatibilities between the meson and make-defined macros which were not previously highlighted in a deprecation notice, so we add per-macro compatibility defines for these to ease the transition from make to meson. Fixes: 5b9656b157d3 ("lib: build with meson") Fixes: 9314afb68a53 ("drivers: add infrastructure for meson build") 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 Acked-by: Luca Boccassi --- app/test/meson.build | 1 + config/meson.build | 3 +- config/rte_compatibility_defines.h | 129 +++++++++++++++++++++++++++++ config/rte_config.h | 1 + drivers/compress/meson.build | 2 +- drivers/crypto/meson.build | 2 +- drivers/event/meson.build | 2 +- drivers/meson.build | 15 ++++ 8 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 config/rte_compatibility_defines.h diff --git a/app/test/meson.build b/app/test/meson.build index dedf29dd7..fc90a1909 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -415,6 +415,7 @@ endif if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER') driver_test_names += 'cryptodev_scheduler_autotest' + test_deps += 'pmd_crypto_scheduler' endif foreach d:test_deps diff --git a/config/meson.build b/config/meson.build index d0e593226..89bffc85a 100644 --- a/config/meson.build +++ b/config/meson.build @@ -253,7 +253,8 @@ dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) # set the install path for the drivers dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path) -install_headers('rte_config.h', subdir: get_option('include_subdir_arch')) +install_headers(['rte_config.h', 'rte_compatibility_defines.h'], + subdir: get_option('include_subdir_arch')) # enable VFIO only if it is linux OS dpdk_conf.set('RTE_EAL_VFIO', is_linux) diff --git a/config/rte_compatibility_defines.h b/config/rte_compatibility_defines.h new file mode 100644 index 000000000..47600052b --- /dev/null +++ b/config/rte_compatibility_defines.h @@ -0,0 +1,129 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017 Intel Corporation + */ + +#ifndef _RTE_CONFIG_H_ +#error "This file should only be included via rte_config.h" +#endif + +/* + * NOTE: these defines are for compatibility only and will be removed in a + * future DPDK release. + */ + +#ifdef RTE_LIBRTE_BITRATESTATS +#define RTE_LIBRTE_BITRATE +#endif + +#ifdef RTE_LIBRTE_LATENCYSTATS +#define RTE_LIBRTE_LATENCY_STATS +#endif + +#ifdef RTE_LIBRTE_DPAAX_COMMON +#define RTE_LIBRTE_COMMON_DPAAX +#endif + +#ifdef RTE_LIBRTE_VMBUS_BUS +#define RTE_LIBRTE_VMBUS +#endif + +#ifdef RTE_LIBRTE_BUCKET_MEMPOOL +#define RTE_DRIVER_MEMPOOL_BUCKET +#endif + +#ifdef RTE_LIBRTE_RING_MEMPOOL +#define RTE_DRIVER_MEMPOOL_RING +#endif + +#ifdef RTE_LIBRTE_STACK_MEMPOOL +#define RTE_DRIVER_MEMPOOL_STACK +#endif + +#ifdef RTE_LIBRTE_AF_PACKET_PMD +#define RTE_LIBRTE_PMD_AF_PACKET +#endif + +#ifdef RTE_LIBRTE_AF_XDP_PMD +#define RTE_LIBRTE_PMD_AF_XDP +#endif + +#ifdef RTE_LIBRTE_BOND_PMD +#define RTE_LIBRTE_PMD_BOND +#endif + +#ifdef RTE_LIBRTE_E1000_PMD +#define RTE_LIBRTE_EM_PMD +#endif + +#ifdef RTE_LIBRTE_E1000_PMD +#define RTE_LIBRTE_IGB_PMD +#endif + +#ifdef RTE_LIBRTE_FAILSAFE_PMD +#define RTE_LIBRTE_PMD_FAILSAFE +#endif + +#ifdef RTE_LIBRTE_KNI_PMD +#define RTE_LIBRTE_PMD_KNI +#endif + +#ifdef RTE_LIBRTE_LIQUIDIO_PMD +#define RTE_LIBRTE_LIO_PMD +#endif + +#ifdef RTE_LIBRTE_MEMIF_PMD +#define RTE_LIBRTE_PMD_MEMIF +#endif + +#ifdef RTE_LIBRTE_NULL_PMD +#define RTE_LIBRTE_PMD_NULL +#endif + +#ifdef RTE_LIBRTE_PCAP_PMD +#define RTE_LIBRTE_PMD_PCAP +#endif + +#ifdef RTE_LIBRTE_RING_PMD +#define RTE_LIBRTE_PMD_RING +#endif + +#ifdef RTE_LIBRTE_SFC_PMD +#define RTE_LIBRTE_SFC_EFX_PMD +#endif + +#ifdef RTE_LIBRTE_SOFTNIC_PMD +#define RTE_LIBRTE_PMD_SOFTNIC +#endif + +#ifdef RTE_LIBRTE_SZEDATA2_PMD +#define RTE_LIBRTE_PMD_SZEDATA2 +#endif + +#ifdef RTE_LIBRTE_TAP_PMD +#define RTE_LIBRTE_PMD_TAP +#endif + +#ifdef RTE_LIBRTE_THUNDERX_PMD +#define RTE_LIBRTE_THUNDERX_NICVF_PMD +#endif + +#ifdef RTE_LIBRTE_VHOST_PMD +#define RTE_LIBRTE_PMD_VHOST +#endif + +#ifdef RTE_LIBRTE_PMD_ARMV8 +#define RTE_LIBRTE_PMD_ARMV8_CRYPTO +#endif + +#ifdef RTE_LIBRTE_PMD_MVSAM +#define RTE_LIBRTE_PMD_MVSAM_CRYPTO +#endif + +#ifdef RTE_LIBRTE_PMD_OCTEONTX_COMPRESS +#define RTE_LIBRTE_PMD_OCTEONTX_ZIPVF +#endif + +#ifdef RTE_LIBRTE_PMD_OCTEONTX_EVENTDEV +#define RTE_LIBRTE_PMD_OCTEONTX_SSOVF +#endif + diff --git a/config/rte_config.h b/config/rte_config.h index 03d90d78b..1bebab335 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -13,6 +13,7 @@ #define _RTE_CONFIG_H_ #include +#include /* legacy defines */ #ifdef RTE_EXEC_ENV_LINUX diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build index ee883c3f9..bea1720a0 100644 --- a/drivers/compress/meson.build +++ b/drivers/compress/meson.build @@ -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@' diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build index a2423507a..25b99c19c 100644 --- a/drivers/crypto/meson.build +++ b/drivers/crypto/meson.build @@ -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@' diff --git a/drivers/event/meson.build b/drivers/event/meson.build index ebe76a75c..f2a343147 100644 --- a/drivers/event/meson.build +++ b/drivers/event/meson.build @@ -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' diff --git a/drivers/meson.build b/drivers/meson.build index 5f9526557..b5ac483d3 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -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