[2/2] net/hns3: fix cannot fully use hardware flow director table

Message ID 20241107115645.22617-3-haijie1@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/hns3: bugfix for hns3 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Jie Hai Nov. 7, 2024, 11:56 a.m. UTC
From: Dengdui Huang <huangdengdui@huawei.com>

The hns3 driver checks whether the flow rule is repeatedly inserted based
on rte_hash. Currently, the rte_hash extendable bucket table feature is not
enabled. When there are many hash conflicts, the hash table space cannot be
fully used. So the flow rule maybe cannot be inserted even if the hardware
flow director table there are still free. This patch fix it by enabling the
rte_hash extensible bucket table feature.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Stephen Hemminger Nov. 7, 2024, 4:21 p.m. UTC | #1
On Thu, 7 Nov 2024 19:56:45 +0800
Jie Hai <haijie1@huawei.com> wrote:

> From: Dengdui Huang <huangdengdui@huawei.com>
> 
> The hns3 driver checks whether the flow rule is repeatedly inserted based
> on rte_hash. Currently, the rte_hash extendable bucket table feature is not
> enabled. When there are many hash conflicts, the hash table space cannot be
> fully used. So the flow rule maybe cannot be inserted even if the hardware
> flow director table there are still free. This patch fix it by enabling the
> rte_hash extensible bucket table feature.
> 
> Fixes: fcba820d9b9e ("net/hns3: support flow director")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> ---


Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  

Patch

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index d18d08353565..aacad40e6174 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -900,6 +900,7 @@  int hns3_fdir_filter_init(struct hns3_adapter *hns)
 		.key_len = sizeof(struct hns3_fdir_key_conf),
 		.hash_func = rte_hash_crc,
 		.hash_func_init_val = 0,
+		.extra_flag = RTE_HASH_EXTRA_FLAGS_EXT_TABLE,
 	};
 	int ret;