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 A8B6CA00C2 for ; Thu, 3 Nov 2022 10:32:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A193F40DF7; Thu, 3 Nov 2022 10:32:30 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 6B3F54069B for ; Thu, 3 Nov 2022 10:32:28 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id w14so1714050wru.8 for ; Thu, 03 Nov 2022 02:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JIIG9/8UjaT3dBRWvnu2oTxasz0QtDUD9XjKDYZTQLQ=; b=BGkZGDhFLzZ51xZ/NnG1+hg6Xyqg1ps8m0DkC7BnF0TsbdZxXCxW0lyTMU9sI0rtHm QnM1jAh2ZBhAST829xFB7w9oCSkrEd2yitXTS9InaoAniNVZM3ZiZ4kV/n4DlTI/CtJd S5bLCriChGIpUhszEILPWMLyFnJFC9OaY+nVKXg7Q5v1kTW/QpxFIrmHlRW5wZfX33f7 FXioTjAcFvdNwzMrNwPurho3Haa9lC2Y7Ha5uydXuMlzVVEd/nB+MJYcaEyu7+058jk4 VSI9wQV+/vN2Mzmh/JpRHpVi1nqYWCReF3Z+r22PjhpcNRVWImxZ+56kPvovCa00y02c 3x3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JIIG9/8UjaT3dBRWvnu2oTxasz0QtDUD9XjKDYZTQLQ=; b=m2bn/59eZQvvTgRGrNmZbeUoY0XDr55spYkDvHoyYF8bmwm64E9TNLW0bty2K493QS 7A6mG5Jg2cesawS6a6nC2OZ2PrguTo/NEBTHpfPeEiG0Etmz5WhLn+wXC9XpNZp+Jq+v 4Gn/ymOGC6fgsSu/Na8AaTPq5fYL64PjLsY6mlgs827bi1SxN0dQ7rbGcNPfNcFa1RM3 wbilGkLcbpFiRaF1pkmi4nm+eI9lnfcLiwDQlSqhbibgiHLk68Nyh/d+qsYgHyjF9whJ c5JihhpOi1o7gr6DZZq71H13GhpHV/cZ5xNjNZWVJ/QwIPl/GXTwiIs9RdvTBWcX4vcY C4Gg== X-Gm-Message-State: ACrzQf0Zhn7NG4T4BXDNIRJTBl6+UlqA7FEwa5KCeLpj3Bdgn7dbbiEA KBrLrDM/Xuj+nD83WEeW26g= X-Google-Smtp-Source: AMsMyM7QQSW5bvMXxZITenh8jJ/czgHZQKeh26N/dri3hrw94rAsnlQ7Bd6e7964daIWHlmUX6Nsug== X-Received: by 2002:a5d:530e:0:b0:236:e1b9:4a9 with SMTP id e14-20020a5d530e000000b00236e1b904a9mr9021253wrv.70.1667467948258; Thu, 03 Nov 2022 02:32:28 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id r12-20020a05600c35cc00b003b47ff307e1sm806528wmq.31.2022.11.03.02.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:32:27 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: move flow direction rule recovery' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:38 +0000 Message-Id: <20221103092758.1099402-80-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.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 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1edc00899d3163b01ffefea8d658c79581aab9e3 Thanks. Luca Boccassi --- >From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 30 Sep 2022 15:22:06 +0800 Subject: [PATCH] net/hns3: move flow direction rule recovery [ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ] The 'hns3_restore_filter' is used to restore flow rules from rte_flow API during the reset process. This patch moves the recovery of flow direction rule to this function to improve code maintainability. Fixes: fcba820d9b9e ("net/hns3: support flow director") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_ethdev.c | 4 ---- drivers/net/hns3/hns3_fdir.c | 3 +++ drivers/net/hns3/hns3_flow.c | 7 +++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 7ae9456664..33b10539e0 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns) if (ret) goto err_promisc; - ret = hns3_restore_all_fdir_filter(hns); - if (ret) - goto err_promisc; - ret = hns3_restore_rx_interrupt(hw); if (ret) goto err_promisc; diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 4e1667d2f8..f210c8b1e4 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) bool err = false; int ret; + if (hns->is_vf) + return 0; + /* * This API is called in the reset recovery process, the parent function * must hold hw->lock. diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index c71a22e6a6..ffdd131d15 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1652,6 +1652,13 @@ out: int hns3_restore_filter(struct rte_eth_dev *dev) { + struct hns3_adapter *hns = dev->data->dev_private; + int ret; + + ret = hns3_restore_all_fdir_filter(hns); + if (ret != 0) + return ret; + return hns3_restore_rss_filter(dev); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.199595860 +0000 +++ 0080-net-hns3-move-flow-direction-rule-recovery.patch 2022-11-03 09:27:25.529425461 +0000 @@ -1 +1 @@ -From 860ed8516afe49e61c537e19c1016f70b9a84fd2 Mon Sep 17 00:00:00 2001 +From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index b0f69589d9..15d622a900 100644 +index 7ae9456664..33b10539e0 100644 @@ -26 +27 @@ -@@ -5907,10 +5907,6 @@ hns3_restore_conf(struct hns3_adapter *hns) +@@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns) @@ -34 +35 @@ - ret = hns3_restore_ptp(hns); + ret = hns3_restore_rx_interrupt(hw); @@ -38 +39 @@ -index 30e5e66772..48a91fb517 100644 +index 4e1667d2f8..f210c8b1e4 100644 @@ -41 +42 @@ -@@ -1068,6 +1068,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) +@@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) @@ -52 +53 @@ -index 08fa6da7bb..dd61ecd2aa 100644 +index c71a22e6a6..ffdd131d15 100644 @@ -55 +56 @@ -@@ -1675,6 +1675,13 @@ out: +@@ -1652,6 +1652,13 @@ out: