* [PATCH 0/2] net/hns3: bugfix for hns3 @ 2024-11-07 11:56 Jie Hai 2024-11-07 11:56 ` [PATCH 1/2] net/hns3: fix error code for repeatedly create counter Jie Hai 2024-11-07 11:56 ` [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table Jie Hai 0 siblings, 2 replies; 5+ messages in thread From: Jie Hai @ 2024-11-07 11:56 UTC (permalink / raw) To: dev, thomas, ferruh.yigit; +Cc: lihuisong, fengchengwen, haijie1, huangdengdui This patchset fixes some bugs. Dengdui Huang (2): net/hns3: fix error code for repeatedly create counter net/hns3: fix cannot fully use hardware flow director table drivers/net/hns3/hns3_fdir.c | 1 + drivers/net/hns3/hns3_flow.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.22.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] net/hns3: fix error code for repeatedly create counter 2024-11-07 11:56 [PATCH 0/2] net/hns3: bugfix for hns3 Jie Hai @ 2024-11-07 11:56 ` Jie Hai 2024-11-07 16:21 ` Stephen Hemminger 2024-11-07 11:56 ` [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table Jie Hai 1 sibling, 1 reply; 5+ messages in thread From: Jie Hai @ 2024-11-07 11:56 UTC (permalink / raw) To: dev, thomas, ferruh.yigit, Chunsong Feng, Ferruh Yigit, Min Hu (Connor), Chengwen Feng, Hao Chen Cc: lihuisong, haijie1, huangdengdui From: Dengdui Huang <huangdengdui@huawei.com> Return EINVAL instead of ENOSPC when the same counter ID is used for multiple times to create a counter. 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_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 192ffc015e14..266934b45bce 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -286,7 +286,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id, cnt = hns3_counter_lookup(dev, id); if (cnt) { if (!cnt->indirect || cnt->indirect != indirect) - return rte_flow_error_set(error, ENOTSUP, + return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION_CONF, cnt, "Counter id is used, indirect flag not match"); -- 2.22.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] net/hns3: fix error code for repeatedly create counter 2024-11-07 11:56 ` [PATCH 1/2] net/hns3: fix error code for repeatedly create counter Jie Hai @ 2024-11-07 16:21 ` Stephen Hemminger 0 siblings, 0 replies; 5+ messages in thread From: Stephen Hemminger @ 2024-11-07 16:21 UTC (permalink / raw) To: Jie Hai Cc: dev, thomas, ferruh.yigit, Chunsong Feng, Ferruh Yigit, Min Hu (Connor), Chengwen Feng, Hao Chen, lihuisong, huangdengdui On Thu, 7 Nov 2024 19:56:44 +0800 Jie Hai <haijie1@huawei.com> wrote: > From: Dengdui Huang <huangdengdui@huawei.com> > > Return EINVAL instead of ENOSPC when the same counter ID is > used for multiple times to create a counter. > > 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> Not sure that actual error number matters that much, but looks good to me. Another alternative might be EEXIST which is the error code used when creat() is called on an existing file. Acked-by: Stephen Hemminger <stephen@networkplumber.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table 2024-11-07 11:56 [PATCH 0/2] net/hns3: bugfix for hns3 Jie Hai 2024-11-07 11:56 ` [PATCH 1/2] net/hns3: fix error code for repeatedly create counter Jie Hai @ 2024-11-07 11:56 ` Jie Hai 2024-11-07 16:21 ` Stephen Hemminger 1 sibling, 1 reply; 5+ messages in thread From: Jie Hai @ 2024-11-07 11:56 UTC (permalink / raw) To: dev, thomas, ferruh.yigit, Chengwen Feng, Wei Hu (Xavier), Chunsong Feng, Huisong Li, Min Hu (Connor) Cc: haijie1, huangdengdui 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(+) 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; -- 2.22.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table 2024-11-07 11:56 ` [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table Jie Hai @ 2024-11-07 16:21 ` Stephen Hemminger 0 siblings, 0 replies; 5+ messages in thread From: Stephen Hemminger @ 2024-11-07 16:21 UTC (permalink / raw) To: Jie Hai Cc: dev, thomas, ferruh.yigit, Chengwen Feng, Wei Hu (Xavier), Chunsong Feng, Huisong Li, Min Hu (Connor), huangdengdui 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> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-07 16:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-07 11:56 [PATCH 0/2] net/hns3: bugfix for hns3 Jie Hai 2024-11-07 11:56 ` [PATCH 1/2] net/hns3: fix error code for repeatedly create counter Jie Hai 2024-11-07 16:21 ` Stephen Hemminger 2024-11-07 11:56 ` [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table Jie Hai 2024-11-07 16:21 ` Stephen Hemminger
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).