mirror of
git://git.yoctoproject.org/meta-dpdk.git
synced 2025-07-19 21:09:04 +02:00

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 <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001
|
|
From: Andrea Righi <andrea.righi@canonical.com>
|
|
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 <andrea.righi@canonical.com>
|
|
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
|
---
|
|
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
|
|
|