Whamcloud - gitweb
LU-11838 lnet: change lnet_ipaddr_enumerate() to use for_each_netdev() 69/33969/3
authorNeilBrown <neilb@suse.com>
Mon, 7 Jan 2019 19:23:19 +0000 (14:23 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 23 Jan 2019 09:18:21 +0000 (09:18 +0000)
commitf5991afd8779fe747778e28e998277a10242a57d
tree75ff3526dae325ecaf36ed3adec5e6d4800d352f
parent74b3726f42b1f72e289e3c3252030a62646afa7b
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>
lnet/lnet/config.c