net/mlx5: fix matcher index in case of insertion by index

Message ID 20230628125437.1834231-1-akozyrev@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix matcher index in case of insertion by index |

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/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-testing warning Testing issues
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Alexander Kozyrev June 28, 2023, 12:54 p.m. UTC
  There is only one matcher in an index-based template tables.
Pass the 0 as the matcher index, not actions template index.

Fixes: adfa4b1445 ("net/mlx5: add flow rule insertion by index")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Ori Kam July 18, 2023, 9:19 a.m. UTC | #1
Hi Alexander,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Wednesday, June 28, 2023 3:55 PM
> Subject: [PATCH] net/mlx5: fix matcher index in case of insertion by index
> 
> There is only one matcher in an index-based template tables.
> Pass the 0 as the matcher index, not actions template index.
> 
> Fixes: adfa4b1445 ("net/mlx5: add flow rule insertion by index")
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_hw.c
> b/drivers/net/mlx5/mlx5_flow_hw.c
> index b5137a822a..2cf9e6ef3a 100644
> --- a/drivers/net/mlx5/mlx5_flow_hw.c
> +++ b/drivers/net/mlx5/mlx5_flow_hw.c
> @@ -2796,8 +2796,7 @@ flow_hw_async_flow_create_by_index(struct
> rte_eth_dev *dev,
>  	 */
>  	if (flow_hw_actions_construct(dev, job,
>  				      &table->ats[action_template_index],
> -				      action_template_index, actions,
> -				      rule_acts, queue, error)) {
> +				      0, actions, rule_acts, queue, error)) {
>  		rte_errno = EINVAL;
>  		goto free;
>  	}
> --
> 2.18.2

Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
  
Raslan Darawsheh July 18, 2023, 3:02 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Wednesday, June 28, 2023 3:55 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] net/mlx5: fix matcher index in case of insertion by index
> 
> There is only one matcher in an index-based template tables.
> Pass the 0 as the matcher index, not actions template index.
> 
> Fixes: adfa4b1445 ("net/mlx5: add flow rule insertion by index")
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index b5137a822a..2cf9e6ef3a 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -2796,8 +2796,7 @@  flow_hw_async_flow_create_by_index(struct rte_eth_dev *dev,
 	 */
 	if (flow_hw_actions_construct(dev, job,
 				      &table->ats[action_template_index],
-				      action_template_index, actions,
-				      rule_acts, queue, error)) {
+				      0, actions, rule_acts, queue, error)) {
 		rte_errno = EINVAL;
 		goto free;
 	}