From: netdev-bot+sashiko@kernel.org
To: toddfreed@meta.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
andrew+netdev@lunn.ch, bjorn@kernel.org, bpf@vger.kernel.org,
daniel@iogearbox.net, daniel.zahka@gmail.com,
donald.hunter@gmail.com, edumazet@kernel.org, kuba@kernel.org,
jhs@mojatatu.com, jiri@resnulli.us, john.fastabend@gmail.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org,
martin.lau@linux.dev, pabeni@redhat.com, saeedm@nvidia.com,
horms@kernel.org, tariqt@nvidia.com, weiwan@google.com,
willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH net-next v1 14/15] selftests: tc-testing: add tests for the psp action
Date: Sun, 15 Nov 2026 03:18:29 +0000 [thread overview]
Message-ID: <179471270988.2199510.16269189548996714226@kernel.org> (raw)
In-Reply-To: <20261111005533.6436-15-toddfreed@meta.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Tests 2d50 ("Add psp action without encap or decap"), cab5 ("Add
psp encap action without assoc, with index") and 0c17 ("Reject psp…
- [Low] Tests a744 ("Add flower psp_spi filter with psp decap") and 4e1f
("Add flower psp_spi, psp_ver and psp_dev filter with psp decap") in…
--
selftests: tc-testing: add tests for the psp action
This adds tdc tests for the psp tc action. They add, replace, delete and
flush decap actions, and check that invalid encap/decap configurations are
rejected. It also adds flower filter tests for psp_spi, psp_ver and
psp_dev, and enables CONFIG_INET_PSP and CONFIG_NET_ACT_PSP in the
tc-testing config.
> diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/psp.json b/tools/testing/selftests/tc-testing/tc-tests/actions/psp.json
> new file mode 100644
> index 0000000000000..990e8bd1ce9a0
> --- /dev/null
> +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/psp.json
> @@ -0,0 +1,459 @@
[ ... ]
> + {
> + "id": "2d50",
> + "name": "Add psp action without encap or decap",
[ ... ]
> + "cmdUnderTest": "$TC actions add action psp index 12",
> + "expExitCode": "255",
> + "verifyCmd": "$TC actions list action psp",
> + "matchPattern": "action order [0-9]+: psp",
> + "matchCount": "0",
[Severity: Low]
Does this test reach the kernel check it is named after?
The test passes if the command exits with 255 and no psp action is listed
afterwards. tc actions add also exits with 255 when tc's own parser refuses
the arguments, before any netlink request is sent. In iproute2,
tc_action_modify() returns -1 for a parse_action() failure and for an
rtnl_talk() failure alike.
If the psp parser in tc requires encap or decap, this test would pass
without ever reaching this check:
net/sched/act_psp.c:tcf_psp_init() {
...
if (NL_REQ_ATTR_CHECK(extack, nla, tb, TCA_PSP_ACTION)) {
NL_SET_ERR_MSG(extack, "Missing PSP action, encap or decap");
...
}
The same question applies to two other tests:
- cab5 ("Add psp encap action without assoc, with index") and the
"Missing PSP association ID" check in the encap case.
- 0c17 ("Reject psp decap action with an assoc") and the "decap takes no
PSP association" check in the decap case.
In each case the test would still pass if the kernel branch were removed.
The flower tests b58d and 2f96 avoid this by expecting exit code 2.
tc filter add returns 2 only on an rtnl_talk() error and returns 1 on a
parse failure. The action tests have no such check.
Would it make sense to match the extack text instead? For example, a
verifyCmd could rerun the command with stderr captured and grep for the
kernel message.
[ ... ]
> + {
> + "id": "a744",
> + "name": "Add flower psp_spi filter with psp decap",
[ ... ]
> + "dependsOn": "$TC filter add flower help 2>&1 | grep -q psp_spi",
[ ... ]
> + "cmdUnderTest": "$TC filter add dev $DEV1 ingress protocol ip pref 1 flower psp_spi 0x1234 action psp decap",
> + "expExitCode": "0",
[Severity: Low]
Should this dependsOn also check for the psp action?
The command uses "action psp decap", but the probe only checks that flower
knows psp_spi. The action tests earlier in this file probe for the action
like this:
$TC actions add action psp help 2>&1 | grep -q decap
run_one_test() in tdc.py uses only the probe's return code to decide
whether to skip a test. Suppose tc has the flower psp_* keys but not the
psp action. This test would then run instead of being skipped. tc would
fall back to its noact parser, reject the action, and the test would be
reported as a failure.
The commit message says:
The tests need a tc with the psp action and the flower psp_* keys; they
skip without it (dependsOn).
Test 4e1f ("Add flower psp_spi, psp_ver and psp_dev filter with psp decap")
has the same issue.
Could both probes be chained with && for these two tests?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111005533.6436-1-toddfreed%40meta.com
next prev parent reply other threads:[~2026-11-15 3:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 0:55 [PATCH net-next v1 00/15] psp: introduce socket-less associations Todd Freed
2026-11-11 0:55 ` [PATCH net-next v1 01/15] psp: get netns from net_device instead of sock Todd Freed
2026-11-11 0:55 ` [PATCH net-next v1 02/15] psp: take the psp nexthdr from the packet on encap Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 03/15] psp: declare psp_assoc_set_tx() in psp.h Todd Freed
2026-11-11 0:55 ` [PATCH net-next v1 04/15] psp: add support for socket-less psp associations Todd Freed
2026-11-11 16:49 ` Daniel Zahka
2026-11-11 18:23 ` Todd Bert Freed
2026-11-11 19:01 ` Daniel Zahka
2026-11-11 21:49 ` Todd Bert Freed
2026-11-12 0:51 ` Todd Bert Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 05/15] net: add METADATA_PSP dst to carry a psp association on an skb Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 06/15] net/sched: act_mirred: don't send decrypted skbs from egress to ingress Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 07/15] bpf: don't redirect " Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 08/15] psp: only give time-wait sockets of psp connections a validator Todd Freed
2026-11-11 11:37 ` Daniel Zahka
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 09/15] net/sched: add act_psp for psp transport mode Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 10/15] net/sched: flower: add psp_spi, psp_ver, and psp_dev matches Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 11/15] selftests: drv-net: psp: test socket-less associations and the tc psp action Todd Freed
2026-11-11 0:55 ` [PATCH net-next v1 12/15] selftests: drv-net: psp: test that software encap on ingress drops Todd Freed
2026-11-11 0:55 ` [PATCH net-next v1 13/15] selftests: tc-testing: run dependsOn probes outside the test namespace Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 0:55 ` [PATCH net-next v1 14/15] selftests: tc-testing: add tests for the psp action Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko [this message]
2026-11-11 0:55 ` [PATCH net-next v1 15/15] Documentation: networking: psp: document socket-less associations Todd Freed
2026-11-15 3:18 ` netdev-bot+sashiko
2026-11-11 17:01 ` [PATCH net-next v1 00/15] psp: introduce " Daniel Zahka
2026-11-12 19:35 ` Todd Bert Freed
2026-11-13 15:45 ` Jamal Hadi Salim
2026-11-13 16:21 ` Jamal Hadi Salim
2026-11-13 19:08 ` Todd Bert Freed
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=179471270988.2199510.16269189548996714226@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel.zahka@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=toddfreed@meta.com \
--cc=weiwan@google.com \
--cc=willemdebruijn.kernel@gmail.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
all inboxes | Powered by JetHome®