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@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
shuah@kernel.org, dev@openvswitch.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/4] selftests: openvswitch: add missing docstrings in ovs-dpctl.py
Date: Thu, 10 Sep 2026 17:22:02 +0000 [thread overview]
Message-ID: <178906092280.219967.16432524038911632507@kernel.org> (raw)
In-Reply-To: <20260908171859.1967327-4-houminxi@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 0 · Low: 1
- [Low] The docstring added to print_ovsdp_full()
(tools/testing/selftests/net/openvswitch/ovs-dpctl.py line 2940)…
--
selftests: openvswitch: add missing docstrings in ovs-dpctl.py
This adds one-line docstrings to the module, classes and methods in the
openvswitch selftest helper ovs-dpctl.py to silence pylint C0114, C0115
and C0116. No code behaviour is changed.
> diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> index 502e6eb4c4b4..dc88cb1b20c1 100644
> --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
[ ... ]
> @@ -2887,6 +2973,7 @@ class PsampleEvent(EventSocket):
>
>
> def print_ovsdp_full(dp_lookup_rep, ifindex, ndb=NDB(), vpl=OvsVport()):
> + """Print full datapath state: stats, vports, and flows."""
> dp_name = dp_lookup_rep.get_attr("OVS_DP_ATTR_NAME")
> base_stats = dp_lookup_rep.get_attr("OVS_DP_ATTR_STATS")
> megaflow_stats = dp_lookup_rep.get_attr("OVS_DP_ATTR_MEGAFLOW_STATS")
[Severity: Low]
Does print_ovsdp_full() actually print flows? The body only emits the
datapath name, the values from OVS_DP_ATTR_STATS,
OVS_DP_ATTR_MEGAFLOW_STATS, OVS_DP_ATTR_MASKS_CACHE_SIZE and
OVS_DP_ATTR_USER_FEATURES, then one line per vport:
print(f" flows:{int(base_stats['flows'])}")
...
# port print out
for iface in ndb.interfaces:
rep = vpl.info(iface.ifname, ifindex)
if rep is not None:
print(
f" port {int(rep.get_attr('OVS_VPORT_ATTR_PORT_NO'))}: "
...
The only flow-related output is the flows:<n> counter that comes from
OVS_DP_ATTR_STATS, which is already covered by "stats".
Flow enumeration lives in OvsFlow.dump(), and main() calls that only for
the dump subcommand, not on the show path that reaches
print_ovsdp_full().
Would something like "Print datapath statistics and attached vports." be
a more accurate one-liner here?
The commit message says "Each docstring describes the command or
attribute group the code actually implements", so this one looks like it
overstates the output.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260908171859.1967327-1-houminxi%40gmail.com
next prev parent reply other threads:[~2026-09-10 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 17:18 [PATCH net-next v3 0/4] selftests: openvswitch: pylint cleanup of ovs-dpctl.py Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 1/4] selftests: openvswitch: convert %-formatting to f-strings Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 2/4] selftests: openvswitch: fix misc pylint warnings in ovs-dpctl.py Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 3/4] selftests: openvswitch: add missing docstrings " Minxi Hou
2026-09-10 17:22 ` netdev-bot+sashiko [this message]
2026-09-10 17:44 ` Aaron Conole
2026-09-08 17:18 ` [PATCH net-next v3 4/4] selftests: openvswitch: suppress pylint complexity warnings Minxi Hou
2026-09-10 17:22 ` netdev-bot+sashiko
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=178906092280.219967.16432524038911632507@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=houminxi@gmail.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@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