Whamcloud - gitweb
LU-9680 lnet: handle multi-rail setups 26/50026/5
authorJames Simmons <jsimmons@infradead.org>
Tue, 7 Mar 2023 17:44:38 +0000 (12:44 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Mar 2023 22:09:38 +0000 (22:09 +0000)
commit6fab1fe4a5c5615d4d8f74832c9c5984625b8668
treed76a333c7694023110cf089f2710b61abc122510
parent0ecb2a167c56ffff8e4fcb5cf576fb8c5d9e64fe
LU-9680 lnet: handle multi-rail setups

For multi-rail setups we can push more than one interface at a
time to setup the local NIs but our netlink code ignored all but
one interface. Refactor both lnet_genl_parse_local_ni() and
lnet_net_cmd() to setup all the passed in interfaces. Also remove
setting ni to NULL in the NI deletion case which causes an oops
when we have more than one interface.

Lastly rework the Netlink userland library code to properly pack
netlink packets sent to the kernel. We were treating YAMl mappings
the same as YAML sequences. This is wrong so we separate the
handling of each case. Mapping then are translated as nested
collection of data and sequences are arrays of these data. This
ends up packing a nested collection in another nested collection.
Before we didn't have this layering which lead to improper
packing.

Test-Parameters: trivial testlist=sanity-lnet
Change-Id: Icb220127fdabfc5ebf4bb848cf2715048c40f674
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50026
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lnet/selftest/conctl.c
lnet/utils/lnetconfig/liblnetconfig_netlink.c
lustre/obdclass/kernelcomm.c