patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 22.11] net/mlx5: fix testpmd crash by action template
@ 2023-03-06  9:15 Rongwei Liu
  2023-03-06 10:55 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Rongwei Liu @ 2023-03-06  9:15 UTC (permalink / raw)
  To: matan, viacheslavo, orika, thomas, Suanming Mou; +Cc: stable, rasland

When action template creation fails the testpmd expects error
details.
The driver did not set the error structure and testpmd failed with a
segmentation fault.

Fixes: 836b5c9b5e0e ("net/mlx5: add action template management")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index b4a80f977f..9e5f263ccf 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4946,6 +4950,9 @@ flow_hw_actions_template_create(struct rte_eth_dev *dev,
 			mlx5dr_action_template_destroy(at->tmpl);
 		mlx5_free(at);
 	}
+	rte_flow_error_set(error, rte_errno,
+			   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+			   "Failed to create action template");
 	return NULL;
 }
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-08 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  9:15 [PATCH 22.11] net/mlx5: fix testpmd crash by action template Rongwei Liu
2023-03-06 10:55 ` Thomas Monjalon
2023-03-06 11:04   ` [PATCH 22.11] net/mlx5: fix crash on action template failure Rongwei Liu
2023-04-08 13:31     ` Xueming(Steven) Li

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