[PATCH net-next v4 0/2] Add OVS packet family YNL spec and unicast notification support

Minxi Hou posted 2 patches 3 days, 19 hours ago
There is a newer version of this series
Documentation/netlink/specs/ovs_packet.yaml | 130 ++++++++++++++++++++
tools/net/ynl/pyynl/lib/ynl.py              |   5 +
2 files changed, 135 insertions(+)
create mode 100644 Documentation/netlink/specs/ovs_packet.yaml
[PATCH net-next v4 0/2] Add OVS packet family YNL spec and unicast notification support
Posted by Minxi Hou 3 days, 19 hours ago
This series adds a YAML netlink spec for the OVS_PACKET_FAMILY genetlink
family and a bind-only ntf_bind() helper for receiving unicast
notifications.

Changes in v4:
- patch 2: rename ntf_listen() to ntf_bind(addr=(0, 0)); the name
  listen() was misleading since the operation is a bind(), and the
  address is now an explicit argument defaulting to (0, 0)
  (suggested by Jakub Kicinski)

Changes in v3:
- patch 1: add missing document start "---" after SPDX comment
  (yamllint warning in v2)

Changes in v2:
- patch 1: use YAML anchor (&event-attrs / *event-attrs) to avoid
  repeating the same attribute list for miss and action events
  (suggested by Donald Hunter)
- patch 1: fix enum-name from ovs-packet-attrs to ovs-packet-attr
  to match the kernel enum name ovs_packet_attr
- patch 2: add ntf_bind() to the YnlFamily docstring under the
  "Notification API" heading (suggested by Donald Hunter)

Minxi Hou (2):
  netlink: specs: add OVS packet family specification
  tools: ynl: add unicast notification receive support

 Documentation/netlink/specs/ovs_packet.yaml | 130 ++++++++++++++++++++
 tools/net/ynl/pyynl/lib/ynl.py              |   5 +
 2 files changed, 135 insertions(+)
 create mode 100644 Documentation/netlink/specs/ovs_packet.yaml

-- 
2.54.0
Re: [PATCH net-next v4 0/2] Add OVS packet family YNL spec and unicast notification support
Posted by Minxi Hou 2 days, 18 hours ago
Sashiko flagged a few things on this series, noting my analysis here
for the record.

The dp-ifindex field is typed as u32 in the spec while the kernel
struct uses "int".  All three existing OVS specs (ovs_datapath,
ovs_flow, ovs_vport) also use u32 for this field, so I kept it
consistent.

key/actions/egress-tun-key are typed as binary rather than nest.
This is documented in the commit message and inline comments --
the nested attribute-sets belong to ovs_flow's spec, and YNL does
not support cross-spec references.

The execute operation does not carry uns-admin-perm in the spec.
The kernel sets GENL_UNS_ADMIN_PERM on it, but none of the existing
OVS specs declare admin-perm flags on any of their operations either
(ovs_datapath new/del/set, ovs_flow new/del/set, ovs_vport new/del/set
all have GENL_UNS_ADMIN_PERM in the kernel but omit it in the YAML).

ntf_bind() will raise OSError if the socket was already bound.
ntf_subscribe() has the same constraint -- both expect to be called
before any operation that triggers autobind.
Re: [PATCH net-next v4 0/2] Add OVS packet family YNL spec and unicast notification support
Posted by Jakub Kicinski 2 days, 5 hours ago
On Fri, 22 May 2026 11:24:47 +0800 Minxi Hou wrote:
> Sashiko flagged a few things on this series, noting my analysis here
> for the record.
> 
> The dp-ifindex field is typed as u32 in the spec while the kernel
> struct uses "int".  All three existing OVS specs (ovs_datapath,
> ovs_flow, ovs_vport) also use u32 for this field, so I kept it
> consistent.
> 
> key/actions/egress-tun-key are typed as binary rather than nest.
> This is documented in the commit message and inline comments --
> the nested attribute-sets belong to ovs_flow's spec, and YNL does
> not support cross-spec references.
> 
> The execute operation does not carry uns-admin-perm in the spec.
> The kernel sets GENL_UNS_ADMIN_PERM on it, but none of the existing
> OVS specs declare admin-perm flags on any of their operations either
> (ovs_datapath new/del/set, ovs_flow new/del/set, ovs_vport new/del/set
> all have GENL_UNS_ADMIN_PERM in the kernel but omit it in the YAML).
> 
> ntf_bind() will raise OSError if the socket was already bound.
> ntf_subscribe() has the same constraint -- both expect to be called
> before any operation that triggers autobind.

Your explanations sound reasonable.
But please rebase and repost, I think some patches merged yesterday
will conflict with the new ynl helper.
-- 
pw-bot: cr