From: Rongwei Liu <rongweil@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
<thomas@monjalon.net>, Suanming Mou <suanmingm@nvidia.com>
Cc: <stable@dpdk.org>, <rasland@nvidia.com>
Subject: [PATCH 22.11] net/mlx5: fix crash on action template failure
Date: Mon, 6 Mar 2023 13:04:19 +0200 [thread overview]
Message-ID: <20230306110419.2262250-1-rongweil@nvidia.com> (raw)
In-Reply-To: <32273080.6xKfjbll68@thomas>
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
next prev parent reply other threads:[~2023-03-06 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Rongwei Liu [this message]
2023-04-08 13:31 ` [PATCH 22.11] net/mlx5: fix crash on action template failure Xueming(Steven) Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230306110419.2262250-1-rongweil@nvidia.com \
--to=rongweil@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).