Commit 181143cc authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

env_dpdk: drop compatibility with DPDK < v21.11



The oldest, still supported, version of DPDK is v20.11 and it'll be
EOL-ed in December, before the next SPDK release, so let's just drop
compatibility with anything older than v21.11 now.  It was half-broken
anyway, as our copies of DPDK headers had an

#ifdef RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)

in one of the structure definitions, so the code built against v20.11
wouldn't work correctly under v21.11+.

Fixes #3153.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3d3f45382f7858e60ca5f013d0c0e2fd5cd9959f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20331


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
parent 04934c10
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -69,11 +69,7 @@ struct rte_pci_device {
	struct rte_pci_id id;               /**< PCI ID. */
	struct rte_mem_resource mem_resource[PCI_MAX_RESOURCE];
					    /**< PCI Memory Resource */
#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)
	struct rte_intr_handle intr_handle; /**< Interrupt handle */
#else
	struct rte_intr_handle *intr_handle; /**< Interrupt handle */
#endif
	struct rte_pci_driver *driver;      /**< PCI driver used in probing */
	uint16_t max_vfs;                   /**< sriov enable if not zero */
	enum rte_pci_kernel_driver kdrv;    /**< Kernel driver passthrough */
+2 −2
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@
#include <rte_version.h>
#include <rte_eal.h>

#if RTE_VERSION < RTE_VERSION_NUM(19, 11, 0, 0)
#error RTE_VERSION is too old! Minimum 19.11 is required.
#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)
#error RTE_VERSION is too old! Minimum 21.11 is required.
#endif

/* x86-64 and ARM userspace virtual addresses use only the low 48 bits [0..47],
+0 −6
Original line number Diff line number Diff line
@@ -24,15 +24,9 @@
#define SPDK_ENV_DPDK_DEFAULT_CORE_MASK		"0x1"
#define SPDK_ENV_DPDK_DEFAULT_BASE_VIRTADDR	0x200000000000

#if RTE_VERSION < RTE_VERSION_NUM(20, 11, 0, 0)
#define DPDK_ALLOW_PARAM	"--pci-whitelist"
#define DPDK_BLOCK_PARAM	"--pci-blacklist"
#define DPDK_MAIN_CORE_PARAM	"--master-lcore"
#else
#define DPDK_ALLOW_PARAM	"--allow"
#define DPDK_BLOCK_PARAM	"--block"
#define DPDK_MAIN_CORE_PARAM	"--main-lcore"
#endif

static char **g_eal_cmdline;
static int g_eal_cmdline_argcount;
+0 −7
Original line number Diff line number Diff line
@@ -16,13 +16,6 @@

#define SYSFS_PCI_DRIVERS	"/sys/bus/pci/drivers"

/* Compatibility for versions < 20.11 */
#if RTE_VERSION < RTE_VERSION_NUM(20, 11, 0, 0)
#define RTE_DEV_ALLOWED RTE_DEV_WHITELISTED
#define RTE_DEV_BLOCKED RTE_DEV_BLACKLISTED
#define RTE_BUS_SCAN_ALLOWLIST RTE_BUS_SCAN_WHITELIST
#endif

#define PCI_CFG_SIZE		256
#define PCI_EXT_CAP_ID_SN	0x03

+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ dpdk_pci_init(void)
		}
		/* There were no changes between 22.11 and 23.07, so use the 22.11 implementation */
		g_dpdk_fn_table = &fn_table_2211;
	} else if (year < 21 || (year == 21 && month < 11)) {
		SPDK_ERRLOG("DPDK version %02d.%02d.%d is not supported.\n", year, month, minor);
		return -EINVAL;
	} else {
		/* Everything else we use the 22.07 implementation. */
		g_dpdk_fn_table = &fn_table_2207;
Loading