From: netdev-bot+sashiko@kernel.org
To: houminxi@gmail.com
Cc: netdev@vger.kernel.org, aconole@redhat.com, echaudro@redhat.com,
i.maximets@ovn.org, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
shuah@kernel.org, linux-kselftest@vger.kernel.org,
stable@vger.kernel.org, matttbe@kernel.org
Subject: Re: [PATCH net v5 2/2] selftests/net/openvswitch: check that a failed set keeps the features
Date: Sun, 22 Nov 2026 07:29:41 +0000 [thread overview]
Message-ID: <179533258159.3135.906610390890565632@kernel.org> (raw)
In-Reply-To: <20261118065435.2367014-3-houminxi@gmail.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] The Reported-by trailer probably does not belong on this commit.
- [Low] A comment in the new set-dp branch of main() in ovs-dpctl.py says
something the kernel does not do.
--
selftests/net/openvswitch: check that a failed set keeps the features
This adds a set-dp subcommand to ovs-dpctl.py that sends OVS_DP_CMD_SET.
It also adds two selftests, dp_features and dp_features_recirc. They check
that a set rejected for an empty per-cpu-pids leaves the datapath features
unchanged. The config fragment also enables NET_SCHED, NET_CLS_ACT and
NET_TC_SKB_EXT for the recirc test.
Link: https://lore.kernel.org/netdev/998d522f-e61d-420f-9834-6bdcbaab1361@kernel.org/
> Reported-by: Matthieu Baerts <matttbe@kernel.org>
> Link: https://lore.kernel.org/netdev/998d522f-e61d-420f-9834-6bdcbaab1361@kernel.org/
[Severity: Low]
Does this Reported-by belong on this commit? The commit adds the set-dp
subcommand, the two new tests and three config lines. It doesn't fix an
existing defect.
The kernel bug these tests cover is fixed in the parent commit "net:
openvswitch: do not record user features when the change fails". That
commit has no Reported-by.
The commit message describes two problems:
- a run that hangs when stdout is duplicated
- a FAIL with no reason when the reason only goes to debug.log
Neither can happen with the baseline openvswitch.sh, because the
dp_features tests don't exist there yet. The report was probably about an
earlier, unmerged revision of this patch. The linked message couldn't be
checked from the tree.
Documentation/process/submitting-patches.rst says the tag "is intended for
bugs". Could feedback on an earlier revision be credited in the changelog
below the --- line instead? If Matthieu reported the kernel bug, the tag
could go on the kernel fix.
> diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> index 1615843c225e4..efad71649a630 100644
> --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
[ ... ]
> @@ -2961,6 +2980,23 @@ def main(argv):
[ ... ]
> + setdpcmd.add_argument(
> + "-p",
> + "--per-cpu-pids",
> + type=str,
> + default=None,
> + help="Comma separated upcall pids, an empty string sends none",
> + )
[ ... ]
> @@ -3057,6 +3093,35 @@ def main(argv):
> ovspk.upcall_handler(ovsflow)
> elif hasattr(args, "deldp"):
> ovsdp.destroy(args.deldp)
> + elif hasattr(args, "setdp"):
> + rep = ovsdp.info(args.setdp, 0)
> + if rep is None:
> + print(f"DP '{args.setdp}' not found.")
> + return 1
> + pids = None
> + if args.per_cpu_pids is not None:
> + # Empty entries are typos in a list the user did write, so drop
> + # them. An empty string leaves pids as [] and not None, which
> + # set() sends as an attribute with no payload: the kernel refuses
> + # that with EINVAL, and the selftest counts on the refusal.
[Severity: Low]
Is this comment accurate? The kernel only looks at OVS_DP_ATTR_PER_CPU_PIDS
when the requested features include OVS_DP_F_DISPATCH_UPCALL_PER_CPU:
net/openvswitch/datapath.c:ovs_dp_change() {
...
if (user_features & OVS_DP_F_DISPATCH_UPCALL_PER_CPU &&
a[OVS_DP_ATTR_PER_CPU_PIDS]) {
/* Upcall Netlink Port IDs have been updated */
err = ovs_dp_set_upcall_portids(dp,
a[OVS_DP_ATTR_PER_CPU_PIDS]);
...
}
The !nla_len(ids) check that returns -EINVAL is inside
ovs_dp_set_upcall_portids(), so it only runs on this path.
datapath_policy[] has no entry for OVS_DP_ATTR_PER_CPU_PIDS.
That means set-dp <dp> --per-cpu-pids "" gets an ACK when --features lacks
bit 0x8. It also gets an ACK when --features is left out and the datapath
doesn't report 0x8. In both cases the tool prints "DP '...' updated" and
exits 0, not 22.
Both current tests pass --features 8, so they do get EINVAL. Could the
comment say that the refusal depends on the dispatch bit?
The --per-cpu-pids help text "an empty string sends none" has a similar
problem. An empty attribute is still sent, so the text reads as if no
attribute were sent.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118065435.2367014-1-houminxi%40gmail.com
prev parent reply other threads:[~2026-11-22 7:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 6:54 [PATCH net v5 0/2] net: openvswitch: fix a feature leak on a failed change Minxi Hou
2026-11-18 6:54 ` [PATCH net v5 1/2] net: openvswitch: do not record user features when the change fails Minxi Hou
2026-11-22 7:29 ` netdev-bot+sashiko
2026-11-18 6:54 ` [PATCH net v5 2/2] selftests/net/openvswitch: check that a failed set keeps the features Minxi Hou
2026-11-18 9:45 ` Matthieu Baerts
2026-11-18 11:12 ` Minxi Hou
2026-11-22 7:29 ` netdev-bot+sashiko [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=179533258159.3135.906610390890565632@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=houminxi@gmail.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
/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