]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src: Document virDomainInterfaceStats() limitation
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 6 Mar 2023 08:56:52 +0000 (09:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 6 Mar 2023 11:20:35 +0000 (12:20 +0100)
For unmanaged ethernet <interface/>, it is user's responsibility
to set up the interface. And as such it can be just anything.
Therefore, it's (almost) impossible for the
virDomainInterfaceStats() API to tell whether RX/TX values need
to be swapped or copied verbatim into the return structure.
Document this limitation.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
docs/manpages/virsh.rst
src/libvirt-domain.c

index d5b614dc0398776a30cfc1d100da997b5efd2745..26c328d39001c7cb59ca685f0c5bfe05b742d8cc 100644 (file)
@@ -2012,7 +2012,8 @@ interface stats are only available for interfaces that have a
 physical source interface. This does not include, for example, a
 'user' interface type since it is a virtual LAN with NAT to the
 outside world. *interface-device* can be the interface target by
-name or MAC address.
+name or MAC address. Please note, for an unmanaged *ethernet*
+type returned stats might have RX/TX swapped.
 
 
 domiftune
index 3199a2706573cd884603437433bb6f23b82f7e4b..379057d9a784f511685ffe09b45966deaa5d0faa 100644 (file)
@@ -5965,6 +5965,9 @@ virDomainBlockStatsFlags(virDomainPtr dom,
  *
  * The returned stats are from domain's point of view.
  *
+ * Please note, for an unmanaged ethernet type, returned stats
+ * might have RX/TX swapped.
+ *
  * Returns: 0 in case of success or -1 in case of failure.
  *
  * Since: 0.3.2