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 53289A0555 for ; Wed, 25 May 2022 18:29:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB4BE42B88; Wed, 25 May 2022 18:29:51 +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 1392C42B82 for ; Wed, 25 May 2022 18:29:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653496189; 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=uUjzD7eWcxMUVW5QoKnhEb4DWuxdzHJtQQio3cGluu0=; b=E/7WPm0caJ/qVAHHvYim0cil4Iuje2ab2NBospaeSkrpqcGSx0kWBdZqBK6IYx4cLqMGtn BcDxCyU0r6rwVaH45JWP0Y0xLbQHF0zcVotTw8DelKU4t5vPwehuChnt/cyjPTfd5JhSt9 KxhN9xtg41Oe7bjyCvayZP09iDVDm5o= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-q81k-ieaMACi4jYNCmKvpQ-1; Wed, 25 May 2022 12:29:46 -0400 X-MC-Unique: q81k-ieaMACi4jYNCmKvpQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABBCC293248A; Wed, 25 May 2022 16:29:30 +0000 (UTC) Received: from rh.Home (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABF842026D64; Wed, 25 May 2022 16:29:29 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: Min Hu , dpdk stable Subject: patch 'net/hns3: remove redundant RSS tuple field' has been queued to stable release 21.11.2 Date: Wed, 25 May 2022 17:28:17 +0100 Message-Id: <20220525162847.711753-25-ktraynor@redhat.com> In-Reply-To: <20220525162847.711753-1-ktraynor@redhat.com> References: <20220525162847.711753-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/30/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/0cec1c94778a9dccf1e84b44145d08d45d06ee6c Thanks. Kevin --- >From 0cec1c94778a9dccf1e84b44145d08d45d06ee6c Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Thu, 5 May 2022 20:27:07 +0800 Subject: [PATCH] net/hns3: remove redundant RSS tuple field [ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ] The 'rss_tuple_fields' in struct struct hns3_rss_conf::rss_tuple_sets is redundant. Because the enabled RSS tuple in PMD is already managed by the 'types' in struct hns3_rss_conf::conf. This patch removes this redundant variable. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_flow.c | 6 ++---- drivers/net/hns3/hns3_rss.c | 12 ++++-------- drivers/net/hns3/hns3_rss.h | 5 +---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 34fcc3b49e..ea88deca32 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1399,5 +1399,5 @@ hns3_disable_rss(struct hns3_hw *hw) int ret; - ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0); + ret = hns3_set_rss_tuple_by_rss_hf(hw, 0); if (ret) return ret; @@ -1449,5 +1449,4 @@ static int hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) { - struct hns3_rss_tuple_cfg *tuple; int ret; @@ -1465,6 +1464,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) hw->rss_info.conf.func = rss_config->func; - tuple = &hw->rss_info.rss_tuple_sets; - ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types); + ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types); if (ret) hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret); diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 4b2c24ace4..e149c16bfe 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -311,6 +311,5 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) int -hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, - struct hns3_rss_tuple_cfg *tuple, uint64_t rss_hf) +hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) { struct hns3_rss_input_tuple_cmd *req; @@ -357,5 +356,4 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, } - tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field); /* Update supported flow types when set tuple success */ hw->rss_info.conf.types = rss_hf; @@ -378,5 +376,4 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, { struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets; uint64_t rss_hf_bk = hw->rss_info.conf.types; uint8_t key_len = rss_conf->rss_key_len; @@ -395,5 +392,5 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, rte_spinlock_lock(&hw->lock); - ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf); + ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_hf); if (ret) goto set_tuple_fail; @@ -409,5 +406,5 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, set_algo_key_fail: - (void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk); + (void)hns3_set_rss_tuple_by_rss_hf(hw, rss_hf_bk); set_tuple_fail: rte_spinlock_unlock(&hw->lock); @@ -700,6 +697,5 @@ hns3_config_rss(struct hns3_adapter *hns) rss_hf = 0; - return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, - rss_hf); + return hns3_set_rss_tuple_by_rss_hf(hw, rss_hf); } diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index c4121207aa..55d5718ffc 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -44,5 +44,4 @@ struct hns3_rss_conf { uint8_t hash_algo; /* hash function type defined by hardware */ uint8_t key[HNS3_RSS_KEY_SIZE]; /* Hash key */ - struct hns3_rss_tuple_cfg rss_tuple_sets; uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX]; uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */ @@ -108,7 +107,5 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw); int hns3_config_rss(struct hns3_adapter *hns); void hns3_rss_uninit(struct hns3_adapter *hns); -int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, - struct hns3_rss_tuple_cfg *tuple, - uint64_t rss_hf); +int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key); int hns3_restore_rss_filter(struct rte_eth_dev *dev); -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-25 17:26:59.185011373 +0100 +++ 0025-net-hns3-remove-redundant-RSS-tuple-field.patch 2022-05-25 17:26:58.580828351 +0100 @@ -1 +1 @@ -From bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e Mon Sep 17 00:00:00 2001 +From 0cec1c94778a9dccf1e84b44145d08d45d06ee6c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index feabac9f41..317f91fc71 100644 +index 34fcc3b49e..ea88deca32 100644 @@ -26 +27 @@ -@@ -1447,5 +1447,5 @@ hns3_disable_rss(struct hns3_hw *hw) +@@ -1399,5 +1399,5 @@ hns3_disable_rss(struct hns3_hw *hw) @@ -33 +34 @@ -@@ -1497,5 +1497,4 @@ static int +@@ -1449,5 +1449,4 @@ static int @@ -39 +40 @@ -@@ -1513,6 +1512,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) +@@ -1465,6 +1464,5 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)