From: Dengdui Huang <huangdeng...@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: sta...@dpdk.org Signed-off-by: Dengdui Huang <huangdeng...@huawei.com> Signed-off-by: Jie Hai <haij...@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