aboutsummaryrefslogtreecommitdiff
path: root/tools/net/ynl/generated
AgeCommit message (Collapse)AuthorFilesLines
2023-06-15tools: ynl: work around stale system headersJakub Kicinski1-2/+4
The inability to include the uAPI headers directly in tools/ is one of the bigger annoyances of compiling user space code. Most projects trade the pain for smaller inconvenience of having to copy the headers under tools/include. In case of netlink headers I think that we can avoid both. Netlink family headers are simple and should be self-contained. We can try to twiddle the Makefile a little to force-include just the family header, and use system headers for the rest. This works fairly well. There are two warts - for some reason if we specify -include $path/family.h as a compilation flag, the #ifdef header guard does not seem to work. So we need to throw the guard in on the command line as well. Seems like GCC detects that the header is different and tries to include both. Second problem is that make wants hash sign to be escaped or not depending on the version. Sigh. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-06-12tools: ynl: generate code for the ethtool familyJakub Kicinski3-3/+11890
Generate the protocol code for ethtool. Skip the stats for now, they are the only outlier in terms of complexity. Stats are a sort-of semi-polymorphic (attr space of a nest depends on value of another attr) or a type-value-scalar, depending on how one wants to look at it... A challenge for another time. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-06-09tools: ynl: regen: stop generating common notification handlersJakub Kicinski4-98/+0
Remove unused notification handlers. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-09tools: ynl: regen: regenerate the if laddersJakub Kicinski4-74/+67
Renegate the code to combine } and else and use tmp variable to store type. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-09tools: ynl: regen: cleanup user space header includesJakub Kicinski4-12/+4
Remove unnecessary includes. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-09Revert "tools: ynl: Remove duplicated include in handshake-user.c"Jakub Kicinski1-0/+1
This reverts commit e7c5433c5aaab52ddd5448967a9a5db94a3939cc. Commit e7c5433c5aaa ("tools: ynl: Remove duplicated include in handshake-user.c") was applied too hastily. It changes an auto-generated file, and there's already a proper fix on the list. Link: https://lore.kernel.org/all/ZIMPLYi%2FxRih+DlC@nanopsycho/ Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-09tools: ynl: Remove duplicated include in handshake-user.cYang Li1-1/+0
./tools/net/ynl/generated/handshake-user.c: stdlib.h is included more than once. Reported-by: Abaci Robot <[email protected]> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5464 Signed-off-by: Yang Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-06-08tools: ynl: generate code for the devlink familyJakub Kicinski3-1/+932
Admittedly the devlink.yaml spec is fairly limitted, it only covers basic device get and info-get ops. That's sufficient to be useful (monitoring FW versions in the fleet). Plus it gives us a chance to exercise deep nesting and directional messaging in YNL. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-08tools: ynl-gen: don't generate forward declarations for policies - regenJakub Kicinski3-8/+0
Renegerate code after dropping forward declarations for policies. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-08tools: ynl-gen: use enum names in op strmap more carefullyJakub Kicinski1-1/+0
In preparation for supporting families which use different msg ids to and from the kernel - make sure the ids in op strmap are correct. The map is expected to be used mostly for notifications, don't generate a separate map for the "to kernel" direction. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-07tools: ynl: generate code for the handshake familyJakub Kicinski3-1/+534
Generate support for the handshake family. Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-06tools: ynl: support fou and netdev in CJakub Kicinski5-1/+1016
Generate the code for netdev and fou families. They are simple and already supported by the code gen. Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2023-06-06tools: ynl: user space helpersJakub Kicinski1-0/+45
Add "fixed" part of the user space Netlink Spec-based library. This will get linked with the protocol implementations to form a full API. Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>