[libvirt PATCH] util: virnetdevtap: stats: fix txdrop on FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For older FreeBSD, we needed an ifdef guard to use
if_data.ifi_oqdrops, which was introduced by:

commit 61bbdbb94ce3e2f5e969c9bddb443427db07bf61
    Implement interface stats for BSD

But when we dropped the check because we deprecated
building on FreeBSD-10 in:

commit 83131d9714db7ee77ab220186b6b0d8b6c22b09e
    configure: drop check for unsupported FreeBSD

We started building the wrong side of the ifdef.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
Fixes: 83131d9714db7ee77ab220186b6b0d8b6c22b09e
---
 src/util/virnetdevtap.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index 9f5e535180..cab5ef0ced 100644
--- a/src/util/virnetdevtap.c
+++ b/src/util/virnetdevtap.c
@@ -974,20 +974,12 @@ virNetDevTapInterfaceStats(const char *ifname,
                 stats->rx_bytes = ifd->ifi_obytes;
                 stats->rx_packets = ifd->ifi_opackets;
                 stats->rx_errs = ifd->ifi_oerrors;
-# ifdef HAVE_STRUCT_IF_DATA_IFI_OQDROPS
                 stats->rx_drop = ifd->ifi_oqdrops;
-# else
-                stats->rx_drop = 0;
-# endif
             } else {
                 stats->tx_bytes = ifd->ifi_obytes;
                 stats->tx_packets = ifd->ifi_opackets;
                 stats->tx_errs = ifd->ifi_oerrors;
-# ifdef HAVE_STRUCT_IF_DATA_IFI_OQDROPS
                 stats->tx_drop = ifd->ifi_oqdrops;
-# else
-                stats->tx_drop = 0;
-# endif
                 stats->rx_bytes = ifd->ifi_ibytes;
                 stats->rx_packets = ifd->ifi_ipackets;
                 stats->rx_errs = ifd->ifi_ierrors;
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux