LU-11838 lnet: change lnet_ipaddr_enumerate() to use for_each_netdev()
for_each_netdev() is a more direct interface than
lnet_ipif_enumerate(), so use it instead. Also get
address and 'up' status directly from the device.
This means we need to possible re-allocate the storage
space if there are lots of IP addresses.
However there is no need to resize the allocation down if we
over-allocated. This is only used once, and is freed soon
after it is allocated, so that is a false optimization.
Linux-commit:
0400cf406c32ac3968241cd528747d922b6c55c3
Change-Id: I1c1e7722c7b2b267dcb8134ae295a54f976d96ad
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/33969
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>