At 2018-09-11 13:51:43, "Lin Ma" <lma(a)suse.com> wrote:
On 09/10/2018 02:55 PM, Chen Hanxiao wrote:
At 2018-09-07 18:44:53, "Lin Ma" <lma(a)suse.com> wrote:
>When we call qemuARPGetInterfaces to get IP from host's arp table, The
>iface's type has nothing to do with it, We should allow all of type.
>
>Signed-off-by: Lin Ma <lma(a)suse.com>
Hi,
with my limited tests,
we can't get useful info by arp query from other kind of interface types.
IMO, As long as the host interface and the guest interface
communicated
through osi layer3 or above, Host kernel will maintaince
the corresponding
ip <-> mac entry in arp able.
A lot of network backend, such as vrouter, dpdk, the package from guest os
did not come back to the host's protocol stack.
We can't see them in host's arp table.
What you mentioned above remind me one thing: I forgot to
mention that
if the switch doesn't support hairpin mode, then the
virtual interfaces
which backend is mactap can't communicate with host,
that means the host
arp table won't include the ip <-> mac information
of such virtual interfaces.
In this case, the qemuARPGetInterfaces
can't get IP.
So I'd like to change the code to only ignore
VIR_DOMAIN_NET_TYPE_DIRECT
Maybe adding VIR_DOMAIN_NET_TYPE_ETHERNET and VIR_DOMAIN_NET_TYPE_VHOSTUSER?
Regards,
- Chen
in patch V2, For anyelse net types, the
code will iterate the arp table for
loop to try to search if there is a
matched entry.
what do you think?
Thanks,
Lin