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 18BC041EA5 for ; Wed, 15 Mar 2023 23:48:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 124B842B71; Wed, 15 Mar 2023 23:48:13 +0100 (CET) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id B988040FDF for ; Wed, 15 Mar 2023 23:48:07 +0100 (CET) Received: by mail-wm1-f47.google.com with SMTP id c8-20020a05600c0ac800b003ed2f97a63eso1994581wmr.3 for ; Wed, 15 Mar 2023 15:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678920487; 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=HpVM2rKo+F6a7LtRnOYLVK1jD9E2Kh0ACcr2nmqhP/k=; b=Ai6YmfAeF8Aocjz8m+mmZiFXO7xZF3rzEuzFNDgDLcn+iEeklBbO8tF41/DWjFI3Cl qlWcB6IJRnqb7cy0zMdxPSaZ2v2ozScPtizQQBWgDcPWdxc77Jp31tvAni1yiLOOA7sf /YA/ZruWe/LN0a9uFmVF9GIe4wTOQiNk6/6IKQtHxNAK+CkaXdDMmSOPOATPkAtl3CQ5 e4bnXvS3B4oDoth/AqPr7dlCn8AuVbbVEQxDm7nMsd6gU3TgMRHQx3/7q9uexkYu3kY4 GINe2NElPGcTDKprn7HfoeUOE5zuMWtJOfdP5bMd+AtxQns7aPdy/LKpz6EfWH7kv/A0 nB4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678920487; 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=HpVM2rKo+F6a7LtRnOYLVK1jD9E2Kh0ACcr2nmqhP/k=; b=OBgWpqm9PGQWDk4R/uoO86qpOtK6SHPwqjzn8CTyRkzWIe9ypcg+nJHsIR4bfB03KB AzvCGFOy5h7EFnYiaGJPFhk1P4uPEm0gdziD5cUiiIirBR+ryj9z+RI2W6hymAggBg4t e6HEfFo25SEZgRQmdua0bJks05KP/SWPpU66mGOCjrmdAD4HDS/y1UBFjO5cTkfUX25s TSV3q2HAZgZoMR85uvMn5vLdB9P7l8wEySzevywixyPos2auLn8rfrvVolO2R6xaH4kv l2M5rQ6IhSjSdd13oi+kqxHAE7JnJvFBIDdfWTiVkXPt19YbA3VSqrsZ7l2tvLAsWcOu veVw== X-Gm-Message-State: AO0yUKUJKj+r/pXQwj0fQdnDQiPobLHp4+RvkPvLpChLK0g8yxgixjSC xiThFMCH/86rAOHxAo8lWFk= X-Google-Smtp-Source: AK7set/2jidMUa7NwhiljfKpXQFiAxXMq4m3Hrh60gvte24sPEtXLv/t0TLOnyelc2088QsT1iJnJg== X-Received: by 2002:a05:600c:46ca:b0:3ed:4818:be62 with SMTP id q10-20020a05600c46ca00b003ed4818be62mr816841wmo.34.1678920487446; Wed, 15 Mar 2023 15:48:07 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id t9-20020a7bc3c9000000b003eb3933ef10sm3062953wmj.46.2023.03.15.15.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 15:48:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: separate setting and clearing RSS rule' has been queued to stable release 20.11.8 Date: Wed, 15 Mar 2023 22:46:24 +0000 Message-Id: <20230315224631.1025649-33-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315224631.1025649-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-71-luca.boccassi@gmail.com> <20230315224631.1025649-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/093e74c9a8f9f809a766c42ab547daeb2e41c7ca Thanks. Luca Boccassi --- >From 093e74c9a8f9f809a766c42ab547daeb2e41c7ca Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:12 +0800 Subject: [PATCH] net/hns3: separate setting and clearing RSS rule [ upstream commit 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 ] Separate the setting and clearing of RSS rule. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 46 +++++++++++++++++------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index f537526704..5f9e63f8dd 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1503,8 +1503,22 @@ hns3_update_indir_table(struct hns3_hw *hw, } static int -hns3_config_rss_filter(struct hns3_hw *hw, - const struct hns3_rss_conf *conf, bool add) +hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) +{ + int ret; + + if (!conf->valid) + return 0; + + ret = hns3_disable_rss(hw); + if (ret) + hns3_err(hw, "RSS disable failed(%d)", ret); + + return ret; +} + +static int +hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) { uint64_t flow_types; uint16_t num; @@ -1521,19 +1535,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, .queue = conf->conf.queue, }; - if (!add) { - if (!conf->valid) - return 0; - - ret = hns3_disable_rss(hw); - if (ret) { - hns3_err(hw, "RSS disable failed(%d)", ret); - return ret; - } - - return 0; - } - /* Set rx queues to use */ num = RTE_MIN(hw->data->nb_rx_queues, rss_flow_conf.queue_num); if (rss_flow_conf.queue_num > num) @@ -1574,8 +1575,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list); while (rss_filter_ptr) { TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries); - ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, - false); + ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info); if (ret) rss_rule_fail_cnt++; else @@ -1605,7 +1605,7 @@ hns3_restore_rss_filter(struct hns3_hw *hw) if (!filter->filter_info.valid) continue; - ret = hns3_config_rss_filter(hw, &filter->filter_info, true); + ret = hns3_config_rss_filter(hw, &filter->filter_info); if (ret != 0) { hns3_err(hw, "restore RSS filter failed, ret=%d", ret); goto out; @@ -1649,8 +1649,7 @@ hns3_rss_action_is_dup(struct hns3_hw *hw, } static int -hns3_flow_parse_rss(struct rte_eth_dev *dev, - const struct hns3_rss_conf *conf, bool add) +hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf) { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; @@ -1660,7 +1659,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, return -EINVAL; } - return hns3_config_rss_filter(hw, conf, add); + return hns3_config_rss_filter(hw, conf); } static int @@ -1747,7 +1746,7 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev, } } - ret = hns3_flow_parse_rss(dev, new_conf, true); + ret = hns3_flow_parse_rss(dev, new_conf); if (ret != 0) { rte_free(rss_filter_ptr); return ret; @@ -1927,8 +1926,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, break; case RTE_ETH_FILTER_HASH: rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule; - ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, - false); + ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info); if (ret) return rte_flow_error_set(error, EIO, RTE_FLOW_ERROR_TYPE_HANDLE, -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-15 22:44:51.523374909 +0000 +++ 0033-net-hns3-separate-setting-and-clearing-RSS-rule.patch 2023-03-15 22:44:49.651851686 +0000 @@ -1 +1 @@ -From 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 Mon Sep 17 00:00:00 2001 +From 093e74c9a8f9f809a766c42ab547daeb2e41c7ca Mon Sep 17 00:00:00 2001 @@ -6 +6 @@ -Separate the setting and clearing of RSS rule. +[ upstream commit 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 ] @@ -8 +8 @@ -Cc: stable@dpdk.org +Separate the setting and clearing of RSS rule. @@ -17 +17 @@ -index 21e00e515e..4da98d7adc 100644 +index f537526704..5f9e63f8dd 100644 @@ -20 +20 @@ -@@ -1535,8 +1535,22 @@ hns3_update_indir_table(struct hns3_hw *hw, +@@ -1503,8 +1503,22 @@ hns3_update_indir_table(struct hns3_hw *hw, @@ -45 +45 @@ -@@ -1553,19 +1567,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, +@@ -1521,19 +1535,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, @@ -65 +65 @@ -@@ -1606,8 +1607,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) +@@ -1574,8 +1575,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) @@ -75 +75 @@ -@@ -1636,7 +1636,7 @@ hns3_restore_rss_filter(struct hns3_hw *hw) +@@ -1605,7 +1605,7 @@ hns3_restore_rss_filter(struct hns3_hw *hw) @@ -84 +84 @@ -@@ -1680,8 +1680,7 @@ hns3_rss_action_is_dup(struct hns3_hw *hw, +@@ -1649,8 +1649,7 @@ hns3_rss_action_is_dup(struct hns3_hw *hw, @@ -94 +94 @@ -@@ -1691,7 +1690,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, +@@ -1660,7 +1659,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, @@ -103 +103 @@ -@@ -1778,7 +1777,7 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev, +@@ -1747,7 +1746,7 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev, @@ -112 +112 @@ -@@ -1961,8 +1960,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, +@@ -1927,8 +1926,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,