From nobody Sun Feb 8 09:41:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1642437664; cv=none; d=zohomail.com; s=zohoarc; b=CQCqOQkJuygoBjqj3dP7jmGqoC/BWjCXO2PJT5ui/XgHS/v7011WVC3Y73sVcLenQAwFlyTIVnU6M0tTEl0bfq7r7j6OjCc5c6LxOYg/22B2DqGPuABaHvlphchqdHHTeWpxg1bTTrTB0gFNVm0+tYEH3Bsqf03rHcvjqE6/SEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642437664; 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=Yp4styILA/+5wgHDZZ5aPRR8NPIKvkZle5BYd/4UBFU=; b=mqpSFufb866LvnFs9g2rvUb831dDY4+/4GiUQCtojwe+4Vjlfn9xv4VnKZfCe+2NeyPJRdhaJaT8Sjv3MSFi7Zh6snZX1fp0IMGA3kjzAvJGSdoGyxowCi5ZO7dVfWOjTqZhDN0cykrFXFIwXbMp8V9Lt0uqU9TN1mtHqKSDeM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16424376642011020.1900741396076; Mon, 17 Jan 2022 08:41:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-111-suO_FBZ-M5S3tO7txrqxqQ-1; Mon, 17 Jan 2022 11:41:01 -0500 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 A54FB876ED0; Mon, 17 Jan 2022 16:40:52 +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 66AC74DC0C; Mon, 17 Jan 2022 16:40:52 +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 015BE4A7CB; Mon, 17 Jan 2022 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HGenqN006712 for ; Mon, 17 Jan 2022 11:40:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 21ABF10A48CB; Mon, 17 Jan 2022 16:40:49 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A09D610A48CA for ; Mon, 17 Jan 2022 16:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642437663; 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=Yp4styILA/+5wgHDZZ5aPRR8NPIKvkZle5BYd/4UBFU=; b=PK38/Qsiip39TIRmRjYV8xL8wWmIu3Dk18UuEV67KFgIqp8ivVtvR5tSUdQgcR3KQmQxy9 YMNR6ivShY1eH9LM1eN7FvU4gwu0czcQskfFdUH1wJbxy6CvEMiXyV4fWqW00aQ8zZcn7B xYwIDY4jVt3MZhb0MAoHtXGrpLGQgiU= X-MC-Unique: suO_FBZ-M5S3tO7txrqxqQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 5/6] util: openvswitch: do not reuse cmd in InterfaceSetTxQos Date: Mon, 17 Jan 2022 17:40:23 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642437666248100001 Signed-off-by: J=C3=A1n Tomko --- src/util/virnetdevopenvswitch.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 32f423ef04..a5180e5843 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -814,19 +814,18 @@ virNetDevOpenvswitchInterfaceSetTxQos(const char *ifn= ame, =20 if (qos_uuid && *qos_uuid) { g_auto(GStrv) lines =3D g_strsplit(qos_uuid, "\n", 0); + g_autoptr(virCommand) qoscmd =3D virNetDevOpenvswitchCreateCmd(); =20 - virCommandFree(cmd); - cmd =3D virNetDevOpenvswitchCreateCmd(); - virCommandAddArgList(cmd, "set", "qos", lines[0], NULL); - virCommandAddArgFormat(cmd, "other_config:min-rate=3D%s", average); + virCommandAddArgList(qoscmd, "set", "qos", lines[0], NULL); + virCommandAddArgFormat(qoscmd, "other_config:min-rate=3D%s", avera= ge); if (burst) { - virCommandAddArgFormat(cmd, "other_config:burst=3D%s", burst); + virCommandAddArgFormat(qoscmd, "other_config:burst=3D%s", burs= t); } if (peak) { - virCommandAddArgFormat(cmd, "other_config:max-rate=3D%s", peak= ); + virCommandAddArgFormat(qoscmd, "other_config:max-rate=3D%s", p= eak); } - virCommandAddArgList(cmd, vmid_ex_id, ifname_ex_id, NULL); - if (virCommandRun(cmd, NULL) < 0) { + virCommandAddArgList(qoscmd, vmid_ex_id, ifname_ex_id, NULL); + if (virCommandRun(qoscmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to set qos configuration on port %s")= , ifname); return -1; --=20 2.31.1