Skip to content

Commit

Permalink
net/hns3: remove duplicate definition
Browse files Browse the repository at this point in the history
[ upstream commit d7050da870a9d259a6422e253d54fa552cbfa7c8 ]

The default hash key array is defined twice. Remove the extra one.

Fixes: c37ca66 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
LiHuiSong1 authored and cpaelzer committed Jul 7, 2022
1 parent 530bf55 commit bde6cac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
9 changes: 0 additions & 9 deletions drivers/net/hns3/hns3_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
#include "hns3_ethdev.h"
#include "hns3_logs.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 };

Expand Down
6 changes: 2 additions & 4 deletions drivers/net/hns3/hns3_rss.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,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,
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/hns3/hns3_rss.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,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,
Expand Down

0 comments on commit bde6cac

Please sign in to comment.