DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Subject: [PATCH v2 05/11] net/hns3: remove duplicate definition
Date: Wed, 1 Jun 2022 11:52:45 +0800	[thread overview]
Message-ID: <20220601035251.16408-6-humin29@huawei.com> (raw)
In-Reply-To: <20220601035251.16408-1-humin29@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

The default hash key array is defined twice. Let's remove the extra one.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 9 ---------
 drivers/net/hns3/hns3_rss.c  | 6 ++----
 drivers/net/hns3/hns3_rss.h  | 2 ++
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 86ebbf69b6..ca9edc5244 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -10,15 +10,6 @@
 #include "hns3_logs.h"
 #include "hns3_flow.h"
 
-/* Default default keys */
-static uint8_t hns3_hash_key[] = {
-	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
-	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
-	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
-	0x77, 0xCB, 0x2D, 0xA3, 0x80, 0x30, 0xF2, 0x0C,
-	0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA
-};
-
 static const uint8_t full_mask[VNI_OR_TNI_LEN] = { 0xFF, 0xFF, 0xFF };
 static const uint8_t zero_mask[VNI_OR_TNI_LEN] = { 0x00, 0x00, 0x00 };
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 4c546c9363..1003daf03e 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -9,10 +9,8 @@
 #include "hns3_ethdev.h"
 #include "hns3_logs.h"
 
-/*
- * The hash key used for rss initialization.
- */
-static const uint8_t hns3_hash_key[] = {
+/* Default hash keys */
+const uint8_t hns3_hash_key[] = {
 	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
 	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
 	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 55d5718ffc..56627cbd4c 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -88,6 +88,8 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)
 	return 1UL << fls(x - 1);
 }
 
+extern const uint8_t hns3_hash_key[];
+
 struct hns3_adapter;
 
 int hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
-- 
2.33.0


  parent reply	other threads:[~2022-06-01  3:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 12:29 [PATCH 00/12] bugfix for hns3 PMD Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 01/12] net/hns3: fix spelling errors Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 02/12] net/hns3: add check for deferred start queue when rollback Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 03/12] net/hns3: remove redundant parentheses Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 04/12] net/hns3: adjust the data type of some variables Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 05/12] net/hns3: fix an unreasonable memset Min Hu (Connor)
2022-05-20  7:58   ` Andrew Rybchenko
2022-05-20  8:37     ` Min Hu (Connor)
2022-05-20  8:59       ` Andrew Rybchenko
2022-05-20  9:14         ` Min Hu (Connor)
2022-05-20 10:43           ` Ferruh Yigit
2022-05-20 11:00             ` Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 06/12] net/hns3: remove duplicate definition Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 07/12] net/hns3: fix coverity codecheck Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 08/12] net/hns3: fix return value for unsupported tuple Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 09/12] net/hns3: modify a function name Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 10/12] net/hns3: unify the code wrap style Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 11/12] net/hns3: fix a segfault from secondary process Min Hu (Connor)
2022-05-19 12:29 ` [PATCH 12/12] net/hns3: fix TM capability incorrectly defined Min Hu (Connor)
2022-05-31 14:55 ` [PATCH 00/12] bugfix for hns3 PMD Andrew Rybchenko
2022-06-01  3:54   ` Min Hu (Connor)
2022-06-01  3:52 ` [PATCH v2 00/11] " Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 01/11] net/hns3: add check for deferred start queue when rollback Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 02/11] net/hns3: remove redundant parentheses Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 03/11] net/hns3: adjust the data type of some variables Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 04/11] net/hns3: fix an unreasonable memset Min Hu (Connor)
2022-06-01  3:52   ` Min Hu (Connor) [this message]
2022-06-01  3:52   ` [PATCH v2 06/11] net/hns3: fix coverity codecheck Min Hu (Connor)
2022-06-01  8:32     ` Andrew Rybchenko
2022-06-06  7:48       ` Dongdong Liu
2022-06-08 11:19         ` Andrew Rybchenko
2022-06-08 12:04           ` Dongdong Liu
2022-06-01  3:52   ` [PATCH v2 07/11] net/hns3: fix return value for unsupported tuple Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 08/11] net/hns3: modify a function name Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 09/11] net/hns3: unify the code wrap style Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 10/11] net/hns3: fix a segfault from secondary process Min Hu (Connor)
2022-06-01  3:52   ` [PATCH v2 11/11] net/hns3: fix TM capability incorrectly defined Min Hu (Connor)
2022-06-09 10:57   ` [PATCH v2 00/11] bugfix for hns3 PMD Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220601035251.16408-6-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).