net/vpp: fix vpp 19.01 installation on fedora 29/30
Change-Id: I953add8d0c01317be041b83eddb4b62689badbf0 Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460940 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
c39e1e96c2
commit
3c006fe10b
19
test/common/config/patch/vpp/fedora29-fix.patch
Normal file
19
test/common/config/patch/vpp/fedora29-fix.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 900c1efb4..4889eefbe 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -92,9 +92,11 @@ RPM_DEPENDS += ninja-build
|
||||
RPM_DEPENDS += libuuid-devel
|
||||
|
||||
ifeq ($(OS_ID),fedora)
|
||||
- RPM_DEPENDS += dnf-utils
|
||||
+ ifeq ("$(wildcard /usr/bin/package-cleanup)","")
|
||||
+ RPM_DEPENDS += dnf-utils
|
||||
+ endif
|
||||
RPM_DEPENDS += subunit subunit-devel
|
||||
- RPM_DEPENDS += compat-openssl10-devel
|
||||
+ RPM_DEPENDS += openssl-devel
|
||||
RPM_DEPENDS += python2-devel python2-ply
|
||||
RPM_DEPENDS += python2-virtualenv
|
||||
RPM_DEPENDS += mbedtls-devel
|
||||
|
74
test/common/config/patch/vpp/fedora30-fix.patch
Normal file
74
test/common/config/patch/vpp/fedora30-fix.patch
Normal file
@ -0,0 +1,74 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 900c1efb4..4a2aa231e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -94,7 +94,7 @@ RPM_DEPENDS += libuuid-devel
|
||||
ifeq ($(OS_ID),fedora)
|
||||
RPM_DEPENDS += dnf-utils
|
||||
RPM_DEPENDS += subunit subunit-devel
|
||||
- RPM_DEPENDS += compat-openssl10-devel
|
||||
+ RPM_DEPENDS += openssl-devel
|
||||
RPM_DEPENDS += python2-devel python2-ply
|
||||
RPM_DEPENDS += python2-virtualenv
|
||||
RPM_DEPENDS += mbedtls-devel
|
||||
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
|
||||
index 6c46ac298..227a0772d 100644
|
||||
--- a/build/external/packages/dpdk.mk
|
||||
+++ b/build/external/packages/dpdk.mk
|
||||
@@ -148,7 +148,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
-DPDK_EXTRA_CFLAGS += -L$(I)/lib -I$(I)/include
|
||||
+DPDK_EXTRA_CFLAGS += -L$(I)/lib -I$(I)/include -Wno-address-of-packed-member
|
||||
|
||||
# assemble DPDK make arguments
|
||||
DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \
|
||||
diff --git a/src/cmake/memfd.cmake b/src/cmake/memfd.cmake
|
||||
index ca499c459..f7eec2c10 100644
|
||||
--- a/src/cmake/memfd.cmake
|
||||
+++ b/src/cmake/memfd.cmake
|
||||
@@ -24,3 +24,12 @@ if (HAVE_MEMFD_CREATE)
|
||||
add_definitions(-DHAVE_MEMFD_CREATE)
|
||||
endif()
|
||||
|
||||
+check_c_source_compiles("
|
||||
+ #define _GNU_SOURCE
|
||||
+ #include <sched.h>
|
||||
+ int main() { return getcpu (0, 0); }
|
||||
+" HAVE_GETCPU)
|
||||
+
|
||||
+if (HAVE_GETCPU)
|
||||
+ add_definitions(-DHAVE_GETCPU)
|
||||
+endif()
|
||||
diff --git a/src/vppinfra/linux/syscall.h b/src/vppinfra/linux/syscall.h
|
||||
index 1ae029d58..99d1a3ab6 100644
|
||||
--- a/src/vppinfra/linux/syscall.h
|
||||
+++ b/src/vppinfra/linux/syscall.h
|
||||
@@ -19,11 +19,13 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
+#ifndef HAVE_GETCPU
|
||||
static inline int
|
||||
getcpu (unsigned *cpu, unsigned *node, void *tcache)
|
||||
{
|
||||
return syscall (__NR_getcpu, cpu, node, tcache);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static inline long
|
||||
set_mempolicy (int mode, const unsigned long *nodemask, unsigned long maxnode)
|
||||
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c
|
||||
index 365ee0443..ed1c0329f 100644
|
||||
--- a/src/vppinfra/pmalloc.c
|
||||
+++ b/src/vppinfra/pmalloc.c
|
||||
@@ -53,7 +53,7 @@ pmalloc_validate_numa_node (u32 * numa_node)
|
||||
if (*numa_node == CLIB_PMALLOC_NUMA_LOCAL)
|
||||
{
|
||||
u32 cpu;
|
||||
- if (getcpu (&cpu, numa_node, 0) != 0)
|
||||
+ if (getcpu (&cpu, numa_node) != 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
@ -28,6 +28,7 @@ CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,o
|
||||
LIBRXE_INSTALL=true
|
||||
|
||||
OSID=$(source /etc/os-release && echo $ID)
|
||||
OSVERSION=$(source /etc/os-release && echo $VERSION_ID)
|
||||
PACKAGEMNG='undefined'
|
||||
|
||||
function install_rxe_cfg()
|
||||
@ -249,6 +250,15 @@ function install_vpp()
|
||||
# the next release.
|
||||
git -C ./vpp apply ${VM_SETUP_PATH}/patch/vpp/workaround-dont-notify-transport-closing.patch
|
||||
|
||||
if [ "${OSID}" == 'fedora' ]; then
|
||||
if [ ${OSVERSION} -eq 29 ]; then
|
||||
git -C ./vpp apply ${VM_SETUP_PATH}/patch/vpp/fedora29-fix.patch
|
||||
fi
|
||||
if [ ${OSVERSION} -eq 30 ]; then
|
||||
git -C ./vpp apply ${VM_SETUP_PATH}/patch/vpp/fedora30-fix.patch
|
||||
fi
|
||||
fi
|
||||
|
||||
# Installing required dependencies for building VPP
|
||||
yes | make -C ./vpp install-dep
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user