From 58b60ea11b2742bbb92eb481ba47e66d681ca9d9 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Tue, 15 Nov 2022 14:56:18 +0800 Subject: dpdk-kmods: update to latest commit 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 Signed-off-by: Anuj Mittal --- recipes-extended/dpdk/dpdk-kmods_git.bb | 5 ++- .../dpdk/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 +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 +Signed-off-by: Naveen Saini +--- + 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 + -- cgit v1.2.3-54-g00ecf