From nobody Thu May 2 01:00:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598994913; cv=none; d=zohomail.com; s=zohoarc; b=kB6IfHkH/CtUtXpIbkzrgqScHg8PL2JDe4PW4sVZIuTwbDjLm4U+XlUfkRxAgCZz1IPouk1R0jk80YLk3ft8Jj53gU/9pzc18gJti2gTN1V41ic2m4nxuEZgjnFYCmNba4tR2Y3SMKKLtvUqs24ITBspEyOvsK3/4Gd0I8p+IR0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598994913; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=saHbzXnrVGxewHKTfEzwkzuWpGyKO6WS7l5XWert37g=; b=gU3us9WCfITNy4+v0+P8qBBKgr2T2k9814FgN1X6Xn6ZPBape8ad5O5TZQ/k1kWubF38Sn6gWCsAyH07NKwq/KPRzb69Ae3GfKDQqJaVhDY+WJ+s0d/oFfv9KnWjPEe8yq16PErtr63uDtdHQ5Qc4tFRLXB7oXkWPcpTDY0YdOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1598994913986578.8919455016752; Tue, 1 Sep 2020 14:15:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-_yd-VYhgNhGvtprkGcgB6Q-1; Tue, 01 Sep 2020 17:15:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B468110ABDA1; Tue, 1 Sep 2020 21:15:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5AC0D7EEA3; Tue, 1 Sep 2020 21:15:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6BFF5183D020; Tue, 1 Sep 2020 21:14:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 081LCIW6032686 for ; Tue, 1 Sep 2020 17:12:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 19FFD5C1C4; Tue, 1 Sep 2020 21:12:18 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8350A5C1BB for ; Tue, 1 Sep 2020 21:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598994913; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=saHbzXnrVGxewHKTfEzwkzuWpGyKO6WS7l5XWert37g=; b=RbGT4oNTZK+GJ30SFJhXItsOBlYCdqvBTbAaz5YoogQB+K/1JtNFBlLczPEZIVRXv1V/Xr r10OpS6o33kUf3nGhlc/aWVCTo9KXzFi0uWU0oHtZYEhYj2ETq/hA8vBw2l4TBpSxe3QE6 xI4kBGZQmziQiDmV7MEAkxLY8kAPivk= X-MC-Unique: _yd-VYhgNhGvtprkGcgB6Q-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] util: virnetdevtap: stats: fix txdrop on FreeBSD Date: Tue, 1 Sep 2020 23:12:12 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A1n Tomko Fixes: 83131d9714db7ee77ab220186b6b0d8b6c22b09e Reviewed-by: Roman Bogorodskiy --- 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 =3D ifd->ifi_obytes; stats->rx_packets =3D ifd->ifi_opackets; stats->rx_errs =3D ifd->ifi_oerrors; -# ifdef HAVE_STRUCT_IF_DATA_IFI_OQDROPS stats->rx_drop =3D ifd->ifi_oqdrops; -# else - stats->rx_drop =3D 0; -# endif } else { stats->tx_bytes =3D ifd->ifi_obytes; stats->tx_packets =3D ifd->ifi_opackets; stats->tx_errs =3D ifd->ifi_oerrors; -# ifdef HAVE_STRUCT_IF_DATA_IFI_OQDROPS stats->tx_drop =3D ifd->ifi_oqdrops; -# else - stats->tx_drop =3D 0; -# endif stats->rx_bytes =3D ifd->ifi_ibytes; stats->rx_packets =3D ifd->ifi_ipackets; stats->rx_errs =3D ifd->ifi_ierrors; --=20 2.26.2