Carry a patch which allows to support 5.18+ kernel ABI.

https://git.launchpad.net/ubuntu/+source/dpdk-kmods/tree/debian/patches/0001-support-linux-5.18.patch?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd

Build error with 5.19 kernel:
igb_uio.c:515:15: error: implicit declaration of function 'pci_set_dma_mask';
did you mean 'ipi_send_mask'? [-Werror=implicit-function-declaration]

Signed-off-by: Naveen Saini <[email protected]>
---
 recipes-extended/dpdk/dpdk-kmods_git.bb       |  5 ++-
 .../dpdk/0001-support-5.18-kernel-ABI.patch   | 42 +++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 
recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch

diff --git a/recipes-extended/dpdk/dpdk-kmods_git.bb 
b/recipes-extended/dpdk/dpdk-kmods_git.bb
index b266655..e929d5b 100644
--- a/recipes-extended/dpdk/dpdk-kmods_git.bb
+++ b/recipes-extended/dpdk/dpdk-kmods_git.bb
@@ -2,12 +2,15 @@ SUMMARY = "DPDK Kernel Module igb_uio"
 DESCRIPTION = "UIO driver for Intel IGB PCI cards"
 HOMEPAGE = "http://git.dpdk.org/dpdk-kmods/";
 
+FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
+
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = 
"file://igb_uio.c;beginline=1;endline=4;md5=a05cd72f85021e22ff6b2632b437450b"
 
 SRC_URI = "git://dpdk.org/git/dpdk-kmods;protocol=https;branch=main \
+           file://0001-support-5.18-kernel-ABI.patch;patchdir=../.. \
            "
-SRCREV = "e13d7af77a1bf98757f85c3c4083f6ee6d0d2372"
+SRCREV = "4a589f7bed00fc7009c93d430bd214ac7ad2bb6b"
 
 S = "${WORKDIR}/git/linux/igb_uio"
 
diff --git a/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch 
b/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch
new file mode 100644
index 0000000..bada7bd
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch
@@ -0,0 +1,42 @@
+From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001
+From: Andrea Righi <[email protected]>
+Date: Tue, 15 Nov 2022 13:56:45 +0800
+Subject: [PATCH] support 5.18+ kernel ABI
+
+Upstream-Status: Pending [Taken from Ubuntu Source, 
https://git.launchpad.net/ubuntu/+source/dpdk-kmods/commit/debian/patches?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd]
+
+Signed-off-by: Andrea Righi <[email protected]>
+Signed-off-by: Naveen Saini <[email protected]>
+---
+ linux/igb_uio/igb_uio.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
+index 33e0e02..89b5262 100644
+--- a/linux/igb_uio/igb_uio.c
++++ b/linux/igb_uio/igb_uio.c
+@@ -30,9 +30,20 @@ enum rte_intr_mode {
+ #define RTE_INTR_MODE_MSI_NAME "msi"
+ #define RTE_INTR_MODE_MSIX_NAME "msix"
+ 
+-
+ #include "compat.h"
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
++{
++      return dma_set_mask(&dev->dev, mask);
++}
++
++static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
++{
++      return dma_set_coherent_mask(&dev->dev, mask);
++}
++#endif
++
+ /**
+  * A structure describing the private information for a uio device.
+  */
+-- 
+2.25.1
+
-- 
2.37.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7750): 
https://lists.yoctoproject.org/g/meta-intel/message/7750
Mute This Topic: https://lists.yoctoproject.org/mt/95038458/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to