DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] kni: fix build with Linux 6.3
@ 2023-02-28 17:29 Ferruh Yigit
  2023-02-28 20:45 ` David Marchand
  2023-04-14 15:25 ` [PATCH v2] " Ferruh Yigit
  0 siblings, 2 replies; 10+ messages in thread
From: Ferruh Yigit @ 2023-02-28 17:29 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, David Marchand

KNI calls `get_user_pages_remote()` API which is using `FOLL_TOUCH`
flag, but `FOLL_TOUCH` is no more in public headers since v6.3,
causing a build error.

`FOLL_*` defines in Linux kernel first moved to another header [1],
later some of them moved to memory subsystem internal header [2] for 6.3

Quickly fixing build error by defining it in KNI compatibility header
when it is not defined in Linux headers.

There is a risk in this approach that if Linux kernel updates flags
value and it diverges from the value defined in KNI.

[1]
Commit b5054174ac7c ("mm: move FOLL_* defs to mm_types.h")

[2]
Commit 2c2241081f7d ("mm/gup: move private gup FOLL_ flags to internal.h")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 kernel/linux/kni/compat.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 7aa6cd9fca75..42305799ebbd 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -151,3 +151,8 @@
 	 RHEL_RELEASE_VERSION(9, 1) <= RHEL_RELEASE_CODE))
 #define HAVE_NETIF_RX_NI
 #endif
+
+/* defined in 'mm/internal.h' since v6.3 */
+#ifndef FOLL_TOUCH
+#define FOLL_TOUCH (1 << 16)
+#endif
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-19 14:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 17:29 [PATCH] kni: fix build with Linux 6.3 Ferruh Yigit
2023-02-28 20:45 ` David Marchand
2023-03-20 12:10   ` David Marchand
2023-03-20 13:01     ` David Marchand
2023-03-24  3:04       ` [EXT] " Vamsi Krishna Attunuru
2023-04-13  7:22         ` David Marchand
2023-04-14 15:29       ` Ferruh Yigit
2023-04-14 15:25 ` [PATCH v2] " Ferruh Yigit
2023-04-17  7:32   ` David Marchand
2023-04-19 14:38     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).