Skip to contentSkip to conversation

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

PATCH In review Alexander Kozyrev 3 participants 3 messages Jun 28, 2023 – Jul 18, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +1 -2
index b5137a822a..2cf9e6ef3a 100644
@@ -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;
 	}
Signature · 1 line
2.18.2
Acked-by on v1 1/1
#1 lore raw

Hi Alexander,

Quoted 30 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
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")
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +1 -2
index b5137a822a..2cf9e6ef3a 100644
@@ -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;
Quoted 3 lines

}
--
2.18.2

Best,
Ori

#2 lore raw
In reply to Alexander Kozyrev

Hi,

Quoted 8 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Wednesday, June 28, 2023 3:55 PM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: [PATCH] net/mlx5: fix matcher index in case of insertion by index

Quoted 6 lines

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")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh