From nobody Mon Nov 25 15:53:59 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=1601507824; cv=none; d=zohomail.com; s=zohoarc; b=k7pFyiF5SYhkCdUtrNdORG/V0ai3G7JB1JPETtY7JGqz3xIaGZhhuxhmoUI2LlFXbKHDY1g6MegnFdkVUvdmWgcZN/Kx94nvRe3VtaUMr6lRyjgkEwKi/Kqy5+MplZoWXwj8qDRNHfimL8DSwK+vv/c0NWmx4HbrkxrwPxmJDU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601507824; 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=Lm48+PgwWsXnn+ALbMRS/shSx/xUXec2Diyi3mwZ1LQ=; b=O44s94zORgxsnAKuHyaO+TOHTb8P2ZEXdprvAT5kTBLve2jf7vK6XqmgAGqqJRnC1ohgvP3Wi9M+gjfpUlR+ZIquHbjWdZgv9Mlltolz74JiUqKiLxsI9Ws1qiF4aYtv3Ob7qQ1cfkCy+1gB2UJ+do9I4sRwUk0BaoHXlJG9pXg= 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 1601507824074922.0668813457813; Wed, 30 Sep 2020 16:17:04 -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-27-A4h5QIlsM_q1i0rjIJGzGA-1; Wed, 30 Sep 2020 19:17:00 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7946C1DE0B; Wed, 30 Sep 2020 23:16:54 +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 57F745578D; Wed, 30 Sep 2020 23:16:54 +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 24862183D022; Wed, 30 Sep 2020 23:16:54 +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 08UNEpGF027989 for ; Wed, 30 Sep 2020 19:14:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4702455762; Wed, 30 Sep 2020 23:14:51 +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 00F1D3782 for ; Wed, 30 Sep 2020 23:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601507822; 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=Lm48+PgwWsXnn+ALbMRS/shSx/xUXec2Diyi3mwZ1LQ=; b=A56K1yLwiN22teDrarO+WroBdiiGil0myAtFw36HSm1JhHKExEZ2xwHHS+7M+zdiyhr7lj RW67hI2qkas9wo8s5B4VuN0jd5j+ilzQPdVzSCom8O2JLbc446zta2TF8JLrbeY++RpO7M Yf8ALl9Y7qoll+6W+dMAuscOLlJ52ew= X-MC-Unique: A4h5QIlsM_q1i0rjIJGzGA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 1/9] util: remove useless check for IFLA_VF_MAX Date: Wed, 30 Sep 2020 19:14:36 -0400 Message-Id: <20200930231444.409215-2-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.15 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" IFLA_VF_MAX was introduced to the Linux kernel in 2.6.35, and was even backported to the RHEL*6* 2.6.32 kernel downstream, so it is present in all supported versions of all Linux distros that libvirt builds on. Additionally, it can't be conditionally compiled out of a kernel. There is no reason to conditionalize any piece of code on presence of IFLA_VF_MAX - if the platform is Linux, it is supported. Signed-off-by: Laine Stump --- src/util/virnetdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index e1a4cc2bef..07208a1876 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -1473,7 +1473,7 @@ virNetDevSysfsFile(char **pf_sysfs_device_link G_GNUC= _UNUSED, =20 =20 #endif /* !__linux__ */ -#if defined(__linux__) && defined(WITH_LIBNL) && defined(IFLA_VF_MAX) +#if defined(__linux__) && defined(WITH_LIBNL) =20 =20 static virMacAddr zeroMAC =3D { .addr =3D { 0, 0, 0, 0, 0, 0 } }; @@ -2266,7 +2266,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf, } =20 =20 -#else /* defined(__linux__) && defined(WITH_LIBNL) && defined(IFLA_VF_MAX= ) */ +#else /* defined(__linux__) && defined(WITH_LIBNL) */ =20 =20 int @@ -2309,7 +2309,7 @@ virNetDevSetNetConfig(const char *linkdev G_GNUC_UNUS= ED, } =20 =20 -#endif /* defined(__linux__) && defined(WITH_LIBNL) && defined(IFLA_VF_MAX= ) */ +#endif /* defined(__linux__) && defined(WITH_LIBNL) */ =20 VIR_ENUM_IMPL(virNetDevIfState, VIR_NETDEV_IF_STATE_LAST, --=20 2.26.2