From b281f37a661da5b8cfbae30f66705ace77b99875 Mon Sep 17 00:00:00 2001 From: Duncan Bellamy Date: Sun, 7 Apr 2024 20:52:40 +0000 Subject: [PATCH] community/spdk: upgrade to 24.01 --- community/spdk/APKBUILD | 13 +++-- community/spdk/isal.patch | 113 ++++++++++++++++++++++++++++---------- 2 files changed, 93 insertions(+), 33 deletions(-) diff --git a/community/spdk/APKBUILD b/community/spdk/APKBUILD index 6ae073d6e91..4b9befcc6a7 100644 --- a/community/spdk/APKBUILD +++ b/community/spdk/APKBUILD @@ -1,12 +1,12 @@ # Contributor: Duncan Bellamy # Maintainer: Duncan Bellamy pkgname=spdk -pkgver=23.09 -pkgrel=1 +pkgver=24.01 +pkgrel=0 pkgdesc="Storage Performance Development Kit" url="https://spdk.io/" # only supports 64bit -arch="aarch64 ppc64le x86_64" +arch="aarch64 ppc64le riscv64 x86_64" license="BSD-3-Clause" makedepends=" bash @@ -14,12 +14,15 @@ makedepends=" coreutils cunit-dev dpdk-dev + fuse3-dev isa-l-dev libaio-dev linux-headers ncurses-dev openssl-dev>3 + patchelf python3 + py3-pip py3-setuptools util-linux-dev " @@ -49,7 +52,7 @@ package() { } sha512sums=" -bfff0326ea26db6f888aa30ca33ef5b0936992a21484d84224ece7ff68ee005683812b33027439dc8f3473bd76c7adcc5a460019836c84064396204958d75a42 spdk-23.09.tar.gz -33ec27866069db1eb63d0f3cd6bedab0dc41c701436f35a14e771cda31d7569b2fccf89dc6ac2dd5a6b96caed9c178c72622d46beaaf3469a26678b4c178161e isal.patch +c683136593661fddae6e849a1496e6664ad74e89661f6ec6ad82e653d8fc5bb64496d5d9fb263c1a05c868c1ecd1cc869d48c52895423aebab5df7a161197199 spdk-24.01.tar.gz +ebd74c4fb47fd3caedaa3956235504469d12f60095f4b6633e1e7fcdfb18da27b7a2ad23fb3429bb3357054b7f0b7fb9eba1c0454f840d84dd6db55b10b3f097 isal.patch 087f189776699685791900014beb0ab5d8fc369133b205368100aea4e6ea4d1c85061bb1719bffa21b6a949639180cb8966e85f553efc85eaeb608a7940ffc3b remove-stupid.patch " diff --git a/community/spdk/isal.patch b/community/spdk/isal.patch index 654c042d020..89a4bd4a4d0 100644 --- a/community/spdk/isal.patch +++ b/community/spdk/isal.patch @@ -1,6 +1,7 @@ ---- a/CONFIG -+++ b/CONFIG -@@ -167,6 +167,9 @@ +diff -Nurp a/CONFIG b/CONFIG +--- a/CONFIG 2024-01-26 15:17:18.000000000 +0000 ++++ b/CONFIG 2024-03-29 10:32:22.061805545 +0000 +@@ -164,6 +164,9 @@ CONFIG_CUSTOMOCF=n # Build ISA-L library CONFIG_ISAL=y @@ -10,9 +11,10 @@ # Build ISA-L-crypto library CONFIG_ISAL_CRYPTO=y ---- a/Makefile -+++ b/Makefile -@@ -18,7 +18,9 @@ +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2024-01-26 15:17:18.000000000 +0000 ++++ b/Makefile 2024-03-29 10:32:22.065805595 +0000 +@@ -18,7 +18,9 @@ DIRS-$(CONFIG_EXAMPLES) += examples DIRS-$(CONFIG_APPS) += app DIRS-y += test DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild @@ -22,7 +24,7 @@ DIRS-$(CONFIG_ISAL_CRYPTO) += isalcryptobuild DIRS-$(CONFIG_VFIO_USER) += vfiouserbuild DIRS-$(CONFIG_SMA) += proto -@@ -62,10 +64,12 @@ +@@ -62,10 +64,12 @@ LIB += ipsecbuild DPDK_DEPS += ipsecbuild endif @@ -35,9 +37,10 @@ ifeq ($(CONFIG_ISAL_CRYPTO),y) ISALCRYPTOBUILD = isalcryptobuild LIB += isalcryptobuild ---- a/configure -+++ b/configure -@@ -61,6 +61,8 @@ +diff -Nurp a/configure b/configure +--- a/configure 2024-01-26 15:17:18.000000000 +0000 ++++ b/configure 2024-03-29 14:51:50.088244865 +0000 +@@ -60,6 +60,8 @@ function usage() { echo " Implies --without-dpdk." echo " --with-idxd Build the IDXD library and accel framework plug-in module." echo " --without-idxd Disabled while experimental. Only built for x86 when enabled." @@ -46,7 +49,7 @@ echo " --with-crypto Build isa-l-crypto and vbdev crypto module. No path required." echo " --without-crypto Disable isa-l-crypto and vbdev crypto module." echo " --with-fio[=DIR] Build fio_plugin." -@@ -434,6 +436,22 @@ +@@ -433,6 +435,22 @@ for i in "$@"; do --without-dpdk) CONFIG[DPDK_DIR]= ;; @@ -69,14 +72,12 @@ --with-wpdk=*) check_dir "$i" CONFIG[WPDK_DIR]=$(readlink -f ${i#*=}) -@@ -1174,87 +1192,17 @@ +@@ -1173,98 +1191,16 @@ if [[ "${CONFIG[FUZZER]}" = "y" && "$CC_ exit 1 fi -if [[ $arch == x86_64* ]] || [[ $arch == aarch64* ]]; then -+if [[ "${CONFIG[ISAL_PKG_CONFIG]}" = "y" ]]; then -+ echo "Using system ISA-L" - CONFIG[ISAL]=y +- CONFIG[ISAL]=y - # make sure the submodule is initialized - if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then - echo "ISA-L is required but was not found, please init the submodule with:" @@ -106,11 +107,13 @@ - ISAL_CRYPTO_OPTS+=("--disable-sve2") - fi - fi ++if [[ "${CONFIG[ISAL_PKG_CONFIG]}" = "y" ]]; then ++ echo "Using system ISA-L" else - # for PPC CONFIG[ISAL]=n - echo "WARNING: ISA-L cannot be used due to architecture incompatibility." -+ echo "ISA-L not installed." ++ echo "ISA-L not installed" fi -# now either configure ISA-L or disable unavailable features @@ -122,6 +125,12 @@ - else - ISAL_OPTS=() - fi +- if [[ -n "${CONFIG[SHARED]}" ]]; then +- ISAL_OPTS+=("--enable-shared=yes") +- else +- ISAL_OPTS+=("--enable-shared=no") +- fi +- ISAL_OPTS+=("--prefix=${CONFIG[PREFIX]}") - echo -n "Configuring ISA-L (logfile: $ISAL_LOG)..." - ./autogen.sh &> $ISAL_LOG - ./configure CFLAGS="-fPIC -g -O2" "${ISAL_OPTS[@]}" --enable-shared=no >> $ISAL_LOG 2>&1 @@ -149,7 +158,12 @@ - if [[ -n "${CONFIG[CROSS_PREFIX]}" ]]; then - ISAL_CRYPTO_OPTS+=("--host=${CONFIG[CROSS_PREFIX]}") - fi -- ISAL_CRYPTO_OPTS+=("--enable-shared=no") +- if [[ -n "${CONFIG[SHARED]}" ]]; then +- ISAL_CRYPTO_OPTS+=("--enable-shared=yes") +- else +- ISAL_CRYPTO_OPTS+=("--enable-shared=no") +- fi +- ISAL_CRYPTO_OPTS+=("--prefix=${CONFIG[PREFIX]}") - echo -n "Configuring ISA-L-crypto (logfile: $ISAL_CRYPTO_LOG)..." - ./autogen.sh &> $ISAL_CRYPTO_LOG - ./configure CFLAGS="-fPIC -g -O2" "${ISAL_CRYPTO_OPTS[@]}" >> $ISAL_CRYPTO_LOG 2>&1 @@ -160,10 +174,11 @@ CONFIG[ISAL_CRYPTO]=n fi ---- a/lib/accel/accel_sw.c -+++ b/lib/accel/accel_sw.c -@@ -19,8 +19,8 @@ - #include "spdk/xor.h" +diff -Nurp a/lib/accel/accel_sw.c b/lib/accel/accel_sw.c +--- a/lib/accel/accel_sw.c 2024-01-26 15:17:18.000000000 +0000 ++++ b/lib/accel/accel_sw.c 2024-03-29 10:32:22.065805595 +0000 +@@ -20,8 +20,8 @@ + #include "spdk/dif.h" #ifdef SPDK_CONFIG_ISAL -#include "../isa-l/include/igzip_lib.h" @@ -173,8 +188,9 @@ #include "../isa-l-crypto/include/aes_xts.h" #endif #endif ---- a/lib/util/crc16.c -+++ b/lib/util/crc16.c +diff -Nurp a/lib/util/crc16.c b/lib/util/crc16.c +--- a/lib/util/crc16.c 2024-01-26 15:17:18.000000000 +0000 ++++ b/lib/util/crc16.c 2024-03-29 10:32:22.069805646 +0000 @@ -11,7 +11,7 @@ */ @@ -184,8 +200,21 @@ uint16_t spdk_crc16_t10dif(uint16_t init_crc, const void *buf, size_t len) ---- a/lib/util/crc_internal.h -+++ b/lib/util/crc_internal.h +diff -Nurp a/lib/util/crc64.c b/lib/util/crc64.c +--- a/lib/util/crc64.c 2024-01-26 15:17:18.000000000 +0000 ++++ b/lib/util/crc64.c 2024-03-29 16:24:20.464386622 +0000 +@@ -7,7 +7,7 @@ + #include "spdk/crc64.h" + + #ifdef SPDK_CONFIG_ISAL +-#include "isa-l/include/crc64.h" ++#include "isa-l/crc64.h" + + uint64_t + spdk_crc64_nvme(const void *buf, size_t len, uint64_t crc) +diff -Nurp a/lib/util/crc_internal.h b/lib/util/crc_internal.h +--- a/lib/util/crc_internal.h 2024-01-26 15:17:18.000000000 +0000 ++++ b/lib/util/crc_internal.h 2024-03-29 10:32:22.069805646 +0000 @@ -10,7 +10,7 @@ #ifdef SPDK_CONFIG_ISAL @@ -195,9 +224,10 @@ #elif defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) #define SPDK_HAVE_ARM_CRC #include ---- a/lib/util/xor.c -+++ b/lib/util/xor.c -@@ -85,7 +85,7 @@ +diff -Nurp a/lib/util/xor.c b/lib/util/xor.c +--- a/lib/util/xor.c 2024-01-26 15:17:18.000000000 +0000 ++++ b/lib/util/xor.c 2024-03-29 10:32:22.069805646 +0000 +@@ -85,7 +85,7 @@ xor_gen_basic(void *dest, void **sources } #ifdef SPDK_CONFIG_ISAL @@ -206,3 +236,30 @@ #define SPDK_XOR_BUF_ALIGN 32 +diff -Nurp a/mk/spdk.common.mk b/mk/spdk.common.mk +--- a/mk/spdk.common.mk 2024-01-26 15:17:18.000000000 +0000 ++++ b/mk/spdk.common.mk 2024-04-07 20:48:45.911456449 +0000 +@@ -182,7 +182,6 @@ ifeq ($(CONFIG_ISAL), y) + COMMON_CFLAGS += -I$(ISAL_DIR)/.. + ifeq ($(CONFIG_SHARED),y) + SYS_LIBS += -L$(ISAL_DIR)/.libs -lisal +-LDFLAGS += -Wl,-rpath=$(ISAL_DIR)/.libs + else + SYS_LIBS += $(ISAL_DIR)/.libs/libisal.a + endif +@@ -190,7 +189,6 @@ ifeq ($(CONFIG_ISAL_CRYPTO), y) + COMMON_CFLAGS += -I$(ISAL_CRYPTO_DIR)/.. + ifeq ($(CONFIG_SHARED),y) + SYS_LIBS += -L$(ISAL_CRYPTO_DIR)/.libs -lisal_crypto +-LDFLAGS += -Wl,-rpath=$(ISAL_CRYPTO_DIR)/.libs + else + SYS_LIBS += $(ISAL_CRYPTO_DIR)/.libs/libisal_crypto.a + endif +@@ -397,7 +395,6 @@ LINK_CXX=\ + # Provide function to ease build of a shared lib + define spdk_build_realname_shared_lib + $(1) -o $@ -shared $(CPPFLAGS) $(LDFLAGS) \ +- -Wl,-rpath=$(DESTDIR)/$(libdir) \ + -Wl,--soname,$(notdir $@) \ + -Wl,--whole-archive $(2) -Wl,--no-whole-archive \ + -Wl,--version-script=$(3) \