From: Paolo Abeni <pabeni@redhat.com>
To: Linkui Xiao <xiaolinkui@126.com>,
jhs@mojatatu.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, horms@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Linkui Xiao <xiaolinkui@kylinos.cn>
Subject: Re: [PATCH net-next 3/3] selftests: tc-testing: add gact probability dump tests
Date: Thu, 12 Nov 2026 15:05:07 +0100 [thread overview]
Message-ID: <06c0d36d-3492-4fd6-a6cd-8f328b202baa@redhat.com> (raw)
In-Reply-To: <20261106064114.3592670-4-xiaolinkui@126.com>
On 11/6/26 07:41, Linkui Xiao wrote:
> gact probability attributes are emitted by tcf_gact_dump() only when
> tcfg_ptype is set, and budgeted for by tcf_gact_get_fill_size(). The
> only gact cases that look at a probability today are 8e47 and ca89, and
> both check it through `tc actions list`, which is served by the netlink
> dump machinery and never consumes the get_fill_size() budget. The one
> case that uses `tc actions get`, 525f, runs against an action with no
> probability, so the RTM_GETACTION reply path -- tcf_get_notify(), which
> does size its skb from get_fill_size() -- is never exercised with a
> probability, and the netrand random type is not exercised anywhere.
>
> Add three cases: adding an action with a netrand probability and getting
> it back; replacing a probability-less action with a deterministic one
> and getting it back, covering the tcfg_ptype 0 -> non-zero transition
> that the unconditional TCA_GACT_PROB budget in patch 1 has to cover; and
> getting a probability-less action, whose dump must report no probability.
>
> These are coverage for the dump and sizing paths that nothing tested
> before, not reproducers: RTM_NEWACTION, RTM_DELACTION and RTM_GETACTION
> all take
> rtnl, so sizing and dumping always run in the same critical section
> and a replace cannot interleave between them from userspace. They pass
> both before and after patches 1 and 2.
>
> Verified by running the tdc gact suite (38 cases, including these
> three) against a kernel with CONFIG_GACT_PROB=y and this series
> applied; all passed.
>
> Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn>
I think the value carried by the added tests is too low and new tests
consume nipa resources. Let me apply the first 2 patches without this one
/P
prev parent reply other threads:[~2026-11-12 14:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 6:41 [PATCH net-next 0/3] net/sched: get_fill_size() budget fixes for act_gact and act_vlan Linkui Xiao
2026-11-06 6:41 ` [PATCH net-next 1/3] net/sched: act_gact: size TCA_GACT_PROB unconditionally Linkui Xiao
2026-11-12 14:01 ` Paolo Abeni
2026-11-06 6:41 ` [PATCH net-next 2/3] net/sched: act_vlan: size push_eth in get_fill_size Linkui Xiao
2026-11-06 6:41 ` [PATCH net-next 3/3] selftests: tc-testing: add gact probability dump tests Linkui Xiao
2026-11-12 14:05 ` Paolo Abeni [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=06c0d36d-3492-4fd6-a6cd-8f328b202baa@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiaolinkui@126.com \
--cc=xiaolinkui@kylinos.cn \
/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