netlink: specs: ovs_vport: align with C codegen capabilities
[ Upstream commit 747fb8413aaa36e4c988d45c4fe20d4c2b0778cd ]
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: 7c59c9c8f2 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
41e43134dd
commit
15baba1095
@@ -123,12 +123,12 @@ attribute-sets:
|
|||||||
|
|
||||||
operations:
|
operations:
|
||||||
name-prefix: ovs-vport-cmd-
|
name-prefix: ovs-vport-cmd-
|
||||||
|
fixed-header: ovs-header
|
||||||
list:
|
list:
|
||||||
-
|
-
|
||||||
name: new
|
name: new
|
||||||
doc: Create a new OVS vport
|
doc: Create a new OVS vport
|
||||||
attribute-set: vport
|
attribute-set: vport
|
||||||
fixed-header: ovs-header
|
|
||||||
do:
|
do:
|
||||||
request:
|
request:
|
||||||
attributes:
|
attributes:
|
||||||
@@ -141,7 +141,6 @@ operations:
|
|||||||
name: del
|
name: del
|
||||||
doc: Delete existing OVS vport from a data path
|
doc: Delete existing OVS vport from a data path
|
||||||
attribute-set: vport
|
attribute-set: vport
|
||||||
fixed-header: ovs-header
|
|
||||||
do:
|
do:
|
||||||
request:
|
request:
|
||||||
attributes:
|
attributes:
|
||||||
@@ -152,7 +151,6 @@ operations:
|
|||||||
name: get
|
name: get
|
||||||
doc: Get / dump OVS vport configuration and state
|
doc: Get / dump OVS vport configuration and state
|
||||||
attribute-set: vport
|
attribute-set: vport
|
||||||
fixed-header: ovs-header
|
|
||||||
do: &vport-get-op
|
do: &vport-get-op
|
||||||
request:
|
request:
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
Reference in New Issue
Block a user