Skip to contentSkip to conversation

net/mlx5: fix non-template API actions template validation

PATCH In review Gregory Etelson 2 participants 2 messages Oct 27, 2024 – Oct 28, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix non-template API actions template validation

HWS actions template validation checks actions parameters in actions masks.
Non-template API does not have actions masks.
Actions templates in the non-template API are artificial and created internally by the PMD.

The patch removes HWS actions template validation in non-template setup.

Fixes 04a4de756e14 ("net/mlx5: support flow age action with HWS")
---
 drivers/net/mlx5/mlx5_flow_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +2 -2
index 5b34154bf1..c9bd9f229b 100644
@@ -7873,8 +7873,8 @@ __flow_hw_actions_template_create(struct rte_eth_dev *dev,
 	uint32_t tmpl_flags = 0;
 	int ret;
 
-	if (mlx5_flow_hw_actions_validate(dev, attr, actions, masks,
-					  &action_flags, error))
+	if (!nt_mode && mlx5_flow_hw_actions_validate(dev, attr, actions, masks,
+						      &action_flags, error))
 		return NULL;
 	for (i = 0; ra[i].type != RTE_FLOW_ACTION_TYPE_END; ++i) {
 		switch (ra[i].type) {
Signature · 1 line
2.43.0
Acked-by Dariusz Sosnowski on v1 1/1
#1 lore raw

Hi,

From: Gregory Etelson <[email protected]>
Sent: Sunday, October 27, 2024 4:36 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; [email protected]; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad; Michael Baum
Subject: [PATCH] net/mlx5: fix non-template API actions template validation

HWS actions template validation checks actions parameters in actions masks.
Non-template API does not have actions masks.
Actions templates in the non-template API are artificial and created internally by the PMD.

The patch removes HWS actions template validation in non-template setup.

Fixes 04a4de756e14 ("net/mlx5: support flow age action with HWS")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh