tools/hv: Fix IP reporting by KVP daemon with SRIOV
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 5 Mar 2018 05:17:11 +0000 (22:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Mar 2018 17:57:16 +0000 (09:57 -0800)
commit4ba6341286f20d3b300a8f159aa2a61eca0f4b17
treef7e7dcf98e61e81b38c1a164492819d4c38abd98
parent661e50bc853209e41a5c14a290ca4decc43cbfd1
tools/hv: Fix IP reporting by KVP daemon with SRIOV

On Hyper-V the VF NIC has the same MAC as the related synthetic NIC.
VF NIC can work under the synthetic NIC transparently, without its
own IP address. The existing KVP daemon only gets IP from the first
NIC matching a MAC address, and may not be able to find the IP in
this case.

This patch fixes the problem by searching the NIC matching the MAC,
and having an IP address. So, the IP address will be found and
reported to the host successfully.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_kvp_daemon.c