d307b9fe | 05-May-2025 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl-gen: move the count into a presence struct too
While we reshuffle the presence members, move the counts as well. Previously array count members would have been place directly in the struc
tools: ynl-gen: move the count into a presence struct too
While we reshuffle the presence members, move the counts as well. Previously array count members would have been place directly in the struct, so:
struct family_op_req { struct { u32 a:1; u32 b:1; } _present; struct { u32 bin; } _len;
u32 a; u64 b; const unsigned char *bin; u32 n_multi; << count u32 *multi; << objects };
Since len has been moved to its own presence struct move the count as well:
struct family_op_req { struct { u32 a:1; u32 b:1; } _present; struct { u32 bin; } _len; struct { u32 multi; << count } _count;
u32 a; u64 b; const unsigned char *bin; u32 *multi; << objects };
This improves the consistency and allows us to remove some hacks in the codegen. Unlike for len there is no known name collision with the existing scheme.
Link: https://patch.msgid.link/20250505165208.248049-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
54d79085 | 10-Apr-2025 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: generate code for rt-route and add a sample
YNL C can now generate code for simple classic netlink families. Include rt-route in the Makefile for generation and add a sample.
$ ./to
tools: ynl: generate code for rt-route and add a sample
YNL C can now generate code for simple classic netlink families. Include rt-route in the Makefile for generation and add a sample.
$ ./tools/net/ynl/samples/rt-route oif: wlp0s20f3 gateway: 192.168.1.1 oif: wlp0s20f3 dst: 192.168.1.0/24 oif: vpn0 dst: fe80::/64 oif: wlp0s20f3 dst: fe80::/64 oif: wlp0s20f3 gateway: fe80::200:5eff:fe00:201
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250410014658.782120-14-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
a8c300cc | 13-Nov-2024 |
Luo Yifan <luoyifan@cmss.chinamobile.com> |
ynl: samples: Fix the wrong format specifier
Make a minor change to eliminate a static checker warning. The type of s->ifc is unsigned int, so the correct format specifier should be %u instead of %d
ynl: samples: Fix the wrong format specifier
Make a minor change to eliminate a static checker warning. The type of s->ifc is unsigned int, so the correct format specifier should be %u instead of %d.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241113011142.290474-1-luoyifan@cmss.chinamobile.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
1d8617b2 | 05-Mar-2024 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: add distclean to .PHONY in all makefiles
Donald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
Suggested-by: Donald Hunter <don
tools: ynl: add distclean to .PHONY in all makefiles
Donald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
Suggested-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
92900372 | 29-Nov-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: make sure we use local headers for page-pool
Building samples generates the following warning:
In file included from page-pool.c:11: generated/netdev-user.h:21:45: warning: ‘enum ne
tools: ynl: make sure we use local headers for page-pool
Building samples generates the following warning:
In file included from page-pool.c:11: generated/netdev-user.h:21:45: warning: ‘enum netdev_xdp_rx_metadata’ declared inside parameter list will not be visible outside of this definition or declaration 21 | const char *netdev_xdp_rx_metadata_str(enum netdev_xdp_rx_metadata value); | ^~~~~~~~~~~~~~~~~~~~~~
Our magic way of including uAPI headers assumes the sample name matches the family name. We need to copy the flags over.
Fixes: 637567e4a3ef ("tools: ynl: add sample for getting page-pool information") Link: https://lore.kernel.org/r/20231129193622.2912353-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|