!4 update spdk to 21.01 LTS version
From: @sun_shi_hao Reviewed-by: Signed-off-by:
This commit is contained in:
commit
e559390539
@ -0,0 +1,70 @@
|
||||
From ca3cf79c6a8037166f28c70f3c4f85d6573abccd Mon Sep 17 00:00:00 2001
|
||||
From: sunshihao <sunshihao@huawei.com>
|
||||
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 <sunshihao@huawei.com>
|
||||
---
|
||||
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
|
||||
|
||||
15
spdk.spec
15
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 <sunshihao@huawei.com> - 21.01-1
|
||||
- update spdk to 21.01 LTS version.
|
||||
* Thu Nov 26 2020 Shihao Sun <sunshihao@huawei.com> - 20.01.1-2
|
||||
- modify license
|
||||
* Sat Nov 7 2020 Feilong Lin <linfeilong@huawei.com> - 20.01.1-1
|
||||
|
||||
BIN
v20.01.1.tar.gz
BIN
v20.01.1.tar.gz
Binary file not shown.
BIN
v21.01.tar.gz
Normal file
BIN
v21.01.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user