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 07695A0540 for ; Thu, 7 Jul 2022 09:57:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 021AC427F0; Thu, 7 Jul 2022 09:57:39 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 8B78940A7B for ; Thu, 7 Jul 2022 09:57:37 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 5C69640AA5 for ; Thu, 7 Jul 2022 07:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180657; bh=wieuondVAi+aIDON87ztXfFZ1wem/RWTmdis+wi5+VM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Vt+R0icSze9FVt8OYAphKWBtSQNWXn6RvxFnJhKCYxOQdBtfbLQFrB81JxYKUEX23 2SbzaoxjAfxCHeyFcNhRLYv0lHEB2aJNCZU5z+YW18nt66ruRdMBpfiu/MlWm7WqK9 PzikNrPWvaXM9W8hOcgixAaPCPNGM7q+0ZOcYnAcTRuoxPAFuT4PIv1ZOyOaK9YlNn 4Exxy4944JofCcVWqEy0ejEQUz3DXDwSipypziwypbByaQY7C5FO4bssBMSr5b3rTU 9KT3DRbBxHcFIXYzRwZLT12Nmq8b/lgi4O1UZ1MteU6cRfpI+LtqO8myDajPOOUVrt Mq2Zhr1Dn61kA== Received: by mail-ed1-f71.google.com with SMTP id m10-20020a056402510a00b0043a93d807ffso1454593edd.12 for ; Thu, 07 Jul 2022 00:57:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wieuondVAi+aIDON87ztXfFZ1wem/RWTmdis+wi5+VM=; b=MZo62jdFdzIbqrLMCde4lhraW57Ptu5ciPvrAZBsgEseLrl3KqYJXNgA3l/wmeRWa4 zCkfAYRXbj+58z6GYL9USFFklugtJAPhGO/MJ4ifCcX2B08VVtNq4G8YV/eWVBaADOlD 4ADkHLIDrZoQS1XRIpRNNb+x0rLaFW/fKFwW3UYzZpf8z5+nu3YCI1pvlQKHs+Tu+Z2U eNHjFQ/p4NufL5UxVNfyFgLSxeQYubbHIcpm36HgE8FokQGyaBrwrjDuwjGeRUG+dgNv EwRf28Y3/PPzk0wYGW7eBIiDdnE8cCb433kfc5tdJOZnwO1D1NFJP8p7N8zSlna3O6z+ qW4A== X-Gm-Message-State: AJIora9T8Goy5uHJpjaOJ8W4R/tpy6nh+LZyud78a93sS9/I6SXbh0UN 7ExDmo9O5F77lQxEnbBc2nqxut9WR1+670h5UcTIIpFERyA/JPNQTkURtk8M2MOOx8Y3AmiiAcH ZHYAWSbHjtv+6Yjdv9Ee0YkQQ X-Received: by 2002:a17:907:6d14:b0:726:34db:89fc with SMTP id sa20-20020a1709076d1400b0072634db89fcmr43881738ejc.406.1657180656678; Thu, 07 Jul 2022 00:57:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKpbGh93c12lBjb/bbY8zd4ONn8ZOeFSgBIausmZrf1DCVDlSIvrwzUj4DScyXY012dsR5fg== X-Received: by 2002:a17:907:6d14:b0:726:34db:89fc with SMTP id sa20-20020a1709076d1400b0072634db89fcmr43881731ejc.406.1657180656500; Thu, 07 Jul 2022 00:57:36 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id g15-20020a056402320f00b0043a85d7d15esm3756357eda.12.2022.07.07.00.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:57:35 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Jiri Slaby Cc: Andrew Rybchenko , dpdk stable Subject: patch 'kni: fix build with Linux 5.18' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:40 +0200 Message-Id: <20220707075522.194223-45-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 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/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/104eedad56662727ead7c3375d6eba4a26c8734b Thanks. Christian Ehrhardt --- >From 104eedad56662727ead7c3375d6eba4a26c8734b Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 1 Jun 2022 08:53:58 +0200 Subject: [PATCH] kni: fix build with Linux 5.18 [ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ] Since commit 2655926aea9b (net: Remove netif_rx_any_context() and netif_rx_ni().) in 5.18, netif_rx_ni() no longer exists as netif_rx() can be called from any context. So define HAVE_NETIF_RX_NI for older releases and call the appropriate function in kni_net. netif_rx_ni() must be used on older kernel since netif_rx() might might lead to deadlocks or other problems there. Signed-off-by: Jiri Slaby Reviewed-by: Andrew Rybchenko --- kernel/linux/kni/compat.h | 4 ++++ kernel/linux/kni/kni_net.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 664785674f..0db29a4a6f 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -141,3 +141,7 @@ #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE #define HAVE_TSK_IN_GUP #endif + +#if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE +#define HAVE_NETIF_RX_NI +#endif diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index c8bad5f197..e54864c977 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -411,7 +411,11 @@ kni_net_rx_normal(struct kni_dev *kni) skb->ip_summed = CHECKSUM_UNNECESSARY; /* Call netif interface */ +#ifdef HAVE_NETIF_RX_NI netif_rx_ni(skb); +#else + netif_rx(skb); +#else /* Update statistics */ dev->stats.rx_bytes += len; -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.079372011 +0200 +++ 0045-kni-fix-build-with-Linux-5.18.patch 2022-07-07 09:54:10.921824345 +0200 @@ -1 +1 @@ -From c98600d4bed6d15599e448990f2ba117ca938a2d Mon Sep 17 00:00:00 2001 +From 104eedad56662727ead7c3375d6eba4a26c8734b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ] + @@ -14,2 +15,0 @@ -Cc: stable@dpdk.org - @@ -36 +36 @@ -index 29e5b9e21f..a8b092b756 100644 +index c8bad5f197..e54864c977 100644 @@ -39 +39 @@ -@@ -441,7 +441,11 @@ kni_net_rx_normal(struct kni_dev *kni) +@@ -411,7 +411,11 @@ kni_net_rx_normal(struct kni_dev *kni)