summaryrefslogtreecommitdiffstats
path: root/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch')
-rw-r--r--recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch42
1 files changed, 42 insertions, 0 deletions
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 @@
1From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001
2From: Andrea Righi <andrea.righi@canonical.com>
3Date: Tue, 15 Nov 2022 13:56:45 +0800
4Subject: [PATCH] support 5.18+ kernel ABI
5
6Upstream-Status: Pending [Taken from Ubuntu Source, https://git.launchpad.net/ubuntu/+source/dpdk-kmods/commit/debian/patches?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd]
7
8Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
9Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
10---
11 linux/igb_uio/igb_uio.c | 13 ++++++++++++-
12 1 file changed, 12 insertions(+), 1 deletion(-)
13
14diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
15index 33e0e02..89b5262 100644
16--- a/linux/igb_uio/igb_uio.c
17+++ b/linux/igb_uio/igb_uio.c
18@@ -30,9 +30,20 @@ enum rte_intr_mode {
19 #define RTE_INTR_MODE_MSI_NAME "msi"
20 #define RTE_INTR_MODE_MSIX_NAME "msix"
21
22-
23 #include "compat.h"
24
25+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
26+static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
27+{
28+ return dma_set_mask(&dev->dev, mask);
29+}
30+
31+static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
32+{
33+ return dma_set_coherent_mask(&dev->dev, mask);
34+}
35+#endif
36+
37 /**
38 * A structure describing the private information for a uio device.
39 */
40--
412.25.1
42