linux/tools/net/ynl
Jakub Kicinski 2f22f0b313 tools: ynl: wrap recv() + mnl_cb_run2() into a single helper
All callers to mnl_cb_run2() call mnl_socket_recvfrom() right before.
Wrap the two in a helper, take typed arguments (struct ynl_parse_arg),
instead of hoping that all callers remember that parser error handling
requires yarg.

In case of ynl_sock_read_family() we will no longer check for kernel
returning no data, but that would be a kernel bug, not worth complicating
the code to catch this. Calling mnl_cb_run2() on an empty buffer
is legal and results in STOP (1).

Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20240227223032.1835527-9-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-02-28 15:25:43 -08:00
..
generated tools: ynl: auto-gen for all genetlink families 2024-02-02 21:16:38 -08:00
lib tools: ynl: wrap recv() + mnl_cb_run2() into a single helper 2024-02-28 15:25:43 -08:00
samples tools: ynl: generate code for ovs families 2024-02-02 21:16:38 -08:00
cli.py tools/net/ynl: Add --output-json arg to ynl cli 2024-01-31 21:19:18 -08:00
ethtool.py tools: ynl: Rename ethtool to ethtool.py 2023-04-13 22:18:29 -07:00
Makefile tools: ynl: order building samples after generated code 2023-11-29 16:07:00 -08:00
Makefile.deps tools: ynl: protect from old OvS headers 2024-02-28 15:24:11 -08:00
requirements.txt tools: ynl: add the Python requirements.txt file 2023-03-24 19:11:02 -07:00
ynl-gen-c.py tools: ynl-gen: remove unused parse code 2024-02-28 15:25:43 -08:00
ynl-gen-rst.py tools/net/ynl: Add type info to struct members in generated docs 2024-01-31 21:19:19 -08:00
ynl-regen.sh tools: ynl: don't skip regeneration from make targets 2023-11-29 16:07:00 -08:00