From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02EDC42ECF for ; Thu, 20 Jul 2023 17:31:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2DE8427EE; Thu, 20 Jul 2023 17:31:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9CABA400D6 for ; Thu, 20 Jul 2023 17:31:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689867072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKwH5zOmIkOxY1Kr2lEQe5Uu2siGna/Gqt49/tstwvg=; b=Q1LJEXhHmgPj/Y5K7xCBEUYjqmLUllfxXEVhA6K3iPiP874j07K0uLILQ5vBaFlXVxEX3I hdeOojPVRJG0+W03FqdZEMu+UFxiOZ/TPelIGeQUUDdAhP7fjuhFZl89esNiKPmsb5VC6O AQWbPEUrd4cJITirZWtSejXK2pzUDvQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-q80i6n52PV-mJoUZ8DsqxQ-1; Thu, 20 Jul 2023 11:23:48 -0400 X-MC-Unique: q80i6n52PV-mJoUZ8DsqxQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B398388D715; Thu, 20 Jul 2023 15:23:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE2914A9004; Thu, 20 Jul 2023 15:23:31 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Subject: patch 'kni: fix build with Linux 6.5' has been queued to stable release 21.11.5 Date: Thu, 20 Jul 2023 16:19:32 +0100 Message-ID: <20230720151942.262154-141-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/25/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a70ea21c2eaed45e16fcede756502533e6620166 Thanks. Kevin --- >From a70ea21c2eaed45e16fcede756502533e6620166 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 11 Jul 2023 11:09:41 +0100 Subject: [PATCH] kni: fix build with Linux 6.5 [ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ] The get_user_pages_remote() API has been modified in Linux kernel v6.5 [1], "struct vm_area_struct **vmas" parameter removed from the API. To fix KNI build with Linux kernel v6.5, version check added around the get_user_pages_remote() API. [1] ca5e863233e8 ("mm/gup: remove vmas parameter from get_user_pages_remote()") Signed-off-by: Ferruh Yigit --- kernel/linux/kni/compat.h | 4 ++++ kernel/linux/kni/kni_dev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 7aa6cd9fca..8beb670465 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -152,2 +152,6 @@ #define HAVE_NETIF_RX_NI #endif + +#if KERNEL_VERSION(6, 5, 0) > LINUX_VERSION_CODE +#define HAVE_VMA_IN_GUP +#endif diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h index 6e64380d06..417c67b5ae 100644 --- a/kernel/linux/kni/kni_dev.h +++ b/kernel/linux/kni/kni_dev.h @@ -108,5 +108,9 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk, ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL); #else + #ifdef HAVE_VMA_IN_GUP ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL); + #else + ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL); + #endif #endif if (ret < 0) -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-20 16:18:11.557325864 +0100 +++ 0141-kni-fix-build-with-Linux-6.5.patch 2023-07-20 16:17:55.227752819 +0100 @@ -1 +1 @@ -From dd33d53b9a032d7376aa04a28a1235338e1fd78f Mon Sep 17 00:00:00 2001 +From a70ea21c2eaed45e16fcede756502533e6620166 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ] + @@ -15,2 +16,0 @@ -Cc: stable@dpdk.org - @@ -35 +35 @@ -index 21bfb6890e..975379825b 100644 +index 6e64380d06..417c67b5ae 100644