Whamcloud - gitweb
LU-9680 utils: fix Netlink / YAML library handling
Testing the implementation of Netlink with lustre with early
code revealed some userland lnetconfig library bugs. Several bugs
fixed are:
1) First issue was that the YAML parser and emitter can share an
netlink socket. This means the netlink callbacks will expect
that same void argument passed in. We were in the case of error
handling expecting an struct yaml_netlink_output but all other
callbacks were using struct yaml_netlink_input. This mismatch
can cause the application to segfault. So move all netlink
callback handling to use just the yaml_parser. The yaml
emittter now is used to just send Netlink packets to the
kernel.
Also fix the Netlink ext_ack error message handling.
2) In my board testing I found various bugs related to the
paring of the YAML to create Netlink packet to send to the
kernel. This patch resolves all the known issues. Most
related to the complex layering of sequences, mappings and
flows in a YAML block.
3) Fix up nla_strlcpy autoconf test which always fails with
Oleg's special setup.
4) Add a Netlink protocol version YAML function.
Test-Parameters: trivial
Change-Id: I7e7c755ceaa969dffff8c6f771c2ac048dc55720
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/47802
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Joe Atzinger <joseph.atzinger@microsoft.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>