From nobody Mon Nov 25 15:27:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1601507826; cv=none; d=zohomail.com; s=zohoarc; b=b6ogyySLKsONLLMMvpFhLGBXAPLy/E9iIOKKHxW/O6COl3GbTPx+fAaJF+Oa7n/Vs/rxWsQRLr7YxlhW/cZ2FJWbjKci8XN4lOFvdqeSH5foKu2Z/wGlzo5ogPaMijBOSLdkapQaT05yss+tWJUb8fvfoUTkIEivM52V66EUR0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601507826; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Iw+7lvTwzWgygI2w0vvSVJSNL1Fik6pG4YyXv8RiEJ0=; b=SqZEJLo7fiDEMt3uaKMneL1725HwVUwySlaXHDr+yulls2dERAuDSo5twiqIae/MfYXkF82gr5nWuh1fOVrYubQE9K7C682pt9UfAA1RSly3bKeRqlL4V0lbQLHAoSuTDz+wEIrmCr91D50H5CHs7sxN9yyuGxMV9jrK8FMUr3A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 160150782685833.52443455560831; Wed, 30 Sep 2020 16:17:06 -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-238-i_jS0CHQN9O30McExIKWeA-1; Wed, 30 Sep 2020 19:17:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 78F0F1DE00; Wed, 30 Sep 2020 23:16:58 +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 57ADD5C1CF; Wed, 30 Sep 2020 23:16:58 +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 263C0183D026; Wed, 30 Sep 2020 23:16:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08UNEqj4028003 for ; Wed, 30 Sep 2020 19:14:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3B5E73782; Wed, 30 Sep 2020 23:14:52 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-224.phx2.redhat.com [10.3.112.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id E969A5578A for ; Wed, 30 Sep 2020 23:14:51 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601507825; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Iw+7lvTwzWgygI2w0vvSVJSNL1Fik6pG4YyXv8RiEJ0=; b=NxX2WDSlTXWv5JoyTvOXmUQ20Q3a4G0cB8LCT+COVwOQcoRSsZglh2KHC/IGAvIXcahRzm GQVuaYgGvCH5ioqtep8LMVWLT6odjv2s+HYE8Fbb0pL8I2wHd2Rnv9xKz3Q205RBnTEEs5 JlpaF4gVkb63rje3cAJcA0gP8nKrnI0= X-MC-Unique: i_jS0CHQN9O30McExIKWeA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 3/9] build: eliminate useless WITH_VIRTUALPORT check Date: Wed, 30 Sep 2020 19:14:38 -0400 Message-Id: <20200930231444.409215-4-laine@redhat.com> In-Reply-To: <20200930231444.409215-1-laine@redhat.com> References: <20200930231444.409215-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" WITH_VIRTUALPORT just checks that we are building on Linux and that IFLA_PORT_MAX is defined in linux/if_link.h. Back when 802.11Qb[gh] support was added, the IFLA_* stuff was new (introduced in kernel 2.6.35, backported to RHEL6 2.6.32 kernel at some point), and so this extra check was necessary, because libvirt was being built on Linux distros that didn't yet have IFLA_* (e.g. older RHEL6, all RHEL5). It's been in the kernel for a *very* long time now, so all supported versions of all Linux platforms libvirt builds on have it. Note that the above paragraph implies that the conditional compilation should be changed to #if defined(__linux__). However, the astute reader will notice that the code in question is sending and receiving netlink messages, so it really should be conditional on WITH_LIBNL (which implies __linux__) instead, so that's what this patch does. Signed-off-by: Laine Stump --- meson.build | 8 -------- src/util/virnetdevvportprofile.c | 8 ++++---- tools/virsh.c | 3 --- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 2e57a435df..073ea6d49e 100644 --- a/meson.build +++ b/meson.build @@ -1386,14 +1386,6 @@ endif =20 util_dep =3D cc.find_library('util', required: false) =20 -if not get_option('virtualport').disabled() - if cc.has_header_symbol('linux/if_link.h', 'IFLA_PORT_MAX') - conf.set('WITH_VIRTUALPORT', 1) - elif get_option('virtualport').enabled() - error('Installed linux headers don\'t show support for virtual port su= pport.') - endif -endif - if host_machine.system() =3D=3D 'windows' ole32_dep =3D cc.find_library('ole32') oleaut32_dep =3D cc.find_library('oleaut32') diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index 020683fa04..5dae8aa57d 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -46,7 +46,7 @@ VIR_ENUM_IMPL(virNetDevVPortProfileOp, "no-op", ); =20 -#if WITH_VIRTUALPORT +#if defined(WITH_LIBNL) =20 # include =20 @@ -454,7 +454,7 @@ int virNetDevVPortProfileMerge3(virNetDevVPortProfilePt= r *result, } =20 =20 -#if WITH_VIRTUALPORT +#if defined(WITH_LIBNL) =20 static struct nla_policy ifla_port_policy[IFLA_PORT_MAX + 1] =3D { @@ -1343,7 +1343,7 @@ virNetDevVPortProfileDisassociate(const char *macvtap= _ifname, return rc; } =20 -#else /* ! WITH_VIRTUALPORT */ +#else /* !WITH_LIBNL */ int virNetDevVPortProfileAssociate(const char *macvtap_ifname G_GNUC_UNUSE= D, const virNetDevVPortProfile *virtPort G= _GNUC_UNUSED, const virMacAddr *macvtap_macaddr G_GNU= C_UNUSED, @@ -1369,4 +1369,4 @@ int virNetDevVPortProfileDisassociate(const char *mac= vtap_ifname G_GNUC_UNUSED, _("Virtual port profile association not supported= on this platform")); return -1; } -#endif /* ! WITH_VIRTUALPORT */ +#endif /* !WITH_LIBNL */ diff --git a/tools/virsh.c b/tools/virsh.c index ac9b7ad238..954778b626 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -548,9 +548,6 @@ virshShowVersion(vshControl *ctl G_GNUC_UNUSED) #endif #ifdef WITH_NWFILTER vshPrint(ctl, " Nwfilter"); -#endif -#ifdef WITH_VIRTUALPORT - vshPrint(ctl, " VirtualPort"); #endif vshPrint(ctl, "\n"); =20 --=20 2.26.2