From f9f03bd354f4b6a1b5d505adf3439a01de477401 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Fri, 3 Nov 2023 09:53:32 +0800 Subject: [PATCH] Roll back to version 21.01-6 --- ...host-Fix-compilation-with-dpdk-21.11.patch | 80 ------------------- spdk.spec | 16 ++-- 2 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 0029-lib-vhost-Fix-compilation-with-dpdk-21.11.patch diff --git a/0029-lib-vhost-Fix-compilation-with-dpdk-21.11.patch b/0029-lib-vhost-Fix-compilation-with-dpdk-21.11.patch deleted file mode 100644 index a775823..0000000 --- a/0029-lib-vhost-Fix-compilation-with-dpdk-21.11.patch +++ /dev/null @@ -1,80 +0,0 @@ -From f72cab94dd35d7b45ec5a4f35967adf3184ca616 Mon Sep 17 00:00:00 2001 -From: Alexey Marchuk -Date: Mon, 15 Nov 2021 11:01:14 +0300 -Subject: [PATCH] lib/vhost: Fix compilation with dpdk 21.11 - -Structure vhost_device_ops was renamed to -rte_vhost_device_ops - -Signed-off-by: Alexey Marchuk -Change-Id: Ie9601099d47465536500aa37fc113aeae03a8254 -Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10223 -Tested-by: SPDK CI Jenkins -Community-CI: Mellanox Build Bot -Community-CI: Broadcom CI -Reviewed-by: John Kariuki -Reviewed-by: Changpeng Liu -Reviewed-by: Tomasz Zawadzki ---- - lib/vhost/rte_vhost_compat.c | 5 +++++ - test/unit/lib/vhost/vhost.c/vhost_ut.c | 7 +++++++ - 2 files changed, 12 insertions(+) - -diff --git a/lib/vhost/rte_vhost_compat.c b/lib/vhost/rte_vhost_compat.c -index 3c9f691883a..08574cfad07 100644 ---- a/lib/vhost/rte_vhost_compat.c -+++ b/lib/vhost/rte_vhost_compat.c -@@ -3,6 +3,7 @@ - * - * Copyright (c) Intel Corporation. - * All rights reserved. -+ * Copyright (c) 2021 Mellanox Technologies LTD. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions -@@ -134,7 +135,11 @@ destroy_connection(int vid) - vhost_destroy_connection_cb(vid); - } - -+#if RTE_VERSION >= RTE_VERSION_NUM(21, 11, 0, 0) -+static const struct rte_vhost_device_ops g_spdk_vhost_ops = { -+#else - static const struct vhost_device_ops g_spdk_vhost_ops = { -+#endif - .new_device = start_device, - .destroy_device = stop_device, - .new_connection = new_connection, -diff --git a/test/unit/lib/vhost/vhost.c/vhost_ut.c b/test/unit/lib/vhost/vhost.c/vhost_ut.c -index df1c32d28e6..e62da334688 100644 ---- a/test/unit/lib/vhost/vhost.c/vhost_ut.c -+++ b/test/unit/lib/vhost/vhost.c/vhost_ut.c -@@ -3,6 +3,7 @@ - * - * Copyright (c) Intel Corporation. - * All rights reserved. -+ * Copyright (c) 2021 Mellanox Technologies LTD. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions -@@ -41,6 +42,7 @@ - #include "unit/lib/json_mock.c" - - #include "vhost/vhost.c" -+#include - - DEFINE_STUB(rte_vhost_set_vring_base, int, (int vid, uint16_t queue_id, - uint16_t last_avail_idx, uint16_t last_used_idx), 0); -@@ -65,8 +67,13 @@ DEFINE_STUB(rte_vhost_enable_guest_notification, int, - (int vid, uint16_t queue_id, int enable), 0); - DEFINE_STUB(rte_vhost_get_ifname, int, (int vid, char *buf, size_t len), 0); - DEFINE_STUB(rte_vhost_driver_start, int, (const char *name), 0); -+#if RTE_VERSION >= RTE_VERSION_NUM(21, 11, 0, 0) -+DEFINE_STUB(rte_vhost_driver_callback_register, int, -+ (const char *path, struct rte_vhost_device_ops const *const ops), 0); -+#else - DEFINE_STUB(rte_vhost_driver_callback_register, int, - (const char *path, struct vhost_device_ops const *const ops), 0); -+#endif - DEFINE_STUB(rte_vhost_driver_disable_features, int, (const char *path, uint64_t features), 0); - DEFINE_STUB(rte_vhost_driver_set_features, int, (const char *path, uint64_t features), 0); - DEFINE_STUB(rte_vhost_driver_register, int, (const char *path, uint64_t flags), 0); diff --git a/spdk.spec b/spdk.spec index 8f59422..2e5ddea 100644 --- a/spdk.spec +++ b/spdk.spec @@ -4,7 +4,7 @@ Name: spdk Version: 21.01 -Release: 7 +Release: 6 Summary: Set of libraries and utilities for high performance user-mode storage License: BSD and MIT URL: http://spdk.io @@ -37,7 +37,6 @@ Patch25: 0025-nvmf-fix-fd-leakage-problem-in-nvmf_vfio_user_listen.patch Patch26: 0026-posix-set-fd-to-1-after-close-fd-in-posix_sock_creat.patch Patch27: 0027-spdk_top-check-return-value-of-strdup-in-store_last_.patch Patch28: 0028-uring-set-fd-to-1-after-close-fd-in-uring_sock_creat.patch -Patch29: 0029-lib-vhost-Fix-compilation-with-dpdk-21.11.patch %define package_version %{version}-%{release} @@ -62,8 +61,14 @@ BuildRequires: libibverbs-devel, librdmacm-devel BuildRequires: doxygen mscgen graphviz %endif +%ifarch aarch64 +%global config arm64-armv8a-linux-gcc +%else +%global config x86_64-native-linux-gcc +%endif + # Install dependencies -Requires: dpdk >= 21.11, numactl-libs, openssl-libs +Requires: dpdk >= 19.11, numactl-libs, openssl-libs Requires: libiscsi, libaio, libuuid # NVMe over Fabrics Requires: librdmacm, librdmacm @@ -120,7 +125,7 @@ BuildArch: noarch --disable-unit-tests \ --without-crypto \ --without-isal \ - --with-dpdk=/usr/lib64/dpdk/pmds-22.0 \ + --with-dpdk=/usr/share/dpdk/%{config} \ --without-fio \ --with-vhost \ --without-pmdk \ @@ -204,9 +209,6 @@ mv doc/output/html/ %{install_docdir} %changelog -* Mon Oct 16 2023 chenyaqiang - 21.01-7 -- fix build failure caused by dpdk upgrade - * Fri Feb 03 2023 Hongtao Zhang - 21.01-6 - Add setup.sh scripts during installation -- Gitee