From 8a5a5f7fc9ead4cc7590d541687c5e6a3e1dcfcb6d42d9f59808ed88f1dc02a4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 16 Oct 2021 09:30:14 +0000 Subject: [PATCH] Accepting request 918757 from home:tiwai:branches:network - Fix build error with SLE15-SP4 kernel (bsc#1190362): dpdk-fallthrough-comment-fixes.patch OBS-URL: https://build.opensuse.org/request/show/918757 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=129 --- dpdk-fallthrough-comment-fixes.patch | 49 ++++++++++++++++++++++++++++ dpdk.changes | 6 ++++ dpdk.spec | 4 ++- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 dpdk-fallthrough-comment-fixes.patch diff --git a/dpdk-fallthrough-comment-fixes.patch b/dpdk-fallthrough-comment-fixes.patch new file mode 100644 index 0000000..c930210 --- /dev/null +++ b/dpdk-fallthrough-comment-fixes.patch @@ -0,0 +1,49 @@ +From: Takashi Iwai +Subject: Fix build errors due to the missing fallthrough statements + +Signed-off-by: Takashi Iwai + +--- + 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; diff --git a/dpdk.changes b/dpdk.changes index e6fccd5..4e1455c 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 13 16:46:30 CEST 2021 - tiwai@suse.de + +- Fix build error with SLE15-SP4 kernel (bsc#1190362): + dpdk-fallthrough-comment-fixes.patch + ------------------------------------------------------------------- Thu Sep 2 15:42:14 UTC 2021 - Guillaume GARDET diff --git a/dpdk.spec b/dpdk.spec index b4b1815..4ec91bd 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package dpdk # # Copyright (c) 2021 SUSE LLC # @@ -63,6 +63,7 @@ Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz Source1: preamble Patch1: 0001-fix-cpu-compatibility.patch Patch2: 0001-SLE15-SP3-compatibility-patch-for-kni.patch +Patch3: dpdk-fallthrough-comment-fixes.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: kernel-syms @@ -163,6 +164,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the %setup -q -n dpdk-stable-%{version} %patch1 -p1 -z .init %patch2 -p1 -z .init +%patch3 -p1 # This fixes CROSS compilation (broken) in the mk file for ThunderX sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk