Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] netlink: specs: fill in the missing ovs operations
@ 2026-10-12  6:55 Minxi Hou
  2026-10-12  6:55 ` [PATCH net-next v2 1/2] netlink: specs: add ovs_flow del and set operations Minxi Hou
  2026-10-12  6:55 ` [PATCH net-next v2 2/2] netlink: specs: add ovs datapath and vport " Minxi Hou
  0 siblings, 2 replies; 13+ messages in thread
From: Minxi Hou @ 2026-10-12  6:55 UTC (permalink / raw)
  To: netdev; +Cc: donald.hunter, kuba, davem, edumazet, pabeni, horms

The ovs_flow spec described get and new but not del or set, and the
ovs_datapath and ovs_vport specs had no set. The kernel has registered
all three since the families were added. This series names the
operations and the attributes each handler reads, and marks the write
operations uns-admin-perm.

No kernel code changes. I checked the new operations against a live
kernel with YnlFamily before posting v1.

v2:
  - ovs_flow: probe is a flag, matching the NLA_FLAG policy. It stayed
    binary in v1 because no request listed it.
  - ovs_flow: del lists probe. ovs_flow_cmd_del() reads it to decide
    whether to log.
  - ovs_flow: the set doc says that replacing actions needs a key even
    when a ufid is present. ovs_nla_init_match_and_action() returns
    -EINVAL otherwise.

  v1: https://lore.kernel.org/netdev/20261006130533.1620706-1-houminxi@gmail.com/

Minxi Hou (2):
  netlink: specs: add ovs_flow del and set operations
  netlink: specs: add ovs datapath and vport set operations

 Documentation/netlink/specs/ovs_datapath.yaml | 18 ++++++++++
 Documentation/netlink/specs/ovs_flow.yaml     | 35 ++++++++++++++++++-
 Documentation/netlink/specs/ovs_vport.yaml    | 15 ++++++++
 3 files changed, 67 insertions(+), 1 deletion(-)

base-commit: d8674294aefef02266c4d47ad10131f1bffbe534
Signed-off-by: Minxi Hou <houminxi@gmail.com>

-- 
2.55.0


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH net-next 0/2] netlink: specs: fill in the missing ovs operations
@ 2026-10-06 13:05 Minxi Hou
  2026-10-06 13:05 ` [PATCH net-next 1/2] netlink: specs: add ovs_flow del and set operations Minxi Hou
  2026-10-06 13:05 ` [PATCH net-next 2/2] netlink: specs: add ovs datapath and vport " Minxi Hou
  0 siblings, 2 replies; 13+ messages in thread
From: Minxi Hou @ 2026-10-06 13:05 UTC (permalink / raw)
  To: netdev
  Cc: Donald Hunter, Jakub Kicinski, David S . Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman

The ovs datapath, vport and flow specs describe families the kernel
has shipped for a long time, but each one stops short of the write
commands. ovs_flow has get and new only. The datapath and vport specs
have no set. Nothing in the tree generates code from these files. A YNL
client only hits the gap when it tries to send the command.

Name the missing operations and the attributes the kernel handlers
read. del and set on ovs_flow, set on ovs_datapath and ovs_vport.

The handlers take CAP_NET_ADMIN through GENL_UNS_ADMIN_PERM, and so do
the new and del commands that were already in the specs. Mark all nine
write operations uns-admin-perm. get stays open.

Two requests are rejected for reasons the attribute list cannot say.
Flow set returns -EINVAL when it carries neither a key nor a ufid.
Datapath set treats a missing user-features attribute as zero, so it
clears whatever was set before. Both are in the operation doc.

The new, del and set handlers fill a reply, but they send it with
ovs_notify() to the multicast group. The caller gets an ack, not those
attributes, so the specs do not list a reply for them. get does, and
it returns the attributes to the caller.

Checked against a live kernel: flow set and delete, a delete with no
key that flushes the data path, a datapath set of the masks cache size
that also clears user features, and a vport set of the upcall pid. A
vport set that changes the type returns -EINVAL, as the handler does.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
---
Minxi Hou (2):
  netlink: specs: add ovs_flow del and set operations
  netlink: specs: add ovs datapath and vport set operations

 Documentation/netlink/specs/ovs_datapath.yaml | 18 ++++++++++++
 Documentation/netlink/specs/ovs_flow.yaml     | 31 +++++++++++++++++++++
 Documentation/netlink/specs/ovs_vport.yaml    | 15 ++++++++++
 3 files changed, 64 insertions(+)

base-commit: a5e7d8e446af9803e37a3b6a4d416fb41178348f
-- 
2.55.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-14 11:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12  6:55 [PATCH net-next v2 0/2] netlink: specs: fill in the missing ovs operations Minxi Hou
2026-10-12  6:55 ` [PATCH net-next v2 1/2] netlink: specs: add ovs_flow del and set operations Minxi Hou
2026-10-13  7:38   ` netdev-bot+sashiko
2026-10-14 11:03     ` Minxi Hou
2026-10-12  6:55 ` [PATCH net-next v2 2/2] netlink: specs: add ovs datapath and vport " Minxi Hou
2026-10-13  7:38   ` netdev-bot+sashiko
  -- strict thread matches above, loose matches on Subject: below --
2026-10-06 13:05 [PATCH net-next 0/2] netlink: specs: fill in the missing ovs operations Minxi Hou
2026-10-06 13:05 ` [PATCH net-next 1/2] netlink: specs: add ovs_flow del and set operations Minxi Hou
2026-10-08 13:08   ` netdev-bot+sashiko
2026-10-09  3:25     ` Minxi Hou
2026-10-06 13:05 ` [PATCH net-next 2/2] netlink: specs: add ovs datapath and vport " Minxi Hou
2026-10-08 13:08   ` netdev-bot+sashiko
2026-10-09  3:26     ` Minxi Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox