From: Alex Vesker <valex@nvidia.com>
To: <valex@nvidia.com>, <viacheslavo@nvidia.com>,
<thomas@monjalon.net>, <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>
Subject: [PATCH] net/mlx5/hws: fix possible action setter segmenation fault
Date: Mon, 7 Nov 2022 11:59:48 +0200 [thread overview]
Message-ID: <20221107095948.15177-1-valex@nvidia.com> (raw)
In-Reply-To: <20221103125108.7203-1-valex@nvidia.com>
When the maximum action combination in RX is used we can get
a segfault due to an incorrecrt max array size define.
This bug can happen on RX/TX or FDB in the most complex
cases.
Current max was set to 7, but actual max is:
Max TX: 8, Max RX: 10, Max FDB: 9
Fixes: f8c8a6d ("net/mlx5/hws: add action object")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h
index 3b31ffc90e..9a4827481a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.h
+++ b/drivers/net/mlx5/hws/mlx5dr_action.h
@@ -6,7 +6,7 @@
#define MLX5DR_ACTION_H_
/* Max number of STEs needed for a rule (including match) */
-#define MLX5DR_ACTION_MAX_STE 7
+#define MLX5DR_ACTION_MAX_STE 10
enum mlx5dr_action_stc_idx {
MLX5DR_ACTION_STC_IDX_CTRL = 0,
--
2.18.1
next prev parent reply other threads:[~2022-11-07 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 12:51 Alex Vesker
2022-11-07 9:59 ` Alex Vesker [this message]
2022-11-07 10:18 ` [PATCH v2] " Alex Vesker
2022-11-08 8:59 ` Raslan Darawsheh
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=20221107095948.15177-1-valex@nvidia.com \
--to=valex@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--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).