From: netdev-bot+sashiko@kernel.org
To: houminxi@gmail.com
Cc: netdev@vger.kernel.org, donald.hunter@gmail.com, kuba@kernel.org,
davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
horms@kernel.org, aconole@redhat.com, echaudro@redhat.com,
i.maximets@ovn.org, dev@openvswitch.org
Subject: Re: [PATCH net-next v7 1/2] netlink: specs: add ovs_flow del and set operations
Date: Thu, 12 Nov 2026 02:02:25 +0000 [thread overview]
Message-ID: <179444894546.2199510.2728310247051508293@kernel.org> (raw)
In-Reply-To: <20261110174751.973464-2-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 new OVS_FLOW_ATTR_UFID doc in
include/uapi/linux/openvswitch.h (lines 669-671) and in…
- [Low] The patch changes the docs for key, actions, stats, tcp-flags and
used from 'present in notifications' to 'present in replies and…
--
netlink: specs: add ovs_flow del and set operations
This commit adds the del and set operations to the ovs_flow YNL spec and
gives dump its own request list. It also changes probe to a flag and adds
used and tcp-flags to the get reply. The attribute docs are reworded in
both the spec and include/uapi/linux/openvswitch.h.
> diff --git a/Documentation/netlink/specs/ovs_flow.yaml b/Documentation/netlink/specs/ovs_flow.yaml
> index 951837b72e1d2..d7aeeeb5a3cc5 100644
> --- a/Documentation/netlink/specs/ovs_flow.yaml
> +++ b/Documentation/netlink/specs/ovs_flow.yaml
[ ... ]
> @@ -438,18 +447,22 @@ attribute-sets:
[ ... ]
> -
> name: ufid
> type: binary
> + checks:
> + min-len: 1
> doc: |
> A value between 1-16 octets specifying a unique identifier for the
> flow. Causes the flow to be indexed by this value rather than the
> - value of the OVS_FLOW_ATTR_KEY attribute. Optional for all
> - requests. Present in notifications if the flow was created with this
> - attribute.
> + value of the OVS_FLOW_ATTR_KEY attribute. A value longer than 16
> + octets is treated as if the attribute were absent, so a new flow is
> + indexed by its key. A zero-length value is rejected with -ERANGE.
> + Optional for all requests. Present in notifications if the flow was
> + created with this attribute. A dump does not read it.
[Severity: Low]
Is "A dump does not read it" accurate when it sits next to the -ERANGE
sentence? The commit message goes further:
"A dump does not read the attribute at all."
ovs_flow_cmd_dump() still parses every attribute against flow_policy:
net/openvswitch/datapath.c:ovs_flow_cmd_dump() {
...
err = genlmsg_parse_deprecated(cb->nlh, &dp_flow_genl_family, a,
OVS_FLOW_ATTR_MAX, flow_policy, NULL);
if (err)
return err;
...
}
and flow_policy has:
[OVS_FLOW_ATTR_UFID] = { .type = NLA_UNSPEC, .len = 1 },
In validate_nla(), the NLA_UNSPEC length check fails with -ERANGE, so a dump
request that carries a zero-length OVS_FLOW_ATTR_UFID is rejected the same
way a do request is. The dump never uses the ufid value, but it does
validate the attribute.
Could the wording say that a dump ignores the value but still rejects a
zero-length ufid? The same sentence is in the OVS_FLOW_ATTR_UFID kernel-doc
in include/uapi/linux/openvswitch.h.
[ ... ]
> diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
> index 440825e658371..3f18f59e91dc2 100644
> --- a/include/uapi/linux/openvswitch.h
> +++ b/include/uapi/linux/openvswitch.h
[ ... ]
> @@ -655,9 +664,11 @@ struct ovs_nsh_key_md1 {
> * should be suppressed.
> * @OVS_FLOW_ATTR_UFID: A value between 1-16 octets specifying a unique
> * identifier for the flow. Causes the flow to be indexed by this value rather
> - * than the value of the %OVS_FLOW_ATTR_KEY attribute. Optional for all
> + * than the value of the %OVS_FLOW_ATTR_KEY attribute. A value longer than 16
> + * octets is treated as if the attribute were absent, so a new flow is indexed
> + * by its key. A zero-length value is rejected with -ERANGE. Optional for all
> * requests. Present in notifications if the flow was created with this
> - * attribute.
> + * attribute. A dump does not read it.
[Severity: Low]
This patch changes key, actions, stats, tcp-flags and used from "present in
notifications" to "present in replies and notifications". This paragraph is
edited too, but it keeps "Present in notifications if the flow was created
with this attribute". Should it also say replies?
ovs_flow_cmd_fill_info() calls ovs_nla_put_identifier() unconditionally:
net/openvswitch/datapath.c:ovs_flow_cmd_fill_info() {
...
err = ovs_nla_put_identifier(flow, skb);
if (err)
goto error;
...
}
and for a flow identified by a ufid, that emits OVS_FLOW_ATTR_UFID:
net/openvswitch/flow_netlink.c:ovs_nla_put_identifier() {
if (ovs_identifier_is_ufid(&flow->id))
return nla_put(skb, OVS_FLOW_ATTR_UFID, flow->id.ufid_len,
flow->id.ufid);
...
}
fill_info() builds get replies and every dump entry, so the ufid shows up in
those replies as well as in notifications.
The spec now also disagrees with itself: the &flow-get-reply list includes
ufid, but the ufid doc in ovs_flow.yaml has the same notification-only
sentence.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110174751.973464-1-houminxi%40gmail.com
next prev parent reply other threads:[~2026-11-12 2:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 17:47 [PATCH net-next v7 0/2] netlink: specs: fill in the missing ovs operations Minxi Hou
2026-11-10 17:47 ` [PATCH net-next v7 1/2] netlink: specs: add ovs_flow del and set operations Minxi Hou
2026-11-12 2:02 ` netdev-bot+sashiko [this message]
2026-11-12 2:05 ` Jakub Kicinski
2026-11-10 17:47 ` [PATCH net-next v7 2/2] netlink: specs: add ovs datapath and vport " Minxi Hou
2026-11-12 2:02 ` netdev-bot+sashiko
2026-11-12 2:03 ` Jakub Kicinski
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=179444894546.2199510.2728310247051508293@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=donald.hunter@gmail.com \
--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=netdev@vger.kernel.org \
--cc=pabeni@redhat.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