From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E747DA04DD for ; Wed, 28 Oct 2020 11:49:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1AA7C9F0; Wed, 28 Oct 2020 11:49:14 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 776102C2A for ; Wed, 28 Oct 2020 11:49:12 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id g12so5120680wrp.10 for ; Wed, 28 Oct 2020 03:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KvGX4OVYPlOm1l/pciwSm7rlm9lzXXEil2wf28yxJxg=; b=XgnkeQCk8VZkoZBiq0ysN2VyT6VeiXnEqKMxq9PzkySFCyEXpaPk5BPojG7EzscDCZ Oq5Nu0E1rKRcb45VRB4xrpSFHCghKZiND1ZK2sGD/5sh1n1y2XvEKX6lvyCCSrFV8Srx uqfdrmIKj6BqgmiX8WCt4866c3FNGzPsV7WvkuKzYZM1XshyTr9jE8FMzO1WiYsp/UjE 1qmKkyVIy5n3wuBgZ7pLSfTd+d9RaYPcUSJ/wx3wESYLKzRBm6ZuDczv85QJgBU0N783 7aZryXvMMX8xykb2Ml2c+gUxWjP6OkdRkXfKD/fsgfv6c61B9Nse/KeQSADJd7ysMjIF eE1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KvGX4OVYPlOm1l/pciwSm7rlm9lzXXEil2wf28yxJxg=; b=OdzfjyYgGybeaa1KmqcDOibileCJVyzKQnL/3cdnZMS9PA96fGy1du8IZK8LlG+LHW n+P0oEvvLvcawYA6F3ywg3DCBYp1ephVkzwXk4kiBZ2Hfxv4ry+0wYKAzozHvvyyRbMd evqAjcaw+mrd9p/o3TVNP0OCeGl6uXt/RGU6rV6Xd+bPI6p5E+ECA2JfCfgOK7iKn0PD 3n03/fN5ba9Dto15O0ir5pnSdUiebgaQCdWkGyZ/mE13QOIHoSiNQ8/GsAPNQPQO2X4v pbmnpnk5zkLhXM9wzUCPVdN/oAHbSNhgrnXmR1Vz6BXDv78aelrmGnNnxDdz90atcauu 9P2A== X-Gm-Message-State: AOAM532lU2e/FemAgMSJo2qfl1O8Q7L7ULjx1O+yV1KLoH2NHem0o0Ln 61fH+2/ddERKWdQPwXsCkPqGrXHNTrspJCnI X-Google-Smtp-Source: ABdhPJw4uCcWt1MFGv1NMwL3qO1tKDaEjElED7i2a8pxlTRsAnhJ77sko5D2rLme8eZaeGGAivVMAg== X-Received: by 2002:adf:eb04:: with SMTP id s4mr8636936wrn.81.1603882151226; Wed, 28 Oct 2020 03:49:11 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i126sm6093232wmi.0.2020.10.28.03.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:49:10 -0700 (PDT) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: dpdk stable Date: Wed, 28 Oct 2020 10:43:37 +0000 Message-Id: <20201028104606.3504127-58-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build with Linux 5.9' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. 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. Thanks. Luca Boccassi --- >From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Mon, 17 Aug 2020 11:32:47 +0100 Subject: [PATCH] kni: fix build with Linux 5.9 [ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ] Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get 'struct task_struct' parameter: commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code") The change reflected to the KNI with version check. Signed-off-by: Ferruh Yigit --- kernel/linux/kni/compat.h | 4 ++++ kernel/linux/kni/kni_dev.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 9ee45dbf6f..d515b27669 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -134,3 +134,7 @@ #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE #define HAVE_TX_TIMEOUT_TXQUEUE #endif + +#if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE +#define HAVE_TSK_IN_GUP +#endif diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h index ca5f92a47b..c15da311ba 100644 --- a/kernel/linux/kni/kni_dev.h +++ b/kernel/linux/kni/kni_dev.h @@ -101,8 +101,13 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk, offset = iova & (PAGE_SIZE - 1); /* 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); +#else + ret = get_user_pages_remote(tsk->mm, iova, 1, + FOLL_TOUCH, &page, NULL, NULL); +#endif if (ret < 0) return 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:13.583373119 +0000 +++ 0058-kni-fix-build-with-Linux-5.9.patch 2020-10-28 10:35:11.524830318 +0000 @@ -1,16 +1,16 @@ -From 87efaea6376c8ae1a69e471450744a973995726b Mon Sep 17 00:00:00 2001 +From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Mon, 17 Aug 2020 11:32:47 +0100 Subject: [PATCH] kni: fix build with Linux 5.9 +[ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ] + Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get 'struct task_struct' parameter: commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code") The change reflected to the KNI with version check. -Cc: stable@dpdk.org - Signed-off-by: Ferruh Yigit --- kernel/linux/kni/compat.h | 4 ++++