Accepting request 957836 from home:susnux:branches:network
Update to LTS version 21.11. Fixes Factory / Tumbleweed and required for more recent versions of openvswitch OBS-URL: https://build.opensuse.org/request/show/957836 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=131
This commit is contained in:
parent
02e3c0cb0e
commit
1ef6481907
@ -0,0 +1,42 @@
|
||||
From 4034cebe2d0c36d8762fb4c06ba216b17f308e22 Mon Sep 17 00:00:00 2001
|
||||
From: Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
Date: Sat, 26 Feb 2022 22:14:14 +0100
|
||||
Subject: [PATCH] build: try to get kernel version from kernel source
|
||||
|
||||
When building the kernel modules, try to get the kernel
|
||||
version from the kernel sources first. This fixes the
|
||||
kernel modules installation directory if the target kernel
|
||||
version differs from the host kernel version, like for
|
||||
CI build or when packaging for linux distributions.
|
||||
|
||||
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
---
|
||||
kernel/linux/meson.build | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
|
||||
index d8fb20c1c3..78f28ffb0c 100644
|
||||
--- a/kernel/linux/meson.build
|
||||
+++ b/kernel/linux/meson.build
|
||||
@@ -11,7 +11,17 @@
|
||||
|
||||
if not meson.is_cross_build()
|
||||
# native build
|
||||
- kernel_version = run_command('uname', '-r').stdout().strip()
|
||||
+ kernel_version = ''
|
||||
+ if kernel_source_dir != ''
|
||||
+ # Try kernel makefile first
|
||||
+ r = run_command('make', '-s', '-C', kernel_source_dir, 'kernelrelease', check: false)
|
||||
+ if r.returncode() == 0
|
||||
+ kernel_version = r.stdout().strip()
|
||||
+ endif
|
||||
+ endif
|
||||
+ if kernel_version == ''
|
||||
+ kernel_version = run_command('uname', '-r').stdout().strip()
|
||||
+ endif
|
||||
kernel_install_dir = '/lib/modules/' + kernel_version + '/extra/dpdk'
|
||||
if kernel_build_dir == ''
|
||||
# use default path for native builds
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
From e2950fec9cd9c235a7847ed97b6914174857bf93 Mon Sep 17 00:00:00 2001
|
||||
From: "mvarlese@suse.de" <mvarlese@suse.de>
|
||||
Date: Wed, 29 Apr 2020 12:24:16 +0200
|
||||
Subject: [PATCH] fix cpu compatibility
|
||||
|
||||
---
|
||||
drivers/bus/vdev/vdev.c | 4 ++++
|
||||
lib/librte_eal/common/eal_common_bus.c | 5 ++++-
|
||||
lib/librte_eal/common/include/rte_common.h | 14 +++++++++++++-
|
||||
3 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
|
||||
index a89ea2353..cf8e8dca6 100644
|
||||
--- a/drivers/bus/vdev/vdev.c
|
||||
+++ b/drivers/bus/vdev/vdev.c
|
||||
@@ -55,7 +55,11 @@ static struct vdev_custom_scans vdev_custom_scans =
|
||||
static rte_spinlock_t vdev_custom_scan_lock = RTE_SPINLOCK_INITIALIZER;
|
||||
|
||||
/* register a driver */
|
||||
+#if defined(__x86_64__) || defined(__i386__)
|
||||
+void __attribute__((target ("sse2")))
|
||||
+#else
|
||||
void
|
||||
+#endif
|
||||
rte_vdev_register(struct rte_vdev_driver *driver)
|
||||
{
|
||||
TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
|
||||
diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
|
||||
index baa5b532a..58f3fdbaa 100644
|
||||
--- a/lib/librte_eal/common/eal_common_bus.c
|
||||
+++ b/lib/librte_eal/common/eal_common_bus.c
|
||||
@@ -15,8 +15,11 @@
|
||||
|
||||
static struct rte_bus_list rte_bus_list =
|
||||
TAILQ_HEAD_INITIALIZER(rte_bus_list);
|
||||
-
|
||||
+#if defined(__x86_64__) || defined(__i386__)
|
||||
+void __attribute__((target ("sse2")))
|
||||
+#else
|
||||
void
|
||||
+#endif
|
||||
rte_bus_register(struct rte_bus *bus)
|
||||
{
|
||||
RTE_VERIFY(bus);
|
||||
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
|
||||
index c35283807..8f4f98ed4 100644
|
||||
--- a/lib/librte_eal/common/include/rte_common.h
|
||||
+++ b/lib/librte_eal/common/include/rte_common.h
|
||||
@@ -107,8 +107,20 @@ typedef uint16_t unaligned_uint16_t;
|
||||
* Lowest number is the first to run.
|
||||
*/
|
||||
#ifndef RTE_INIT_PRIO /* Allow to override from EAL */
|
||||
+#if defined(__x86_64__) || defined(__i386__)
|
||||
#define RTE_INIT_PRIO(func, prio) \
|
||||
-static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void)
|
||||
+static void \
|
||||
+ __attribute__((constructor(RTE_PRIO(prio)), used)) \
|
||||
+ __attribute__((target ("sse2"))) \
|
||||
+ __attribute__((target ("no-sse3"))) \
|
||||
+ __attribute__((target ("no-sse4"))) \
|
||||
+ func(void)
|
||||
+#else
|
||||
+#define RTE_INIT_PRIO(func, prio) \
|
||||
+static void \
|
||||
+ __attribute__((constructor(RTE_PRIO(prio)), used)) \
|
||||
+ func(void)
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
--
|
||||
2.16.4
|
||||
|
@ -3,11 +3,11 @@ From: =?UTF-8?q?Jaime=20Caama=C3=B1o=20Ruiz?= <jcaamano@suse.com>
|
||||
Date: Mon, 21 Sep 2020 14:50:13 +0200
|
||||
Subject: [PATCH] SLE15 SP3 compatibility patch for kni
|
||||
|
||||
Updated 2021-05-14
|
||||
Updated 2022-02-25 for version 21.11
|
||||
|
||||
diff -Nur dpdk-stable-19.11.8/kernel/linux/kni/compat.h new/kernel/linux/kni/compat.h
|
||||
--- dpdk-stable-19.11.8/kernel/linux/kni/compat.h 2021-04-16 10:13:47.000000000 +0200
|
||||
+++ new/kernel/linux/kni/compat.h 2021-05-14 14:19:13.576601634 +0200
|
||||
diff -Nur dpdk-21.11/kernel/linux/kni/compat.h new/kernel/linux/kni/compat.h
|
||||
--- dpdk-21.11/kernel/linux/kni/compat.h 2021-11-26 18:58:21.000000000 +0100
|
||||
+++ new/kernel/linux/kni/compat.h 2022-02-25 18:08:52.638000134 +0100
|
||||
@@ -14,7 +14,10 @@
|
||||
#define SLE_VERSION(a, b, c) KERNEL_VERSION(a, b, c)
|
||||
#endif
|
||||
@ -26,6 +26,5 @@ diff -Nur dpdk-stable-19.11.8/kernel/linux/kni/compat.h new/kernel/linux/kni/com
|
||||
#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || \
|
||||
+ (SLE_VERSION_CODE && SLE_VERSION_CODE == SLE_VERSION(15, 3, 0)) || \
|
||||
(defined(RHEL_RELEASE_CODE) && \
|
||||
RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE)
|
||||
#define HAVE_TX_TIMEOUT_TXQUEUE
|
||||
|
||||
RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE) || \
|
||||
(defined(CONFIG_SUSE_KERNEL) && defined(HAVE_ARG_TX_QUEUE))
|
||||
|
@ -1,50 +0,0 @@
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Subject: Fix build errors due to the missing fallthrough statements
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
---
|
||||
kernel/linux/igb_uio/compat.h | 4 ++++
|
||||
kernel/linux/igb_uio/igb_uio.c | 6 +++---
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/kernel/linux/igb_uio/compat.h
|
||||
+++ b/kernel/linux/igb_uio/compat.h
|
||||
@@ -152,3 +152,7 @@ static inline bool igbuio_kernel_is_lock
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+#ifndef fallthrough
|
||||
+#define fallthrough do {} while (0)
|
||||
+#endif
|
||||
--- a/kernel/linux/igb_uio/igb_uio.c
|
||||
+++ b/kernel/linux/igb_uio/igb_uio.c
|
||||
@@ -236,7 +236,7 @@ igbuio_pci_enable_interrupts(struct rte_
|
||||
}
|
||||
#endif
|
||||
|
||||
- /* falls through - to MSI */
|
||||
+ fallthrough;
|
||||
case RTE_INTR_MODE_MSI:
|
||||
#ifndef HAVE_ALLOC_IRQ_VECTORS
|
||||
if (pci_enable_msi(udev->pdev) == 0) {
|
||||
@@ -255,7 +255,7 @@ igbuio_pci_enable_interrupts(struct rte_
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
- /* falls through - to INTX */
|
||||
+ fallthrough;
|
||||
case RTE_INTR_MODE_LEGACY:
|
||||
if (pci_intx_mask_supported(udev->pdev)) {
|
||||
dev_dbg(&udev->pdev->dev, "using INTX");
|
||||
@@ -265,7 +265,7 @@ igbuio_pci_enable_interrupts(struct rte_
|
||||
break;
|
||||
}
|
||||
dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");
|
||||
- /* falls through - to no IRQ */
|
||||
+ fallthrough;
|
||||
case RTE_INTR_MODE_NONE:
|
||||
udev->mode = RTE_INTR_MODE_NONE;
|
||||
udev->info.irq = UIO_IRQ_NONE;
|
||||
|
@ -11,8 +11,11 @@
|
||||
<flag>sse</flag>
|
||||
<flag>sse2</flag>
|
||||
<flag>ssse3</flag>
|
||||
<!-- TODO add SSE4.2 before that need to fix obs, patch on the way -->
|
||||
<flag>sse4_2</flag>
|
||||
</cpu>
|
||||
<disk>
|
||||
<size unit="G">6</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d94f27b58fd8abd7a793501ede80230b9f5fc07062c9671ed8f2cb19c31da936
|
||||
size 12464532
|
3
dpdk-21.11.tar.xz
Normal file
3
dpdk-21.11.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3246e3ed68ee2b369a5d8be2c06cf108a669e157f4d41c5bcbbb216bf5abd3a1
|
||||
size 15102516
|
81
dpdk.changes
81
dpdk.changes
@ -1,3 +1,84 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 26 17:45:33 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
|
||||
- Update to LTS version 21.11.
|
||||
21.11 should be supported for at least two years, the new major
|
||||
ABI version is 22. New Features:
|
||||
* General
|
||||
* hugetlbfs subdirectories
|
||||
* AddressSanitizer (ASan) integration for debug
|
||||
* mempool flag for non-IO usages
|
||||
* device class for DMA accelerators and drivers for
|
||||
* HiSilicon, Intel DSA, Intel IOAT, Marvell CNXK and NXP DPAA
|
||||
* device class for GPU devices and driver for NVIDIA CUDA
|
||||
* Toeplitz hash using Galois Fields New Instructions (GFNI)
|
||||
* Networking
|
||||
* MTU handling rework
|
||||
* get all MAC addresses of a port
|
||||
* RSS based on L3/L4 checksum fields
|
||||
* flow match on L2TPv2 and PPP
|
||||
* flow flex parser for custom header
|
||||
* control delivery of HW Rx metadata
|
||||
* transfer flows API rework
|
||||
* shared Rx queue
|
||||
* driver for NXP ENETFEC
|
||||
* vDPA driver for Xilinx devices
|
||||
* virtio RSS
|
||||
* vhost power monitor wakeup
|
||||
* testpmd multi-process
|
||||
* pcapng library and dumpcap tool
|
||||
* API/ABI
|
||||
* API namespace improvements and cleanups
|
||||
* API internals hidden
|
||||
* flags check for future ABI compatibility
|
||||
* More details in the release notes:
|
||||
https://doc.dpdk.org/guides/rel_notes/release_21_11.html
|
||||
- Update to LTS version 20.11.0, new features:
|
||||
* General
|
||||
* mbuf dynamic area increased from 16 to 36 bytes
|
||||
* ring zero cop
|
||||
* SIMD bitwidth limit API
|
||||
* moved igb_uio to dpdk-kmods/linux
|
||||
* removed Python 2 support
|
||||
* removed Make support, meson + pkg-config files are
|
||||
now used to build applications
|
||||
* Networking
|
||||
* FEC AP
|
||||
* Rx buffer split
|
||||
* thread safety in flow API
|
||||
* shared action in flow API
|
||||
* flow sampling and mirroring
|
||||
* tunnel offload API
|
||||
* multi-port hairpin
|
||||
* Solarflare EF100 architecture
|
||||
* Wangxun txgbe driver
|
||||
* vhost-vDPA backend in virtio-user
|
||||
* removed vhost dequeue zero-copy
|
||||
* removed legacy ethdev filtering
|
||||
* SWX pipeline aligned with P4
|
||||
* Baseband
|
||||
* Intel ACC100 driver
|
||||
* Cryptography
|
||||
* raw datapath API
|
||||
* Broadcom BCMFS symmetric crypto driver
|
||||
* RegEx
|
||||
* Marvell OCTEON TX2 regex driver
|
||||
* Others
|
||||
* Intel DLB/DLB2 drivers
|
||||
* Intel DSA support in IOAT driver
|
||||
* Full changes and more details in the release notes:
|
||||
https://doc.dpdk.org/guides/rel_notes/release_20_11.html
|
||||
- Rebased 0002-SLE15-SP3-compatibility-patch-for-kni.patch
|
||||
- Drop outdated 0001-fix-cpu-compatibility.patch
|
||||
- Drop outdated 0003-dpdk-fallthrough-comment-fixes.patch
|
||||
- Added 0001-build-try-to-get-kernel-version-from-kernel-source.patch
|
||||
Allow host system to have a different kernel than the target
|
||||
system, fixes kernel module installation path for such case.
|
||||
Submitted upstream 2022-02-26
|
||||
- Added fix-buildsystem-python36.patch for Leap as the buildsystem
|
||||
uses python syntax introduced with python37, but Leap still
|
||||
sticks with 3.6, so this backports it for the old python version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 25 13:41:49 UTC 2021 - Stefan Weiberg <sweiberg@suse.com>
|
||||
|
||||
|
355
dpdk.spec
355
dpdk.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package dpdk
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -18,68 +18,76 @@
|
||||
|
||||
|
||||
%define flavor @BUILD_FLAVOR@%{nil}
|
||||
%define aarch64_machine2 armv8a
|
||||
%define aarch64_machine armv8a
|
||||
%define exclusive_arch aarch64 x86_64 ppc64le
|
||||
|
||||
%define name_tag %{nil}
|
||||
%define summary_tag %{nil}
|
||||
%if "%flavor" == "thunderx"
|
||||
%if "%{flavor}" == "thunderx"
|
||||
%define name_tag -thunderx
|
||||
%define summary_tag (thunderx)
|
||||
%define aarch64_machine2 thunderx
|
||||
%define aarch64_machine thunderx
|
||||
%define exclusive_arch aarch64
|
||||
%endif
|
||||
%define machine native
|
||||
%define machine2 default
|
||||
%ifarch x86_64
|
||||
%define machine native
|
||||
%define target x86_64-%{machine}-linuxapp-gcc
|
||||
%endif
|
||||
|
||||
# http://doc.dpdk.org/guides-21.11/linux_gsg/build_dpdk.html#adjusting-build-options
|
||||
%define platform generic
|
||||
%define machine auto
|
||||
%ifarch aarch64
|
||||
%define machine2 %aarch64_machine2
|
||||
%define target arm64-%{machine2}-linuxapp-gcc
|
||||
%endif
|
||||
%ifarch ppc64le
|
||||
%define machine2 power8
|
||||
%define target ppc_64-%{machine2}-linuxapp-gcc
|
||||
%define machine %{aarch64_machine2}
|
||||
%endif
|
||||
# This is in sync with <src>/ABI_VERSION
|
||||
# TODO: automate this sync
|
||||
%define maj 20
|
||||
%define maj 22
|
||||
%define min 0
|
||||
%define lname libdpdk-%{maj}_%{min}
|
||||
%bcond_without shared
|
||||
#%%define lname libdpdk-%%{maj}_%%{min}
|
||||
%define lname libdpdk-%{maj}
|
||||
# Add option to build without examples
|
||||
%bcond_without examples
|
||||
# Add option to build without tools
|
||||
%bcond_without tools
|
||||
#
|
||||
Name: dpdk%{name_tag}
|
||||
Version: 19.11.10
|
||||
Version: 21.11
|
||||
Release: 0
|
||||
Summary: Set of libraries and drivers for fast packet processing
|
||||
License: BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-only
|
||||
Group: System/Libraries
|
||||
URL: http://dpdk.org
|
||||
Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz
|
||||
URL: https://www.dpdk.org/
|
||||
Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz
|
||||
Source1: preamble
|
||||
Patch1: 0001-fix-cpu-compatibility.patch
|
||||
Patch2: 0002-SLE15-SP3-compatibility-patch-for-kni.patch
|
||||
Patch3: 0003-dpdk-fallthrough-comment-fixes.patch
|
||||
# PATCH-FIX-OPENSUSE PATCH-FEATURE-UPSTREAM
|
||||
Patch0: 0001-build-try-to-get-kernel-version-from-kernel-source.patch
|
||||
Patch1: 0002-SLE15-SP3-compatibility-patch-for-kni.patch
|
||||
# PATCH-FIX-OPENSUSE fix-buildsystem-python36.patch -- Fix building with python36
|
||||
Patch2: fix-buildsystem-python36.patch
|
||||
BuildRequires: binutils
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: kernel-syms
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libmnl-devel
|
||||
BuildRequires: libnuma-devel
|
||||
BuildRequires: libpcap-devel
|
||||
BuildRequires: libfdt-devel
|
||||
BuildRequires: meson >= 0.49.2
|
||||
BuildRequires: modutils
|
||||
BuildRequires: pesign-obs-integration
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-pyelftools >= 0.22
|
||||
BuildRequires: rdma-core-devel
|
||||
BuildRequires: pkgconfig(jansson)
|
||||
BuildRequires: pkgconfig(libcrypto)
|
||||
BuildRequires: pkgconfig(libelf)
|
||||
BuildRequires: pkgconfig(libmnl)
|
||||
BuildRequires: pkgconfig(libpcap)
|
||||
BuildRequires: pkgconfig(numa)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Conflicts: dpdk-any
|
||||
Provides: dpdk-any = %{version}
|
||||
Obsoletes: dpdk-kmp-trace < %{version}
|
||||
ExclusiveArch: %exclusive_arch
|
||||
%if 0%{?sle_version} >= 120400
|
||||
BuildRequires: rdma-core-devel
|
||||
ExclusiveArch: %{exclusive_arch}
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
|
||||
# https://bugzilla.opensuse.org/show_bug.cgi?id=1196511
|
||||
BuildRequires: pkgconfig(libbpf)
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -97,6 +105,15 @@ Provides: dpdk-any-devel = %{version}
|
||||
This package contains the headers and other files needed for developing
|
||||
applications with the Data Plane Development Kit.
|
||||
|
||||
%package devel-static
|
||||
Summary: Data Plane Development Kit static development files %{summary_tag}
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name}-devel = %{version}
|
||||
|
||||
%description devel-static
|
||||
This package contains the static library files needed for developing
|
||||
applications with the Data Plane Development Kit.
|
||||
|
||||
%package -n %{lname}
|
||||
Summary: Data Plane Development Kit runtime libraries %{summary_tag}
|
||||
Group: Development/Libraries/C and C++
|
||||
@ -161,193 +178,85 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%define pmddir %{_libdir}/dpdk-pmds-%{maj}.%{min}
|
||||
|
||||
%prep
|
||||
# can't use %{name} because of dpdk-thunderx
|
||||
%setup -q -n dpdk-stable-%{version}
|
||||
%patch1 -p1 -z .init
|
||||
%patch2 -p1 -z .init
|
||||
%patch3 -p1
|
||||
# can't use %%{name} because of dpdk-thunderx
|
||||
%autosetup -p1 -n dpdk-%{version}
|
||||
|
||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
# Skip not supported examples
|
||||
sed -i "/performance-thread/d" examples/meson.build
|
||||
|
||||
# Verify ABI
|
||||
[ "$(cat ABI_VERSION)" = "%{maj}.%{min}" ] || exit 1
|
||||
|
||||
%build
|
||||
%define _vpath_builddir "build-%{_target_cpu}-$flavor"
|
||||
|
||||
cp mk/machine/armv8a/rte.vars.mk mk/machine/thunderx
|
||||
|
||||
# set up a method for modifying the resulting .config file
|
||||
function setconf() {
|
||||
if grep -q ^$1= $3/.config; then
|
||||
sed -i "s:^$1=.*$:$1=$2:g" $3/.config
|
||||
else
|
||||
echo $1=$2 >> $3/.config
|
||||
fi
|
||||
}
|
||||
|
||||
function setdefaultconf()
|
||||
{
|
||||
# Remove the below once upstream fixes the DPAA for NXP ARM
|
||||
setconf CONFIG_RTE_LIBRTE_DPAA_BUS n $1
|
||||
setconf CONFIG_RTE_LIBRTE_DPAA_MEMPOOL n $1
|
||||
setconf CONFIG_RTE_LIBRTE_DPAA_PMD n $1
|
||||
setconf CONFIG_RTE_LIBRTE_PMD_CAAM_JR n $1
|
||||
setconf CONFIG_RTE_LIBRTE_PMD_DPAA_SEC n $1
|
||||
setconf CONFIG_RTE_LIBRTE_PMD_DPAA_EVENTDEV n $1
|
||||
%ifarch aarch64
|
||||
setconf CONFIG_RTE_LIBRTE_PFE_PMD n $1
|
||||
%endif
|
||||
|
||||
setconf CONFIG_RTE_MACHINE '"%{machine2}"' $1
|
||||
# Disable experimental features
|
||||
setconf CONFIG_RTE_NEXT_ABI n $1
|
||||
|
||||
# Enable automatic driver loading from this path
|
||||
setconf CONFIG_RTE_EAL_PMD_PATH '"%{pmddir}"' $1
|
||||
|
||||
setconf CONFIG_RTE_LIBRTE_BNX2X_PMD y $1
|
||||
setconf CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT y $1
|
||||
setconf CONFIG_RTE_LIBRTE_PMD_PCAP y $1
|
||||
setconf CONFIG_RTE_LIBRTE_VHOST_NUMA y $1
|
||||
%if 0%{?sle_version} >= 120400
|
||||
setconf CONFIG_RTE_LIBRTE_MLX5_PMD y $1
|
||||
setconf CONFIG_RTE_LIBRTE_MLX4_PMD y $1
|
||||
%ifarch x86_64
|
||||
export CFLAGS="%{optflags} -msse4"
|
||||
%endif
|
||||
setconf CONFIG_RTE_EAL_IGB_UIO n $1
|
||||
setconf CONFIG_RTE_KNI_KMOD n $1
|
||||
|
||||
%if %{with shared}
|
||||
setconf CONFIG_RTE_BUILD_SHARED_LIB y $1
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 ppc64le
|
||||
setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n $1
|
||||
%endif
|
||||
%ifarch ppc64le
|
||||
setconf CONFIG_RTE_LIBRTE_PMD_RING n $1
|
||||
setconf CONFIG_RTE_LIBRTE_IXGBE_PMD n $1
|
||||
setconf CONFIG_RTE_LIBRTE_POWER n $1
|
||||
%endif
|
||||
}
|
||||
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
|
||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||
|
||||
export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -U_FORTIFY_SOURCE"
|
||||
|
||||
# DPDK defaults to using builder-specific compiler flags. However,
|
||||
# the config has been changed by specifying CONFIG_RTE_MACHINE=default
|
||||
# in order to build for a more generic host. NOTE: It is possible that
|
||||
# the compiler flags used still won't work for all Fedora-supported
|
||||
# machines, but runtime checks in DPDK will catch those situations.
|
||||
|
||||
make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
||||
setdefaultconf %{target}
|
||||
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||
examples="all"
|
||||
for flavor in %{flavors_to_build}; do
|
||||
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||
make V=1 O=%{target}-$flavor T=%{target} %{?_smp_mflags} config
|
||||
setdefaultconf %{target}-$flavor
|
||||
setconf CONFIG_RTE_EAL_IGB_UIO y %{target}-$flavor
|
||||
setconf CONFIG_RTE_KNI_KMOD y %{target}-$flavor
|
||||
cd %{target}-$flavor
|
||||
make V=1 %{?_smp_mflags}
|
||||
cd -
|
||||
%meson --includedir=%{incdir} \
|
||||
-Ddefault_library=shared \
|
||||
-Denable_docs=true \
|
||||
-Db_lto=true \
|
||||
%if %{with examples}
|
||||
-Dexamples="$examples" \
|
||||
%endif
|
||||
-Dplatform="%{platform}" \
|
||||
-Dcpu_instruction_set=%{machine} \
|
||||
-Denable_kmods=true \
|
||||
-Ddrivers_install_subdir=%{pmddir} \
|
||||
-Dkernel_dir="%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor"
|
||||
%meson_build
|
||||
# Make sure examples are only built once
|
||||
examples=""
|
||||
done
|
||||
|
||||
make V=1 O=%{target} %{?_smp_mflags}
|
||||
make V=1 O=%{target} %{?_smp_mflags} doc-api-html
|
||||
|
||||
%if %{with examples}
|
||||
make V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples
|
||||
%endif
|
||||
|
||||
%install
|
||||
# export needed for kmp package
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=updates
|
||||
export BRP_PESIGN_FILES="*.ko"
|
||||
|
||||
examples="%{?with_examples:all}"
|
||||
for flavor in %{flavors_to_build}; do
|
||||
cd %{target}-$flavor
|
||||
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||
dir=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||
krel=$(make -s -C "$dir" kernelrelease)
|
||||
mkdir -p %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||
#make install expects same kernel for build and target, lets copy it manually
|
||||
install -m644 ../%{target}-$flavor/kmod/*.ko %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||
cd -
|
||||
%meson_install
|
||||
# Also install the example binaries
|
||||
if [ ! -z "$examples" ]; then
|
||||
for f in %{_vpath_builddir}/examples/dpdk-*; do
|
||||
bn=$(basename "$f")
|
||||
[ -f "$f" ] && install -Dm 0755 ${f} "%{buildroot}%{_bindir}/${bn/dpdk-/dpdk_example_}"
|
||||
done
|
||||
fi
|
||||
examples=""
|
||||
done
|
||||
# In case dpdk-devel is installed
|
||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||
|
||||
%make_install O=%{target} prefix=%{_usr} libdir=%{_libdir}
|
||||
# Fix Kernel modules on Factory (/usr merge)
|
||||
%if 0%{?suse_version} > 1550
|
||||
mkdir -p %{buildroot}%{_prefix}/lib
|
||||
mv %{buildroot}/lib/modules %{buildroot}%{_prefix}/lib
|
||||
%endif
|
||||
|
||||
# Fix documentation
|
||||
mkdir -p %{buildroot}%{docdir}
|
||||
mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%{docdir}
|
||||
|
||||
%if ! %{with tools}
|
||||
rm -rf %{buildroot}%{sdkdir}/usertools/
|
||||
rm -rf %{buildroot}%{_sbindir}/dpdk_nic_bind
|
||||
# Remove tools if not needed
|
||||
for tool in dpdk-devbind.py dpdk-pmdinfo.py dpdk-telemetry.py dpdk-hugepages.py; do
|
||||
rm -rf "%{buildroot}%{_bindir}/$tool"
|
||||
done
|
||||
%else
|
||||
# Add compatibility symlink
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -s %{_bindir}/dpdk-devbind.py %{buildroot}%{_sbindir}/dpdk_nic_bind
|
||||
%endif
|
||||
rm -f %{buildroot}%{sdkdir}/usertools/setup.sh
|
||||
#TODO pip elftools has issues to fix
|
||||
rm -rf %{buildroot}%{_bindir}/dpdk-pmdinfo
|
||||
|
||||
%if %{with examples}
|
||||
find %{target}/examples/ -name "*.map" | xargs rm -f
|
||||
for f in %{target}/examples/*/%{target}/app/*; do
|
||||
bn=`basename ${f}`
|
||||
cp -p ${f} %{buildroot}%{_bindir}/dpdk_example_${bn}
|
||||
done
|
||||
%endif
|
||||
|
||||
# Create a driver directory with symlinks to all pmds
|
||||
mkdir -p %{buildroot}/%{pmddir}
|
||||
for f in %{buildroot}/%{_libdir}/*_pmd_*.so.*; do
|
||||
bn=$(basename ${f})
|
||||
ln -s ../${bn} %{buildroot}%{pmddir}/${bn}
|
||||
done
|
||||
#mempool is a driver now from 16.07
|
||||
mkdir -p %{buildroot}/%{pmddir}
|
||||
for f in %{buildroot}/%{_libdir}/*_mempool_*.so.*; do
|
||||
bn=$(basename ${f})
|
||||
ln -s ../${bn} %{buildroot}%{pmddir}/${bn}
|
||||
done
|
||||
|
||||
# Setup RTE_SDK environment as expected by apps etc
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/profile.d
|
||||
cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.sh
|
||||
if [ -z "\${RTE_SDK}" ]; then
|
||||
export RTE_SDK="%{sdkdir}"
|
||||
export RTE_TARGET="%{target}"
|
||||
export RTE_INCLUDE="%{incdir}"
|
||||
fi
|
||||
EOF
|
||||
|
||||
cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.csh
|
||||
if ( ! \${?RTE_SDK} ) then
|
||||
setenv RTE_SDK "%{sdkdir}"
|
||||
setenv RTE_TARGET "%{target}"
|
||||
setenv RTE_INCLUDE "%{incdir}"
|
||||
endif
|
||||
EOF
|
||||
|
||||
# Fixup target machine mismatch
|
||||
sed -i -e 's:-%{machine}-:-%{machine2}-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk*
|
||||
|
||||
#doc
|
||||
mkdir %{buildroot}%{_docdir}/
|
||||
mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%{_docdir}/
|
||||
|
||||
ln -s %{_bindir}/dpdk-procinfo %{buildroot}%{_bindir}/dpdk_proc_info
|
||||
ln -s %{_sbindir}/dpdk-devbind %{buildroot}%{_sbindir}/dpdk_nic_bind
|
||||
|
||||
# Fix interpreter
|
||||
find %{buildroot} -name "*.py" -exec sed -i 's|python$|python3|' \{\} +
|
||||
find %{buildroot} -name "*.py" -exec sed -i 's|env python|python|' \{\} +
|
||||
|
||||
# Remove duplicates
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
%fdupes %{buildroot}/%{docdir}
|
||||
%fdupes %{buildroot}/%{sdkdir}/examples
|
||||
|
||||
# Fix broken symlink (yes with * in its name)
|
||||
rm -v "%{buildroot}%{_libdir}/librte_*.so*"
|
||||
|
||||
%post devel -p /sbin/ldconfig
|
||||
%postun devel -p /sbin/ldconfig
|
||||
@ -355,60 +264,44 @@ find %{buildroot} -name "*.py" -exec sed -i 's|env python|python|' \{\} +
|
||||
%postun -n %{lname} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
# BSD
|
||||
%{_bindir}/testpmd
|
||||
%{_bindir}/testbbdev
|
||||
%{_bindir}/testsad
|
||||
%{_bindir}/dpdk-procinfo
|
||||
%{_bindir}/dpdk_proc_info
|
||||
%{_bindir}/dpdk-dumpcap
|
||||
%{_bindir}/dpdk-pdump
|
||||
%{_bindir}/dpdk-proc-info
|
||||
%{_bindir}/dpdk-test*
|
||||
|
||||
%files -n %{lname}
|
||||
%defattr(-,root,root)
|
||||
%if %{with shared}
|
||||
%license license/gpl-2.0.txt license/lgpl-2.1.txt license/bsd-3-clause.txt
|
||||
%{_libdir}/*.so.*
|
||||
%{pmddir}
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
#BSD
|
||||
%docdir
|
||||
%doc license/gpl-2.0.txt license/lgpl-2.1.txt
|
||||
%dir %{pmddir}
|
||||
%{pmddir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
#BSD
|
||||
%{incdir}/
|
||||
%{sdkdir}
|
||||
%if %{with tools}
|
||||
%exclude %{sdkdir}/usertools/
|
||||
%endif
|
||||
%{sdkdir}/
|
||||
%{pmddir}/*.so
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/libdpdk*.pc
|
||||
%if %{with examples}
|
||||
%exclude %{sdkdir}/examples/
|
||||
%endif
|
||||
%{_sysconfdir}/profile.d/dpdk-sdk-*.*
|
||||
%if ! %{with shared}
|
||||
|
||||
%files devel-static
|
||||
#BSD
|
||||
%{_libdir}/*.a
|
||||
%else
|
||||
%{_libdir}/*.so
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
#BSD
|
||||
%doc %docdir
|
||||
|
||||
%if %{with tools}
|
||||
%files tools
|
||||
%defattr(-,root,root)
|
||||
%{sdkdir}/usertools/
|
||||
%{_sbindir}/dpdk-devbind
|
||||
%{_sbindir}/dpdk_nic_bind
|
||||
%{_bindir}/dpdk-test-eventdev
|
||||
%{_bindir}/dpdk-test-compress-perf
|
||||
%{_bindir}/dpdk-test-crypto-perf
|
||||
%{_bindir}/dpdk-*.py
|
||||
%endif
|
||||
|
||||
%if %{with examples}
|
||||
%files examples
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/dpdk_example_*
|
||||
%doc %{sdkdir}/examples
|
||||
%endif
|
||||
|
12
fix-buildsystem-python36.patch
Normal file
12
fix-buildsystem-python36.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Nur dpdk-21.11/buildtools/binutils-avx512-check.py new/buildtools/binutils-avx512-check.py
|
||||
--- dpdk-21.11/buildtools/binutils-avx512-check.py 2021-11-26 18:58:21.000000000 +0100
|
||||
+++ new/buildtools/binutils-avx512-check.py 2022-02-26 18:44:13.325608971 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
src = '__asm__("vpgatherqq {}");'.format(gather_params).encode('utf-8')
|
||||
subprocess.run(cc + ['-c', '-xc', '-o', obj.name, '-'], input=src, check=True)
|
||||
asm = subprocess.run([objdump, '-d', '--no-show-raw-insn', obj.name],
|
||||
- capture_output=True, check=True).stdout.decode('utf-8')
|
||||
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True).stdout.decode('utf-8')
|
||||
if gather_params not in asm:
|
||||
print('vpgatherqq displacement error with as')
|
||||
sys.exit(1)
|
Loading…
Reference in New Issue
Block a user