From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Huichao Cai <chcchc88@163.com>,
"konstantin.v.ananyev@yandex.ru" <konstantin.v.ananyev@yandex.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] acl: fix the value of the trans table
Date: Fri, 25 Jul 2025 11:03:34 +0000 [thread overview]
Message-ID: <272ed4f83fae4b4a8659aa5e5c01a74a@huawei.com> (raw)
In-Reply-To: <20250725102151.6677-1-chcchc88@163.com>
Hi
> The node_array[RTE_ACL_DFA_SIZE] is assigned to
> RTE_ACL_IDLE_NODE and is used as a node of
> RTE_ACL_NODE_SINGLE type, but it is currently based
> on the implementation of idle arrays with a value of all
> 0 to point to itself, which is unsafe, if the value of the
> idle array is not 0, it will produce undefined behavior,
> so it needs to be given node_array[RTE_ACL_DFA_ SIZE]
> plus RTE_ACL_QUAD_SINGLE.
Not sure I understand what is the problem you are trying to fix?
Any test-case which can demonstrate the failure?
> Signed-off-by: Huichao Cai <chcchc88@163.com>
> ---
> lib/acl/acl_gen.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/acl/acl_gen.c b/lib/acl/acl_gen.c
> index 3c53d24056..95c7888162 100644
> --- a/lib/acl/acl_gen.c
> +++ b/lib/acl/acl_gen.c
> @@ -497,7 +497,7 @@ rte_acl_gen(struct rte_acl_ctx *ctx, struct rte_acl_trie *trie,
> * highest index, that points to itself)
> */
>
> - node_array[RTE_ACL_DFA_SIZE] = RTE_ACL_IDLE_NODE;
> + node_array[RTE_ACL_DFA_SIZE] = RTE_ACL_QUAD_SINGLE | RTE_ACL_IDLE_NODE;
>
> for (n = 0; n < RTE_ACL_DFA_SIZE; n++)
> node_array[n] = no_match;
> --
> 2.27.0
prev parent reply other threads:[~2025-07-25 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 10:21 Huichao Cai
2025-07-25 11:03 ` Konstantin Ananyev [this message]
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=272ed4f83fae4b4a8659aa5e5c01a74a@huawei.com \
--to=konstantin.ananyev@huawei.com \
--cc=chcchc88@163.com \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
/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).