From 4282294b8a4e48f1db6b43df23ec8b2fd867d1d7 Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Tue, 4 Apr 2023 12:01:51 +0200 Subject: [PATCH] env_dpdk: add support for DPDK v23.03.0 Since there were no ABI changes in the interfaces used by SPDK, the v22.11 functions are reused. Signed-off-by: Konrad Sztyber Change-Id: Iff73405eec197f7ed1752366b6b38c28710a73ec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17479 Reviewed-by: Aleksey Marchuk Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Community-CI: Mellanox Build Bot --- lib/env_dpdk/pci_dpdk.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/env_dpdk/pci_dpdk.c b/lib/env_dpdk/pci_dpdk.c index 773ee46f8..44a96944a 100644 --- a/lib/env_dpdk/pci_dpdk.c +++ b/lib/env_dpdk/pci_dpdk.c @@ -39,8 +39,8 @@ dpdk_pci_init(void) } } - /* Anything 23.x or higher is not supported. */ - if (year > 22) { + /* Anything 24.x or higher is not supported. */ + if (year > 23) { SPDK_ERRLOG("DPDK version %d.%02d.%d not supported.\n", year, month, minor); return -EINVAL; } @@ -57,6 +57,14 @@ dpdk_pci_init(void) return -EINVAL; } g_dpdk_fn_table = &fn_table_2211; + } else if (year == 23) { + /* Only 23.03.0 is supported */ + if (month != 3 || minor != 0) { + SPDK_ERRLOG("DPDK version 23.%02d.%d is not supported.\n", month, minor); + return -EINVAL; + } + /* There were no changes between 22.11 and 23.03, so use the 22.11 implementation */ + g_dpdk_fn_table = &fn_table_2211; } else { /* Everything else we use the 22.07 implementation. */ g_dpdk_fn_table = &fn_table_2207;