ba5a199b | 20-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: tc: drop the family name prefix from attrs
All attribute sets and messages are prefixed with tc-. The C codegen also adds the family name to all structs. We end up with names like st
netlink: specs: tc: drop the family name prefix from attrs
All attribute sets and messages are prefixed with tc-. The C codegen also adds the family name to all structs. We end up with names like struct tc_tc_act_attrs. Remove the tc- prefixes to shorten the names. This should not impact Python as the attr set names are never exposed to user, they are only used to refer to things internally, in the encoder / decoder.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250520161916.413298-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
f9aec802 | 20-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: tc: add C naming info
Add naming info needed by C code gen.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250520161916.413298-5-kuba@kernel.o
netlink: specs: tc: add C naming info
Add naming info needed by C code gen.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250520161916.413298-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
eb1f803f | 20-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: tc: use tc-gact instead of tc-gen as struct name
There is a define in the uAPI header called tc_gen which expands to the "generic" TC action fields. This helps other actions include
netlink: specs: tc: use tc-gact instead of tc-gen as struct name
There is a define in the uAPI header called tc_gen which expands to the "generic" TC action fields. This helps other actions include the base fields without having to deal with nested structs.
A couple of actions (sample, gact) do not define extra fields, so the spec used a common tc-gen struct for both of them. Unfortunately this struct does not exist in C. Let's use gact's (generic act's) struct for basic actions.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250520161916.413298-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
f3dd5fb2 | 14-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: tc: all actions are indexed arrays
Some TC filters have actions listed as indexed arrays of nests and some as just nests. They are all indexed arrays, the handling is common across f
netlink: specs: tc: all actions are indexed arrays
Some TC filters have actions listed as indexed arrays of nests and some as just nests. They are all indexed arrays, the handling is common across filters.
Fixes: 2267672a6190 ("doc/netlink/specs: Update the tc spec") Link: https://patch.msgid.link/20250513221638.842532-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
720447bd | 06-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: remove implicit structs from devconf
devconf is even odder than SNMP. On input it reports an array of u32s which seem to be indexed by the enum values - 1. On output kernel
netlink: specs: rt-link: remove implicit structs from devconf
devconf is even odder than SNMP. On input it reports an array of u32s which seem to be indexed by the enum values - 1. On output kernel expects a nest where each attr has the enum type as the nla type.
sub-type: u32 is probably best we can do right now.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250506194101.696272-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
ab91c140 | 06-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: remove implicit structs for SNMP counters
uAPI doesn't define structs for the SNMP counters, just enums to index them as arrays. Switch to the same representation in the spec. C code
netlink: specs: remove implicit structs for SNMP counters
uAPI doesn't define structs for the SNMP counters, just enums to index them as arrays. Switch to the same representation in the spec. C codegen will soon need all the struct types to actually exist.
Note that the existing definition was broken, anyway, as the first member should be the number of counters reported.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250506194101.696272-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
6c242239 | 06-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: ovs: correct struct names
C codegen will soon support using struct types for binary attrs. Correct the struct names in OvS specs.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com
netlink: specs: ovs: correct struct names
C codegen will soon support using struct types for binary attrs. Correct the struct names in OvS specs.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250506194101.696272-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
620b3823 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-rule: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/
netlink: specs: rt-rule: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-13-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
e3d199d3 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rtnetlink: correct notify properties
The notify property should point at the object the notifications carry, usually the get object, not the cmd which triggers the notification:
n
netlink: specs: rtnetlink: correct notify properties
The notify property should point at the object the notifications carry, usually the get object, not the cmd which triggers the notification:
notify: description: Name of the command sharing the reply type with this notification.
Not treating this as a fix, I think that only C codegen cares.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-12-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
eee94a89 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-neigh: make sure getneigh is consistent
The consistency check complains replies to do and dump don't match because dump has no value. It doesn't have to by the schema... but fixin
netlink: specs: rt-neigh: make sure getneigh is consistent
The consistency check complains replies to do and dump don't match because dump has no value. It doesn't have to by the schema... but fixing this in code gen would be more code than adjusting the spec. This is rare.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-11-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
cd879795 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-neigh: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link
netlink: specs: rt-neigh: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-10-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
622d7050 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: add notification for newlink
Add a notification entry for netlink so that we can test ntf handling in classic netlink and C.
Reviewed-by: Donald Hunter <donald.hunter@gmail
netlink: specs: rt-link: add notification for newlink
Add a notification entry for netlink so that we can test ntf handling in classic netlink and C.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-9-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
1c224f19 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: make bond's ipv6 address attribute fixed size
ns-ip6-target is an indexed-array. Codegen for variable size binary array would be a bit tedious, tell C that we know the size
netlink: specs: rt-link: make bond's ipv6 address attribute fixed size
ns-ip6-target is an indexed-array. Codegen for variable size binary array would be a bit tedious, tell C that we know the size of these attributes, since they are IPv6 addrs.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
e6e1f53f | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: adjust AF_ nest for C codegen
The AF nest is indexed by AF ID, so it's a bit strange, but with minor adjustments C codegen deals with it just fine. Entirely unclear why the
netlink: specs: rt-link: adjust AF_ nest for C codegen
The AF nest is indexed by AF ID, so it's a bit strange, but with minor adjustments C codegen deals with it just fine. Entirely unclear why the names have been in quotes here.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-7-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
b12b0f41 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/
netlink: specs: rt-link: add C naming info
Add properties needed for C codegen to match names with uAPI headers.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
c703d258 | 18-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
netlink: specs: rt-link: remove duplicated group in attr list
group is listed twice for newlink.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1
netlink: specs: rt-link: remove duplicated group in attr list
group is listed twice for newlink.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250418021706.1967583-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|