Whamcloud - gitweb
LU-17638 utils: break up Netlink error handling 12/54412/27
authorJames Simmons <jsimmons@infradead.org>
Tue, 9 Apr 2024 17:23:44 +0000 (13:23 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:45:27 +0000 (19:45 +0000)
commita6645f3f4c0b3e12a3f26203a898908a8277ddd7
tree8309fb5a8af7f687efa029dc3c39a6077887316f
parent28c366cee6dd1ec8293e0a5aed61c9b15d8b9a96
LU-17638 utils: break up Netlink error handling

In the current code when function yaml_netlink_msg_complete()
calls yaml_netlink_msg_error() the arg becomes NULL. So break
up yaml_netlink_msg_error() into two functions. One called by
the netlink err callback and the other called directly by
yaml_netlink_msg_complete(). Also change the libyaml
read_handler_data to yaml_parser itself since its life cycle
is outside the library itself so no chance of it disappear on
us while executing library code.

Fixes: d3ef8f6 ("LU-9680 lnet: add NLM_F_DUMP_FILTERED support")
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: Iacb1e9c8929cd8a78a14580d909f94f2569fa5a3
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54412
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetconfig/liblnetconfig_netlink.c
lnet/utils/lnetctl.c