Whamcloud - gitweb
LU-10391 lnet: support IPv6 in lnet_inet_enumerate() 72/48572/2
authorMr NeilBrown <neilb@suse.de>
Fri, 16 Sep 2022 00:57:13 +0000 (10:57 +1000)
committerOleg Drokin <green@whamcloud.com>
Sat, 15 Oct 2022 05:54:49 +0000 (05:54 +0000)
commit781499eee645a635d065f40a5400a3b0de3aa051
tree28927b687501cfd4ee8bd406e5cbdec14756e302
parent6bdeda7afe92d61db56367875774fa074aaac0fd
LU-10391 lnet: support IPv6 in lnet_inet_enumerate()

lnet_inet_enumerate() can now optionally report IPv6 addresses on
interfaces.  We use this in socklnd to determine the address of the
interface.

Unlike IPv4, different IPv6 addresses associated with a single
interface cannot be associated with different labels (e.g. eth0:2).
This means that lnet_inet_enumerate() must report the same name for
each address.  For now, we only report the first non-temporary address
to avoid any confusion.

The network mask provided with IPv4 is only use for reporting
information for an ioctl.  It isn't clear this will be useful for
IPv6, so no netmask is collected.

To save a bit of space in struct lnet_inetdev{} which much now hold a
16byte address, we replace he 4byte flag with a 1byte bool as only the
IFF_MASTER flag is ever of interest.  Another bool is needed to report
of the address is IPv6.

Test-Parameters: trivial testlist=sanity-lnet
Test-Parameters: serverversion=2.12 serverdistro=el7.9 testlist=runtests
Test-Parameters: clientversion=2.12 testlist=runtests
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I7a73033f40cc83a8993281696f17332a9101db1e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48572
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/config.c