diff --git a/0001-spdk-fix-the-deference-between-dpdk-19.11-and-dpdk-20.11.patch b/0001-spdk-fix-the-deference-between-dpdk-19.11-and-dpdk-20.11.patch new file mode 100644 index 0000000000000000000000000000000000000000..cca48e156e76649ebeb8b4701445fcead4974103 --- /dev/null +++ b/0001-spdk-fix-the-deference-between-dpdk-19.11-and-dpdk-20.11.patch @@ -0,0 +1,70 @@ +From ca3cf79c6a8037166f28c70f3c4f85d6573abccd Mon Sep 17 00:00:00 2001 +From: sunshihao +Date: Thu, 4 Feb 2021 15:42:44 +0800 +Subject: [PATCH] spdk: fix the deference between dpdk 19.11 and dpdk 20.11 + +In dpdk 19.11, we use the old kdrv definiton, the new kdrv name was added in +dpdk-20.11, this patch is to solve this problem. + +Signed-off-by: sunshihao +--- + lib/env_dpdk/memory.c | 12 ++++++++++++ + lib/vhost/rte_vhost_compat.c | 2 +- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/lib/env_dpdk/memory.c b/lib/env_dpdk/memory.c +index f49dcf4..c923483 100644 +--- a/lib/env_dpdk/memory.c ++++ b/lib/env_dpdk/memory.c +@@ -1238,7 +1238,11 @@ vtophys_iommu_device_event(const char *device_name, + RTE_DEV_FOREACH(dev, "bus=pci", &dev_iter) { + if (strcmp(dev->name, device_name) == 0) { + struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev); ++#if RTE_VERSION < RTE_VERSION_NUM(20, 11, 0, 0) ++ if (pci_dev->kdrv == RTE_KDRV_VFIO) { ++#else + if (pci_dev->kdrv == RTE_PCI_KDRV_VFIO) { ++#endif + /* This is a new PCI device using vfio */ + g_vfio.device_ref++; + } +@@ -1267,7 +1271,11 @@ vtophys_iommu_device_event(const char *device_name, + RTE_DEV_FOREACH(dev, "bus=pci", &dev_iter) { + if (strcmp(dev->name, device_name) == 0) { + struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev); ++#if RTE_VERSION < RTE_VERSION_NUM(20, 11, 0, 0) ++ if (pci_dev->kdrv == RTE_KDRV_VFIO) { ++#else + if (pci_dev->kdrv == RTE_PCI_KDRV_VFIO) { ++#endif + /* This is a PCI device using vfio */ + g_vfio.device_ref--; + } +@@ -1362,7 +1370,11 @@ vtophys_iommu_init(void) + RTE_DEV_FOREACH(dev, "bus=pci", &dev_iter) { + struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev); + ++#if RTE_VERSION < RTE_VERSION_NUM(20, 11, 0, 0) ++ if (pci_dev->kdrv == RTE_KDRV_VFIO) { ++#else + if (pci_dev->kdrv == RTE_PCI_KDRV_VFIO) { ++#endif + /* This is a PCI device using vfio */ + g_vfio.device_ref++; + } +diff --git a/lib/vhost/rte_vhost_compat.c b/lib/vhost/rte_vhost_compat.c +index 85cce3d..e1747cc 100644 +--- a/lib/vhost/rte_vhost_compat.c ++++ b/lib/vhost/rte_vhost_compat.c +@@ -331,7 +331,7 @@ vhost_register_unix_socket(const char *path, const char *ctrl_name, + } + } + +- if (rte_vhost_driver_register(path, RTE_VHOST_USER_ASYNC_COPY) != 0) { ++ if (rte_vhost_driver_register(path, 0) != 0) { + SPDK_ERRLOG("Could not register controller %s with vhost library\n", ctrl_name); + SPDK_ERRLOG("Check if domain socket %s already exists\n", path); + return -EIO; +-- +1.8.3.1 + diff --git a/spdk.spec b/spdk.spec index 3beb76370813d5492771beea921ba7d879dab0a1..09b52c7d42de3cab64ca52b05ef4a64ba9e76f9f 100644 --- a/spdk.spec +++ b/spdk.spec @@ -2,12 +2,13 @@ %bcond_with doc Name: spdk -Version: 20.01.1 -Release: 2 +Version: 21.01 +Release: 1 Summary: Set of libraries and utilities for high performance user-mode storage License: BSD and MIT URL: http://spdk.io Source0: https://github.com/spdk/spdk/archive/v%{version}.tar.gz +Patch0: 0001-spdk-fix-the-deference-between-dpdk-19.11-and-dpdk-20.11.patch %define package_version %{version}-%{release} @@ -25,7 +26,7 @@ Source0: https://github.com/spdk/spdk/archive/v%{version}.tar.gz ExclusiveArch: x86_64 aarch64 BuildRequires: gcc gcc-c++ make -BuildRequires: dpdk-devel, numactl-devel +BuildRequires: dpdk-devel, numactl-devel, ncurses-devel BuildRequires: libiscsi-devel, libaio-devel, openssl-devel, libuuid-devel BuildRequires: libibverbs-devel, librdmacm-devel %if %{with doc} @@ -39,7 +40,7 @@ BuildRequires: doxygen mscgen graphviz %endif # Install dependencies -Requires: dpdk >= 17.11, numactl-libs, openssl-libs +Requires: dpdk >= 19.11, numactl-libs, openssl-libs Requires: libiscsi, libaio, libuuid # NVMe over Fabrics Requires: librdmacm, librdmacm @@ -87,18 +88,18 @@ BuildArch: noarch %prep # add -q -%autosetup -n spdk-%{version} +%autosetup -n spdk-%{version} -p1 %build ./configure --prefix=%{_usr} \ --disable-tests \ + --disable-unit-tests \ --without-crypto \ --with-dpdk=/usr/share/dpdk/%{config} \ --without-fio \ --with-vhost \ --without-pmdk \ - --without-vpp \ --without-rbd \ --with-rdma \ --with-shared \ @@ -167,6 +168,8 @@ mv doc/output/html/ %{install_docdir} %changelog +* Thu Feb 4 2021 Shihao Sun - 21.01-1 +- update spdk to 21.01 LTS version. * Thu Nov 26 2020 Shihao Sun - 20.01.1-2 - modify license * Sat Nov 7 2020 Feilong Lin - 20.01.1-1 diff --git a/v20.01.1.tar.gz b/v20.01.1.tar.gz deleted file mode 100644 index c44ad0834f0fc141f5b0b04fb915734894544495..0000000000000000000000000000000000000000 Binary files a/v20.01.1.tar.gz and /dev/null differ diff --git a/v21.01.tar.gz b/v21.01.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..203d0b4af63822d3ce59f110a38cf6a44fe7242f Binary files /dev/null and b/v21.01.tar.gz differ