]> www.infradead.org Git - users/hch/misc.git/commit
netlink: specs: ovs_vport: align with C codegen capabilities
authorJakub Kicinski <kuba@kernel.org>
Wed, 9 Apr 2025 14:55:41 +0000 (07:55 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 14 Apr 2025 21:05:56 +0000 (14:05 -0700)
commit747fb8413aaa36e4c988d45c4fe20d4c2b0778cd
treeb6fcb7a4cd6a387066e5933d03f52f05f56c35b0
parentf0433eea468810aebd61d0b9d095e9acd6bea2ed
netlink: specs: ovs_vport: align with C codegen capabilities

We started generating C code for OvS a while back, but actually
C codegen only supports fixed headers specified at the family
level right now (schema also allows specifying them per op).
ovs_flow and ovs_datapath already specify the fixed header
at the family level but ovs_vport does it per op.
Move the property, all ops use the same header.

This ensures YNL C sees the correct hdr_len:

   const struct ynl_family ynl_ovs_vport_family =  {
          .name           = "ovs_vport",
  -       .hdr_len        = sizeof(struct genlmsghdr),
  +       .hdr_len        = sizeof(struct genlmsghdr) + sizeof(struct ovs_header),
   };

Fixes: 7c59c9c8f202 ("tools: ynl: generate code for ovs families")
Link: https://patch.msgid.link/20250409145541.580674-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/ovs_vport.yaml