From nobody Sat May 4 00:37:36 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=1599215007; cv=none; d=zohomail.com; s=zohoarc; b=iFPd7PDvW5t8rwyOuXty3hZu/OUDiaq5Z/8a1gZpqXUYfjSUcs8lgILkmrPbaGVwETtxxoCZ0gP60samt6i5dB7ntIAVvGlQng0lu4c4zHAyYPM3qMzoMEzqEK3OEX4+8cWWlvqC51mrlGlFXAtUXxZHrsTsN3ROS/st2606LzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599215007; 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=VkjIG26XVX0BGE2NXRr5gV9PkQ+d3SFkwnqRe5eYrGw=; b=QPt1sRCYXyBq7ZevC9UJx8h2dcSPpy/uWYs2J8UrkVREPrpYvFwYVwLdpAuKyvx7bT4AlCXxyUixNiHre/3O7RRiuUHlHarW7v6M19BuqSSG39HRzrdksYz6YnOGZQnA/Kg//UjUg4OI34l2ifZnXa7QEjZlkQC0KNHKEbJf4tQ= 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 1599215007494218.24756499313128; Fri, 4 Sep 2020 03:23:27 -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-21-Q5gt6Jo3MNyRlsDQOhhTmA-1; Fri, 04 Sep 2020 06:23:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67FB31DDE8; Fri, 4 Sep 2020 10:23:15 +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 3934110013D7; Fri, 4 Sep 2020 10:23:12 +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 32C561832FC2; Fri, 4 Sep 2020 10:23:10 +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 084AK5Po013834 for ; Fri, 4 Sep 2020 06:20:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7F7695C269; Fri, 4 Sep 2020 10:20:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-114-5.ams2.redhat.com [10.36.114.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8F9D5C22D; Fri, 4 Sep 2020 10:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599215004; 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=VkjIG26XVX0BGE2NXRr5gV9PkQ+d3SFkwnqRe5eYrGw=; b=LV3h1oEOq7DnPMY3Adr9XCTuMAmlEJnwvRwnezvCLUcRS1ME27Y0IP6fJFyb0105PHXKRi ZqFD9cXtjknExMKTaBVp7EXcKhJTulOz2F+4YSK42qtGBFpYYeye1GFayb7h55eQdzc1vy FLwdWI0CQwsaQw4OEjSgCGHWh7kvuRw= X-MC-Unique: Q5gt6Jo3MNyRlsDQOhhTmA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [PATCH] util: re-add conditional for ifi_iqdrops field for macOS Date: Fri, 4 Sep 2020 11:19:57 +0100 Message-Id: <20200904101957.734173-1-berrange@redhat.com> 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.84 on 10.5.11.22 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) The conditional was removed in commit ebbf8ebe4fa6f9d43b40673f0f2dad6bf50e2085 Author: J=C3=A1n Tomko Date: Tue Sep 1 22:56:37 2020 +0200 util: virnetdevtap: stats: fix txdrop on FreeBSD That commit was correct about this no longer being required for FreeBSD, but missed that the code is also built on macOS. Rather than testing for this field in meson though, we can simply use a platform conditional test in the code. Signed-off-by: Daniel P. Berrang=C3=A9 --- Pushed to fix macOS CI build jobs src/util/virnetdevtap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index cc6f254aa1..ab5959c646 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -974,12 +974,20 @@ 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; +# ifndef __APPLE__ 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; +# ifndef __APPLE__ 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