DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>
Subject: [PATCH] kni: fix build with Linux 6.3
Date: Tue, 28 Feb 2023 17:29:09 +0000	[thread overview]
Message-ID: <20230228172909.2054386-1-ferruh.yigit@amd.com> (raw)

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


             reply	other threads:[~2023-02-28 17:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 17:29 Ferruh Yigit [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230228172909.2054386-1-ferruh.yigit@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).