autobuild: Move DPDK patches into the repo
Fetching these patches from external forks of DPDK repo is a bit
cumbersome and hard to maintain so instead have them in one place
for easy apply.
All of the patches were fetched "as-is" from the used forks, with
a commit section trimmed to provide just the relevant info.
Cherry-picked-from: 5673325a6f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6bf538ea15ef87fe04d5a77944de36c797cdf284
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10360
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10712
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
43df2c44a9
commit
f343f73d57
14
autobuild.sh
14
autobuild.sh
@ -156,20 +156,12 @@ function build_native_dpdk() {
|
||||
|
||||
cd $external_dpdk_base_dir
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
# Fix for freeing device if not kernel driver configured.
|
||||
# TODO: Remove once this is merged in upstream DPDK
|
||||
if [[ $dpdk_ver == 20.11* ]]; then
|
||||
wget https://github.com/karlatec/dpdk/commit/3219c0cfc38803aec10c809dde16e013b370bda9.patch -O dpdk-pci.patch
|
||||
wget https://github.com/karlatec/dpdk/commit/adf8f7638de29bc4bf9ba3faf12bbdae73acda0c.patch -O dpdk-qat.patch
|
||||
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/20.11/dpdk_pci.patch"
|
||||
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/20.11/dpdk_qat.patch"
|
||||
elif [[ $dpdk_ver == 21.08* ]]; then
|
||||
wget https://github.com/karlatec/dpdk/commit/6fd2fa906ffdcee04e6ce5da40e61cb841be9827.patch -O dpdk-qat.patch
|
||||
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/21.08/dpdk_qat.patch"
|
||||
fi
|
||||
git config --local user.name "spdk"
|
||||
git config --local user.email "nomail@all.com"
|
||||
if [[ -f dpdk-pci.patch ]]; then
|
||||
patch -p1 < dpdk-pci.patch
|
||||
fi
|
||||
patch -p1 < dpdk-qat.patch
|
||||
fi
|
||||
|
||||
meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
|
||||
|
20
test/common/config/pkgdep/patches/dpdk/20.11/dpdk_pci.patch
Normal file
20
test/common/config/pkgdep/patches/dpdk/20.11/dpdk_pci.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Subject: [PATCH] pci/linux: free the device if no kernel driver configured
|
||||
---
|
||||
drivers/bus/pci/linux/pci.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
|
||||
index 619d209ad21..06b523a15f2 100644
|
||||
--- a/drivers/bus/pci/linux/pci.c
|
||||
+++ b/drivers/bus/pci/linux/pci.c
|
||||
@@ -330,8 +330,8 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
|
||||
dev->kdrv = RTE_PCI_KDRV_UIO_GENERIC;
|
||||
else
|
||||
dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
|
||||
- } else {
|
||||
- dev->kdrv = RTE_PCI_KDRV_NONE;
|
||||
+ } else { /* no kernel driver */
|
||||
+ free(dev);
|
||||
return 0;
|
||||
}
|
||||
/* device is valid, add in list (sorted) */
|
43
test/common/config/pkgdep/patches/dpdk/20.11/dpdk_qat.patch
Normal file
43
test/common/config/pkgdep/patches/dpdk/20.11/dpdk_qat.patch
Normal file
@ -0,0 +1,43 @@
|
||||
Commit based on:
|
||||
https://github.com/spdk/dpdk/commit/c2c273d5c8fbf673623b427f8f4ab5af5ddf0e08
|
||||
---
|
||||
drivers/common/qat/meson.build | 4 ++--
|
||||
drivers/crypto/qat/meson.build | 7 ++-----
|
||||
2 files changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
|
||||
index 29e1299f20b..9d67cfbb257 100644
|
||||
--- a/drivers/common/qat/meson.build
|
||||
+++ b/drivers/common/qat/meson.build
|
||||
@@ -56,10 +56,10 @@ endif
|
||||
|
||||
if qat_crypto
|
||||
foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
|
||||
- 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c']
|
||||
+ 'qat_sym_hw_dp.c']
|
||||
sources += files(join_paths(qat_crypto_relpath, f))
|
||||
endforeach
|
||||
deps += ['security']
|
||||
ext_deps += libcrypto
|
||||
- cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
|
||||
+ cflags += ['-DBUILD_QAT_SYM']
|
||||
endif
|
||||
diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build
|
||||
index bc90ec44ccd..9e64ad6b2d6 100644
|
||||
--- a/drivers/crypto/qat/meson.build
|
||||
+++ b/drivers/crypto/qat/meson.build
|
||||
@@ -13,12 +13,9 @@ qat_deps += 'security'
|
||||
if dep.found()
|
||||
# Add our sources files to the list
|
||||
qat_sources += files('qat_sym_pmd.c',
|
||||
- 'qat_sym.c',
|
||||
- 'qat_sym_session.c',
|
||||
'qat_sym_hw_dp.c',
|
||||
- 'qat_asym_pmd.c',
|
||||
- 'qat_asym.c')
|
||||
+ 'qat_sym.c',
|
||||
+ 'qat_sym_session.c')
|
||||
qat_ext_deps += dep
|
||||
qat_cflags += '-DBUILD_QAT_SYM'
|
||||
- qat_cflags += '-DBUILD_QAT_ASYM'
|
||||
endif
|
42
test/common/config/pkgdep/patches/dpdk/21.08/dpdk_qat.patch
Normal file
42
test/common/config/pkgdep/patches/dpdk/21.08/dpdk_qat.patch
Normal file
@ -0,0 +1,42 @@
|
||||
Subject: [PATCH] build/meson: disable qat_asym driver
|
||||
---
|
||||
drivers/common/qat/meson.build | 4 ++--
|
||||
drivers/crypto/qat/meson.build | 3 ---
|
||||
2 files changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
|
||||
index 479a46f9f09..d695f7d1668 100644
|
||||
--- a/drivers/common/qat/meson.build
|
||||
+++ b/drivers/common/qat/meson.build
|
||||
@@ -64,10 +64,10 @@ endif
|
||||
|
||||
if qat_crypto
|
||||
foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
|
||||
- 'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c']
|
||||
+ 'qat_sym_hw_dp.c']
|
||||
sources += files(join_paths(qat_crypto_relpath, f))
|
||||
endforeach
|
||||
deps += ['security']
|
||||
ext_deps += libcrypto
|
||||
- cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
|
||||
+ cflags += ['-DBUILD_QAT_SYM']
|
||||
endif
|
||||
diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build
|
||||
index b3b2d172580..195a4f5fb28 100644
|
||||
--- a/drivers/crypto/qat/meson.build
|
||||
+++ b/drivers/crypto/qat/meson.build
|
||||
@@ -13,8 +13,6 @@ qat_deps += 'security'
|
||||
if dep.found()
|
||||
# Add our sources files to the list
|
||||
qat_sources += files(
|
||||
- 'qat_asym.c',
|
||||
- 'qat_asym_pmd.c',
|
||||
'qat_sym.c',
|
||||
'qat_sym_hw_dp.c',
|
||||
'qat_sym_pmd.c',
|
||||
@@ -22,5 +20,4 @@ if dep.found()
|
||||
)
|
||||
qat_ext_deps += dep
|
||||
qat_cflags += '-DBUILD_QAT_SYM'
|
||||
- qat_cflags += '-DBUILD_QAT_ASYM'
|
||||
endif
|
Loading…
Reference in New Issue
Block a user