DPDK patches and discussions
 help / color / mirror / Atom feed
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: Mon, 28 Jul 2025 08:35:35 +0000	[thread overview]
Message-ID: <7ae2883da6e44e3bb6800bb2f1fa4fd0@huawei.com> (raw)
In-Reply-To: <20250728035324.3136-1-chcchc88@163.com>

Hi,


> Hi, Konstantin
> 
> To illustrate this issue, I made the following modifications to the test cases:
> Modify the “test_data” content of the function "test_acl.c: test_build_ports_range":
> delete the second test data, and leave only one test message data. This way, when
> the function "acl_run_scalar.c: rte_acl_classify_scalar" processes the second message
> data, it will use the idle data. Then modify the idle data in the function "acl_run.h:
> acl_start_next_trie" to (to modify the idle, the const attribute was removed):
> parms[n].data = (uint8_t *)idle;
> parms[n].data[0] = 0x04;
> parms[n].data[4] = 0x01;
> When the function "acl_run_scalar.c: scalar_transition" processing this idle message,
> because the ranges are 0 and the message data is not 0(0x01), the message data will
> exceed all ranges. The calculated result x is 4, while the correct result should be 0. The
> following is a comparison of the settlement results of x before and after modification
> (I have printed each line of the calculation results of the function "acl_run_stcalar. c: scalar_translation"):

Sorry, it is a bit too cryptic for me.
Why do you modify the internal ACL tables contents?
If you can, please create a new test-case in  app/test/test_acl.c to demonstrate the issue.
Thanks
Konstantin 

> ==before==:
> Line 87: transition: 0x20000100
> Line 88: ranges: 0x0
> Line 89: index: 0x20000000
> Line 90: addr: 0x100
> Line 91: input: 0x0
> Line 96: c: 0x0
> Line 99: a: 0x80808080
> Line 102: a: 0x80808080
> Line 105: b: 0x0
> Line 108: a: 0x80808080
> Line 111: a: 0x80808080
> Line 114: x: 0x0
> Line 125: addr: 0x100
> 
> ==after==:
> Line 87: transition: 0x20000100
> Line 88: ranges: 0x0
> Line 89: index: 0x20000000
> Line 90: addr: 0x100
> Line 91: input: 0x1
> Line 96: c: 0x1010101
> Line 99: a: 0x80808080
> Line 102: a: 0x7f7f7f7f
> Line 105: b: 0x0
> Line 108: a: 0x0
> Line 111: a: 0x0
> Line 114: x: 0x4
> Line 125: addr: 0x104


      reply	other threads:[~2025-07-28  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 10:21 Huichao Cai
2025-07-25 11:03 ` Konstantin Ananyev
2025-07-28  3:53 ` Huichao Cai
2025-07-28  8:35   ` 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=7ae2883da6e44e3bb6800bb2f1fa4fd0@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).