From nobody Wed Feb 11 06:00:09 2026 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; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=126.com 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 1629175443441942.2705816461823; Mon, 16 Aug 2021 21:44:03 -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-447-MFiM3wWTO6Gz8uCEa0iXnw-1; Tue, 17 Aug 2021 00:39:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32E081008060; Tue, 17 Aug 2021 04:39:41 +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 0C7B119C44; Tue, 17 Aug 2021 04:39:41 +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 DB43B181A100; Tue, 17 Aug 2021 04:39:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17H4dJ8b016908 for ; Tue, 17 Aug 2021 00:39:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 06CA1201B070; Tue, 17 Aug 2021 04:39:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01BD6201B06E for ; Tue, 17 Aug 2021 04:39:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D928802A64 for ; Tue, 17 Aug 2021 04:39:15 +0000 (UTC) Received: from m15113.mail.126.com (m15113.mail.126.com [220.181.15.113]) by relay.mimecast.com with ESMTP id us-mta-398-fGokorksOFmypctnAbGsBw-1; Tue, 17 Aug 2021 00:39:13 -0400 Received: from zhangjl0200.home.langchao.com (unknown [58.56.96.27]) by smtp3 (Coremail) with SMTP id DcmowAAX7FtqPRthCBo2AQ--.7384S3; Tue, 17 Aug 2021 12:39:09 +0800 (CST) X-MC-Unique: MFiM3wWTO6Gz8uCEa0iXnw-1 X-MC-Unique: fGokorksOFmypctnAbGsBw-1 From: jx8zjs To: libvir-list@redhat.com Subject: [PATCHv2 1/6] virnetdevovs: Add vmuuid notes on virNetDevOpenvswitchInterfaceSetQos Date: Tue, 17 Aug 2021 12:38:11 +0800 Message-Id: <20210817043816.1109-2-jx8zjs@126.com> In-Reply-To: <20210817043816.1109-1-jx8zjs@126.com> References: <20210817043816.1109-1-jx8zjs@126.com> MIME-Version: 1.0 X-CM-TRANSID: DcmowAAX7FtqPRthCBo2AQ--.7384S3 X-Coremail-Antispam: 1Uf129KBjvJXoWxXryfuFW5Jr4fXFWkurW8Xrb_yoW5Xw4xpr WkKFyDJw10kr13W3WDCF40gr1Utry8Gr1Skas8Zay7Zr4DXr9aqw43K3y2yay5ur4xJ3Wr AFZ5WrykAa4IyFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j4xRfUUUUU= X-Originating-IP: [58.56.96.27] X-CM-SenderInfo: dm0y6ybv6rjloofrz/1tbiFw3xSFpEB8NtbAAAs4 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: shenjiatong@inspur.com, zhangjl02@inspur.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.23 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-ZM-MESSAGEID: 1629175443865100001 Content-Type: text/plain; charset="utf-8" From: Jinsheng Zhang Add vmuuid notes on virNetDevOpenvswitchInterfaceSetQos, and change vmid to vmuuid. Signed-off-by: Jinsheng Zhang --- src/util/virnetdevopenvswitch.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 7a64a8dbe6..d86ad0eafd 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -624,6 +624,7 @@ int virNetDevOpenvswitchUpdateVlan(const char *ifname, * virNetDevOpenvswitchInterfaceSetQos: * @ifname: on which interface * @bandwidth: rates to set (may be NULL) + * @vmuuid: the Domain UUID that has this interface * @swapped: true if IN/OUT should be set contrariwise * * Update qos configuration of an OVS port. @@ -640,7 +641,7 @@ int virNetDevOpenvswitchUpdateVlan(const char *ifname, int virNetDevOpenvswitchInterfaceSetQos(const char *ifname, const virNetDevBandwidth *bandwidth, - const unsigned char *vmid, + const unsigned char *vmuuid, bool swapped) { virNetDevBandwidthRate *rx =3D NULL; /* From domain POV */ @@ -674,7 +675,7 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname, } =20 if (!bandwidth->out && !bandwidth->in) { - if (virNetDevOpenvswitchInterfaceClearQos(ifname, vmid) < 0) { + if (virNetDevOpenvswitchInterfaceClearQos(ifname, vmuuid) < 0) { VIR_WARN("Clean qos for interface %s failed", ifname); } return 0; @@ -699,7 +700,7 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname, =20 /* find queue */ cmd =3D virNetDevOpenvswitchCreateCmd(); - virUUIDFormat(vmid, vmuuidstr); + virUUIDFormat(vmuuid, vmuuidstr); vmid_ex_id =3D g_strdup_printf("external-ids:vm-id=3D\"%s\"", vmuu= idstr); ifname_ex_id =3D g_strdup_printf("external-ids:ifname=3D\"%s\"", i= fname); virCommandAddArgList(cmd, "--no-heading", "--columns=3D_uuid", "fi= nd", "queue", @@ -801,7 +802,7 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname, =20 int virNetDevOpenvswitchInterfaceClearQos(const char *ifname, - const unsigned char *vmid) + const unsigned char *vmuuid) { char vmuuidstr[VIR_UUID_STRING_BUFLEN]; g_autoptr(virCommand) cmd =3D NULL; @@ -813,7 +814,7 @@ virNetDevOpenvswitchInterfaceClearQos(const char *ifnam= e, =20 /* find qos */ cmd =3D virNetDevOpenvswitchCreateCmd(); - virUUIDFormat(vmid, vmuuidstr); + virUUIDFormat(vmuuid, vmuuidstr); vmid_ex_id =3D g_strdup_printf("external-ids:vm-id=3D\"%s\"", vmuuidst= r); virCommandAddArgList(cmd, "--no-heading", "--columns=3D_uuid", "find",= "qos", vmid_ex_id, NULL); virCommandSetOutputBuffer(cmd, &qos_uuid); --=20 2.30.2.windows.1