]> xenbits.xensource.com Git - libvirt.git/commit
virNetDevTapInterfaceStats: Allow caller to not swap the statistics
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Oct 2017 11:36:56 +0000 (13:36 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 5 Oct 2017 07:16:05 +0000 (09:16 +0200)
commitd86fd2402e9d217f90e0a149d6486f392b34f7ba
tree68e5eb0870ce829e34fc5522427354196700b3c2
parentc2c47b586fd729c29964996ba088e85366af791b
virNetDevTapInterfaceStats: Allow caller to not swap the statistics

https://bugzilla.redhat.com/show_bug.cgi?id=1497410

The comment in virNetDevTapInterfaceStats() implementation for
Linux states that packets transmitted by domain are received by
the host and vice versa. Well, this is true but not for all types
of interfaces. For instance, for macvtaps when TAP device is
hooked right onto a physical device any packet that domain sends
looks also like a packet sent to the host. Therefore, we should
allow caller to chose if the stats returned should be straight
copy or swapped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libxl/libxl_driver.c
src/lxc/lxc_driver.c
src/openvz/openvz_driver.c
src/qemu/qemu_driver.c
src/util/virnetdevtap.c
src/util/virnetdevtap.h
src/xen/xen_hypervisor.c