DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: <dev@dpdk.org>
Cc: David Marchand <david.marchand@redhat.com>,
	Vamsi Krishna Attunuru <vattunuru@marvell.com>
Subject: [PATCH v2] kni: fix build with Linux 6.3
Date: Fri, 14 Apr 2023 16:25:22 +0100	[thread overview]
Message-ID: <20230414152522.83636-1-ferruh.yigit@amd.com> (raw)
In-Reply-To: <20230228172909.2054386-1-ferruh.yigit@amd.com>

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

`get_user_pages_remote()` already sets `FOLL_TOUCH` internally,
no need to set this flag externally anyway, moving flag from the call
altogether.

[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>
---
Cc: David Marchand <david.marchand@redhat.com>
Cc: Vamsi Krishna Attunuru <vattunuru@marvell.com>

v2:
 * Remove 'FOLL_TOUCH' flag from 'get_user_pages_remote()'
---
 kernel/linux/kni/kni_dev.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index a2c6d9fc1a53..21bfb6890e30 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -105,11 +105,9 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 
 	/* Read one page struct info */
 #ifdef HAVE_TSK_IN_GUP
-	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #else
-	ret = get_user_pages_remote(tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #endif
 	if (ret < 0)
 		return 0;
-- 
2.34.1


  parent reply	other threads:[~2023-04-14 15:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 17:29 [PATCH] " 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 ` Ferruh Yigit [this message]
2023-04-17  7:32   ` [PATCH v2] " 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=20230414152522.83636-1-ferruh.yigit@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=vattunuru@marvell.com \
    /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).