summaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/generated/fou-user.c
Commit message (Collapse)AuthorAgeFilesLines
* tools: ynl: remove generated user space code from gitJakub Kicinski2023-12-051-330/+0
| | | | | | | | | | | | | | | | | | | | The ynl-generated user space C code is already above 25kLoC and is growing. The initial reason to commit these files was to make reviewing changes to the generator easier. Unfortunately, it has the opposite effect on reviewing changes to specs, and we get far more changes to specs than to the generator. Uncommit those fails, as they are generated on the fly as needed. netdev patchwork now runs a script on each series to create a diff of generated code on the fly, for the rare cases when looking at it is helpful: https://github.com/kuba-moo/nipa/blob/master/tests/series/ynl/ynl.sh Suggested-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* tools: ynl-gen: always construct struct ynl_req_stateJakub Kicinski2023-11-291-2/+4
| | | | | | | | | | | | struct ynl_req_state carries reply-related info from generated code into generic YNL code. While we don't need reply info to execute a request without a reply, we still need to pass in the struct, because it's also where we get the pointer to struct ynl_sock from. Passing NULL results in crashes if kernel returns an error or an unexpected reply. Fixes: dc0956c98f11 ("tools: ynl-gen: move the response reading logic into YNL") Link: https://lore.kernel.org/r/20231126225858.2144136-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* tools: ynl: regen: regenerate the if laddersJakub Kicinski2023-06-091-19/+12
| | | | | | | | Renegate the code to combine } and else and use tmp variable to store type. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* tools: ynl: regen: cleanup user space header includesJakub Kicinski2023-06-091-3/+1
| | | | | | | Remove unnecessary includes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* tools: ynl-gen: don't generate forward declarations for policies - regenJakub Kicinski2023-06-081-2/+0
| | | | | | | Renegerate code after dropping forward declarations for policies. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* tools: ynl-gen: use enum names in op strmap more carefullyJakub Kicinski2023-06-081-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 <kuba@kernel.org>
* tools: ynl: support fou and netdev in CJakub Kicinski2023-06-061-0/+340
Generate the code for netdev and fou families. They are simple and already supported by the code gen. Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>