From nobody Mon May 6 06:19:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536657205683961.6362227086147; Tue, 11 Sep 2018 02:13:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10B92308624A; Tue, 11 Sep 2018 09:13:23 +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 7BB535D9C9; Tue, 11 Sep 2018 09:13:21 +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 C37534BB75; Tue, 11 Sep 2018 09:13:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8B9DGr3010353 for ; Tue, 11 Sep 2018 05:13:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id B62BF30025E5; Tue, 11 Sep 2018 09:13:16 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB0F130025F0 for ; Tue, 11 Sep 2018 09:13:13 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2347307D852 for ; Tue, 11 Sep 2018 09:13:12 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id v17-v6so24878610wrr.9 for ; Tue, 11 Sep 2018 02:13:12 -0700 (PDT) Received: from rolandPC.redhat.com ([213.175.37.12]) by smtp.gmail.com with ESMTPSA id f17-v6sm22046354wrs.1.2018.09.11.02.13.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Sep 2018 02:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=b4EhDSlzkJ8N87JFNLCJUwxpDtAdgo4C7HXwqKBsMv4=; b=gG5f29p2RwQJ9UlWSV5M9kX3iLT1MtXroNgb/MFksN1s592v1D7E1W9/Yn4m6PSyDC Gk0b0nGBxdpbtef33PNjFw+6Km8d5s6c/m8O/TY77ao3sp27ZXU+Mhgt97USvdvGoEj/ gpjuJGHN47q9WmXq1ZCdX3WZMV7jxpATejLR/Pq/6i4K27WcASxwjfU0GCY0qNAcU6Zs dOLeHnYky0gK7XpRugVVak4fifaDC/YKkJAstPMXemuqktYPJPymNNSCMZHJjw1smJd4 Ve/ggfClSGRZ392nrNtC+Y2Dy6/ZgG8AU81VC5FH1490W8akIf9ZtcdSfZpRhoSDbGnn tSow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=b4EhDSlzkJ8N87JFNLCJUwxpDtAdgo4C7HXwqKBsMv4=; b=fg/BbmQk2mi8FeB27tXGMJzpYutlQACTC4zd3YHDwnNjo8SVN/cUzSzybPVMntUFXz MywIjTGdSQTVcME4JWYZCq2RGMN8D7ryNNWsfzBzyXKDN0fTGZil/FpMaXQ87Wy0g7pd ZAOsruK+lYGTZzh6ARUxdIc+uPR9P505nstWCjvhu7H5Q3OKxRvpNlqBiZbRo0fp4OyO WLo+26Z3hZFkItEGsaizaXeXSWXj/qrccDV1bWd5psV5DY1LAXLozaer1bLND2xKkoFH PmceQtWPocYPV6fEqCa/YUhECqdtkWa68ywNs/wWNuQTZC1FHYaCDs41tK9u3tBquOUQ a4Mg== X-Gm-Message-State: APzg51B/CrfMVDAFUMZvtLLgRPC8m2SgtZPNvhPa4ISYv3ApSfa3MFtZ oqK6t17WfDFG6MEJ4eY3c/LU8Y1L X-Google-Smtp-Source: ANB0Vda3ouW7DGpNoaC+c0STF8vMPFLZDvmF7srrwfbF/8kkgVy7kfHaOB2SHMOMFqcJh9agigllcQ== X-Received: by 2002:adf:de85:: with SMTP id w5-v6mr19423358wrl.270.1536657191141; Tue, 11 Sep 2018 02:13:11 -0700 (PDT) From: Roland Schulz To: libvir-list@redhat.com Date: Tue, 11 Sep 2018 11:13:03 +0200 Message-Id: <20180911091303.5606-1-schullzroll@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 11 Sep 2018 09:13:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 11 Sep 2018 09:13:12 +0000 (UTC) for IP:'209.85.221.51' DOMAIN:'mail-wr1-f51.google.com' HELO:'mail-wr1-f51.google.com' FROM:'schullzroll@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.221.51 mail-wr1-f51.google.com 209.85.221.51 mail-wr1-f51.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] qemu: check for vhostusers bandwidth 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 11 Sep 2018 09:13:23 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Vhostuser doesn't support bandwidth and due to backwards compatibility it was decided to just warn users instead of erroring out https://bugzilla.redhat.com/show_bug.cgi?id=3D1524230 Signed-off-by: Roland Schulz --- src/qemu/qemu_command.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ff9589f593..011e2b45af 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8244,6 +8244,8 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver, virQEMUCapsPtr qemuCaps, unsigned int bootindex) { + virNetDevBandwidthPtr actualBandwidth =3D virDomainNetGetActualBandwid= th(net); + virDomainNetType actualType =3D virDomainNetGetActualType(net); virQEMUDriverConfigPtr cfg =3D virQEMUDriverGetConfig(driver); char *chardev =3D NULL; char *netdev =3D NULL; @@ -8257,6 +8259,13 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr drive= r, goto cleanup; } =20 + /* Warn if unsupported bandwidth requested */ + if (actualBandwidth && !virNetDevSupportBandwidth(actualType)) { + VIR_WARN(_("setting bandwidth on interfaces of " + "type '%s' is not implemented yet"), + virDomainNetTypeToString(actualType)); + } + switch ((virDomainChrType)net->data.vhostuser->type) { case VIR_DOMAIN_CHR_TYPE_UNIX: if (!(chardev =3D qemuBuildChrChardevStr(logManager, secManager, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list