Article View: linux.kernel.netdev
Article #20352Re: [PATCH net v5 2/2] selftests/net/openvswitch: check that a failed set keeps the features
From: netdev-bot+sashiko
Date: Sun, 22 Nov 2026 07:29
Date: Sun, 22 Nov 2026 07:29
119 lines
12562 bytes
12562 bytes
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
Technical Details
Message-ID:
<179533258159.3135.906610390890565632@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368596-linux-kernel-netdev=dewy.ruReferences:
<20261118065435.2367014-3-houminxi@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368596-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179533258159.3135.906610390890565632@kernel.org> References: <20261118065435.2367014-3-houminxi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3591991"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fQOS71r3uj5RiMBoMXswQdvpDe4= sha256:eNWJPwriLoxJc+KNQStUVui7bBl+vD0pTFWLO28YJIo= sha1:xf/broy/EyNUh8aB60WmeXIeJhM= sha256:0p9vfp9C4T1lWEDiSVLAlUAiel6U6+gnGAQOIYRi5vA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id BBC3C125D6F; Sun, 22 Nov 2026 10:30:06 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T2FO8kCLy4JQ; Sun, 22 Nov 2026 10:30:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368596-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 9546A125D72; Sun, 22 Nov 2026 10:29:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id CB9AD352EB; Sun, 22 Nov 2026 07:29:45 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795332583; b=P+KZolYdVq12hVGw6sy4t3KrMTzFp/SfHge4IIQtw0h5/nlh33uENsT30xRxlz9mlaKi nC5b8XERmH1v2C7dNNeW3afs1CpgWMH5gw2AbUa4WTpU5BcgvASvFb31Mf1FsI9O3a5Uq DjeEjFvNtDPhRx+0bKV04fXjqlWRG5owpLqNC+5UFzpH5IuTGWRsfMV9QRERmRwmY73XS RFJ122mYTo+Dgodu6c2tWZ5SS/G0j7n7WH3h4JYmY2nZY0Pa2sYm9N4LkDHJF8AsYEDGs lqEwcGuv7Vh/IP+094/uU7j/7XNCU/ErQhcvi+0FNW4t/cByke6BJozlwRxgGn28Nqg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795332583; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=HiA9PYZbAt9pSqWEX/fj1U6pPBAqKzZsNmZT9z0VVZs=; b=igOjnmeieTb/C7XGoTBKAcsIG780GV/hWvjjLTmMojmw980gSEKmXJ/OU4zBhvvtqtJu 7CEqgAbPSI90ur9ddGr84y9QHVeGQ6mpX0+hFGN2owXu8nGrVuPgL5C0CZPe5IMRMCXpP ZtSMPAADdEvSlE267PBovY9cvGmc8fJH2AekVqrAXbd0Muoe86GvYec8walvacoQL6YqY pSm0MsJUzWUlMzzj0dTG1GDvOqM2xmqnVG7TK15j1l4SzZR8uWsMGbHwTxOLgjhyXf/es xg6UQ7r5TjcDbPWAfq/eRa+gGbnMq/MEhKbTO+bibHLrB1FhPYZAwvfj3YDuhFXKL6g== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MRiyKbKO; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7EC1606A684; Sun, 22 Nov 2026 07:29:43 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MRiyKbKO X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795332582; b=CdwcChLk40Vyc4sZ3mlyuyBui+px+57BsgW3CGy3PMkH8Un6UPK5qQa45b+1RXdOF1C7 Sj8x8dEjTFE99gsrUEjdU24rF6Bwbh7A1HC69ObHl9qUr1RZeaLLQ08/Ze73BcxxJ/+va xMssudE5iByen6VYyJhxRPvz0x+3XgRdZbifhYso3Un9vRLya16Q+jJtuo475P4tMtcSn mG/FZfHlg2hP5F8LieR9o0hst0tZO62TkQ9WOHLW/91W24EH7pDD1ARkf0wdj2NuHulLZ HlYVjNBHRNyr7x1BDiLS4SGRmjT+jHFrLyZCCPcVoAowCKdkpnua8DruV1MeGuZNxRw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795332582; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=HiA9PYZbAt9pSqWEX/fj1U6pPBAqKzZsNmZT9z0VVZs=; b=sXLy9q4/wt+N1AZxClYrk4doGvUJuLd0p8k5qKTUXLG0g6Ew4LZZaA4IRX+k20CUYDic 908TnJuAAlkXQ5yWCWGJ71RKTSmtUZnwYJczB5nMBegR74OayI1cVih+HJMi1cquUqGIV LRQ9+yMdnbGi7dtqMB7f3W6GdM26cdq5plE2PlpIENO2MtF8RT+jMQJ1OxJmoyRUHMQE/ aVOMDbELlfpImvi9ZSk2X03N/50v80OLFtU0nbPrrxeY4USlo0KoU64sYItt8TY18061k 7m4G0w4QgM9XJHRpZPT3a4kSylIuTHVFIXO88vGEsPkVHI/dKdgA1jLywOq75/d5U3Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MRiyKbKO; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4361606A339; Sun, 22 Nov 2026 07:29:42 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06D8A1F000C0; Sun, 22 Nov 2026 07:29:41 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795332582; bh=HiA9PYZbAt9pSqWEX/fj1U6pPBAqKzZsNmZT9z0VVZs=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=MRiyKbKO6PQN6irifYg0CjjvrKrfqPk+LTEePHIgOcpSd2Ntwpr69j+XfY6rWMPVG XJzvHvuJf2rChX5yusT6p1/rsGJ8u97Q803jTEVmUaEDkVboBvruXN1M9gE2PKJsxZ U8tyz8da3mH6BbVENKZqz+Bu6dGMdYZ5CMl64V9H7SK0X+JfTRWbq4iEwg0/beslre 9UO7YOuOytQ0lekIbAPp7McbtsBrMG2uqoWbfF+NpC3+jHxkEIV6lGfscckHlf+zdi pEP6qlMC2NEJjvy4oqwa+dtqGRj78eH+t7srb/nWefIhDCgq3gwUyqvSVId5Eu6v2d cqTxqqvKqUfPg== X-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 X-In-Reply-To: <20261118065435.2367014-3-houminxi@gmail.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list