From nobody Sat Apr 27 04:55:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574438957; cv=none; d=zohomail.com; s=zohoarc; b=gKvDEI8gGsbGdm+ov2Hhk38ue4GYUc+xQAxAVNVR7pm2QHjROq6xEpEKlDRwCw1v2UO6NNg5Y/aQOWL6jcF0WMj5yTp1dkhrcvjv14SVCPQSvuV8j2rrTQU7V4ZBpNDsyxJkSpi4UPikIdf/bwJAsdCEKTlSQTqj8Vs4l5yLXNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574438957; h=Content-Type:Content-Transfer-Encoding:Cc: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=brQF5ihmikT2WHX8URyoMITmXbQropeS1aKa5j12iOo=; b=bi2YKIkJMpEzj0lnYSLg+vXqqJOBHT1VQpKkNpmF13PBmIXO5cbIOLQm5NnDWkwYyKw5TiDYqYxGBfnWeF4YpCKO+kOpIQhUBuW3YEcUDbctNXhB7ZQA8scXwEnynhK9aaUHN1UjOzgNRFqvBlQne3RBeIdK46pXLEkteJ2NlRA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574438957630910.8756856105249; Fri, 22 Nov 2019 08:09:17 -0800 (PST) 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-30-SgJ5lTkPMq63R-WxayZX4A-1; Fri, 22 Nov 2019 11:09:15 -0500 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 46D5018B5F6C; Fri, 22 Nov 2019 16:09:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C033176FFF; Fri, 22 Nov 2019 16:09:06 +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 7E6FD4BB78; Fri, 22 Nov 2019 16:09:04 +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 xAMG938K022324 for ; Fri, 22 Nov 2019 11:09:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1B82362675; Fri, 22 Nov 2019 16:09:03 +0000 (UTC) Received: from ridgehead.redhat.com (ovpn-204-123.brq.redhat.com [10.40.204.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60E9963BC6; Fri, 22 Nov 2019 16:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574438956; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=brQF5ihmikT2WHX8URyoMITmXbQropeS1aKa5j12iOo=; b=IDDA0nqCu7nska/xPUKtz/r0dHlPuNlb9gZgkqHj4jc9fE9g1GXOS3Gi579fH1TiST26Jf 7w7Vqj0BmkMTbF3Jrym5Uwl28wzpBuN2wn53nkfeTH0B6syk5sdzlUJ0+UTIKReBTHAN4Z qnnHL3tztZXZiTaTAcOzSyG6It6Gx4M= From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 22 Nov 2019 17:08:59 +0100 Message-Id: <858509d5d1d3a31363975f0f5f545bcd5d8c8d12.1574438915.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 1/2] Revert "network: Check for QOS before blindly using it" 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 X-MC-Unique: SgJ5lTkPMq63R-WxayZX4A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This reverts commit f4db846c32c0a1e99a0f62b340273e48f8a98ed3. This patch results in the following error when trying to start essentially any VM with default network: unsupported configuration: QOS must be defined for network 'default' Coverity didn't see that the bandwidth =3D=3D NULL it complained about in virNetDevBandwidthPlug was already checked properly in networkCheckBandwidth, thus causing networkPlugBandwidth to return 0 and finish before a call to virNetDevBandwidthPlug would have been even made. Signed-off-by: Erik Skultety Reviewed-by: Daniel Henrique Barboza Reviewed-by: Jiri Denemark Reviewed-by: Michal Privoznik --- src/network/bridge_driver.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 9c49c70564..68bb916501 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -4567,13 +4567,6 @@ networkAllocatePort(virNetworkObjPtr obj, return -1; } =20 - if (!port->bandwidth) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("QOS must be defined for network '%s'"), - netdef->name); - return -1; - } - if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->= class_id) < 0) return -1; break; @@ -4640,13 +4633,6 @@ networkAllocatePort(virNetworkObjPtr obj, } } =20 - if (!port->bandwidth) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("QOS must be defined for network '%s'"), - netdef->name); - return -1; - } - if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &po= rt->class_id) < 0) return -1; break; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 04:55:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1574438968; cv=none; d=zohomail.com; s=zohoarc; b=bv0/SljL9opXBtR/lc3+XHf6SkCGKvz2nTYyaKL0fVJOe7Cas2piluhp6W8nK6+Q4cESITGQusQHfi2ZnBr3oNVA5nCGghPUspqCAcZoexlHglqlUhxPI27yRVLynDlGm2AmP6kmDKmGV68jLAkeDdJP8Z43Mq0b9STo0++f528= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574438968; h=Content-Type:Content-Transfer-Encoding:Cc: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=Zkwjx3tnkAdk7TACpk1ipKFONhB6U4jW5MnZ8LEPoS0=; b=fJcjDCTzsYGxBjnNk0qrRLo0389PnvaZuHFsNBc8YrIhSCHL7+IyONq6ZNhPRRSaDJUMoWlcMkqr7cKeGuOwYdaDIKgplBvAKjFM7vIRN2kJX+ztWVkwzOAbEtRii6QgN/qn0dvlYhcjjVoRKsFh0u5Zz6ZuRMaF9S9TsHjXzvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1574438968438475.1610806279982; Fri, 22 Nov 2019 08:09:28 -0800 (PST) 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-179-Uvi6WOOvM4Cn1RFgx7c4yw-1; Fri, 22 Nov 2019 11:09:25 -0500 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 EF8A6DB67; Fri, 22 Nov 2019 16:09:18 +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 A1F2063742; Fri, 22 Nov 2019 16:09:18 +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 1C8C218089C8; Fri, 22 Nov 2019 16:09:18 +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 xAMG94ob022331 for ; Fri, 22 Nov 2019 11:09:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 293C31CC; Fri, 22 Nov 2019 16:09:04 +0000 (UTC) Received: from ridgehead.redhat.com (ovpn-204-123.brq.redhat.com [10.40.204.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E9DE62675; Fri, 22 Nov 2019 16:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574438967; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Zkwjx3tnkAdk7TACpk1ipKFONhB6U4jW5MnZ8LEPoS0=; b=fOuwHUzxkHfvqiYZGomVxVef/zZiKZzfUysUdpU9ulT4AWfb1/8KqLa4ju1rEpshAe8LP6 yl0CShWVs0p+Q6ervQOldRqqXoCyipzqZU7K6wQxJ5YxshF6b5uii7JUhA/WMhpSA3oqAu ske4ZcBLHxTkZQ9BnmXinVAHsyvjQ8k= From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 22 Nov 2019 17:09:00 +0100 Message-Id: <28eb6be1b96bec036a4f05e254c54dce6a8a9822.1574438915.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/2] util: virNetDevBandwidthPlug: Drop ATTRIBUTE_UNUSED(4) 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 X-MC-Unique: Uvi6WOOvM4Cn1RFgx7c4yw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Since we know for sure that the @bandwidth parameter is properly handled in networkCheckBandwidth (@ifaceBand), it cannot ever be NULL, but coverity doesn't see this fact. In order to prevent coverity from reporting a false positive here, drop ATTRIBUTE_UNUSED for this specific argument - virNetDevBandwidthPlug is also called from a single place only Signed-off-by: Erik Skultety Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik --- src/util/virnetdevbandwidth.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index 19323c5ed2..59d7513286 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -55,8 +55,7 @@ int virNetDevBandwidthPlug(const char *brname, const virMacAddr *ifmac_ptr, virNetDevBandwidthPtr bandwidth, unsigned int id) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) - G_GNUC_WARN_UNUSED_RESULT; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; =20 int virNetDevBandwidthUnplug(const char *brname, unsigned int id) --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list