summaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/lib/ynl-priv.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-02-27 14:30:25 -0800
committerJakub Kicinski <kuba@kernel.org>2024-02-28 15:25:43 -0800
commit2f22f0b313f4c11e524c68e34165e62d8276e442 (patch)
tree748c6d2da88556c72f5fd40c0c266199cd8f80e9 /tools/net/ynl/lib/ynl-priv.h
parent9c29a113165fc473e6f91f40e59ece94d287f95d (diff)
downloadlinux-stable-2f22f0b313f4c11e524c68e34165e62d8276e442.tar.gz
linux-stable-2f22f0b313f4c11e524c68e34165e62d8276e442.tar.bz2
linux-stable-2f22f0b313f4c11e524c68e34165e62d8276e442.zip
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>
Diffstat (limited to 'tools/net/ynl/lib/ynl-priv.h')
0 files changed, 0 insertions, 0 deletions