From nobody Tue Nov 26 07:23:30 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=fail(p=none dis=none) header.from=ixsystems.com ARC-Seal: i=1; a=rsa-sha256; t=1582353672; cv=none; d=zohomail.com; s=zohoarc; b=Wr14HtoYmaIhnLCCFwkNTYphj0n/HJf56uEp1NzAvIs+17RJHo7OU8XtPSRkTCtSnneLygWiVsvbGZSwIslWiSm+qAhoHXJvTrRfKZmBxWyHLfC4N6cjxL7NrH77ba8dbRjX6WxgrsdvBFwrfrkSolfKkyIhyCd2DBuPmp1LTUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582353672; 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=aWE8/ZnHZR8MlzA0CC9WI4D0HudxGJ/bNvOMtXO3qkI=; b=BZNlKHelBN49ZcZ36FaLaTwydHYnGvKQS0t5Aq6NDd8vkdqq5S9tVgjM4PL7vRnhwuxEA9K0ACgQAX8hG9pumJMp0PEXbRYGZFH2ra6yNzRxpBGkLFtcPV+heoN331m9guYzqh3CzGITqxtGmILWNgVDDpLK6nENneg//eOy/9Q= 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=fail 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 1582353672381903.6093332642479; Fri, 21 Feb 2020 22:41:12 -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-207-xmCLqeWQMsGmIngqRRfs7g-1; Sat, 22 Feb 2020 01:41:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BF93107ACCD; Sat, 22 Feb 2020 06:41:01 +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 1FA3760C99; Sat, 22 Feb 2020 06:41:01 +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 C90B018089CE; Sat, 22 Feb 2020 06:41:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M6e0Qr021810 for ; Sat, 22 Feb 2020 01:40:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3DCE01032530; Sat, 22 Feb 2020 06:40:00 +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 390911032523 for ; Sat, 22 Feb 2020 06:39:59 +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-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F110800313 for ; Sat, 22 Feb 2020 06:39:59 +0000 (UTC) Received: from mail-yw1-f67.google.com (mail-yw1-f67.google.com [209.85.161.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36--cmZ5_-EPMaHtRDefB22Xw-1; Sat, 22 Feb 2020 01:39:57 -0500 Received: by mail-yw1-f67.google.com with SMTP id h126so2638608ywc.6 for ; Fri, 21 Feb 2020 22:39:57 -0800 (PST) Received: from xeon-freebsd.freqlabs.com. (69-228-200-148.lightspeed.knvltn.sbcglobal.net. [69.228.200.148]) by smtp.gmail.com with ESMTPSA id c84sm2482131ywa.1.2020.02.21.22.39.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 22:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582353671; 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=aWE8/ZnHZR8MlzA0CC9WI4D0HudxGJ/bNvOMtXO3qkI=; b=RO0MxccCEyjjcxzQBd6pc8LomdH4f/8zX2OJ2MfYgma2Rud/maWPAPO0ZCIZu862Z3n7gA x/Z5YjUVYK9IBCdRxL1eofcCKuSncnNE/rBBj9vke1M5Aw+XywLpKOaA9P7DVFI19p7BHa MR3sdpEWSz9+fM9r5PZMLelVpTR6pKE= X-MC-Unique: xmCLqeWQMsGmIngqRRfs7g-1 X-MC-Unique: -cmZ5_-EPMaHtRDefB22Xw-1 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=vFN3zFwCvozzmghGxS+Og86Nz8uVQoujAylproiYdns=; b=bECu+khLv6szzaybfQiKNduhSr/uPRJMTmP4nDAAwO9IGvuk3FDxS/MMhFxThQvrVo ms5Usovlezbv0fGbyb7Juk/r+QrLR/U1MvCrO2wAIucLDppA3Q/IFnsD3WnhLPyf/p/W 9zbkKroSGvCXt234TY3kkQ4OIqYuiaZxdzf7tLnzxgl55KxiMye6+ti9gjS+x9tHpVOH qQGoMvESiLFIgrNTJV/MVJKtf2cPsKtkgqKQU7i7r+k/fuSqCdVSLF3zqcBdrzuKrf4P ClYGYEIjIlST6s/PphK633bkbqUJY3PQjGIM0QVAf5pP+bJSZaHxzx2wmB9G9CenDMPs 2nHw== X-Gm-Message-State: APjAAAXhpts5qdBQYgUsOCEueAsfZVtyyZDLe9ftXO9XTbfyXFW43CCw oWHTk1MJoB1HXURZZYpGz5Tx1Ljfe9EJgsNBjEtW14RcMOgnMLKqRuteMzmNHz2u+gPZ3LsajEY ml/IAeM/pS2LMx1dGNY0e/5q8sriJssnkRcjmpTmwi6dReHoV3eeylbz2AIgGCDb7Pc0= X-Google-Smtp-Source: APXvYqxi8xhexYv2yz4VLiWQXpmPlZWoKl/ALUHCatfZkuSakyuDy/VvVXzOWTf1jr+P51MGieCcbQ== X-Received: by 2002:a25:e755:: with SMTP id e82mr40163127ybh.365.1582353596348; Fri, 21 Feb 2020 22:39:56 -0800 (PST) From: Ryan Moeller X-Google-Original-From: Ryan Moeller To: libvir-list@redhat.com Subject: [PATCH 13/16] Reorder slot,bus,func -> bus,slot,func in parsers Date: Sat, 22 Feb 2020 01:38:52 -0500 Message-Id: <20200222063855.89637-14-ryan@iXsystems.com> In-Reply-To: <20200222063855.89637-1-ryan@iXsystems.com> References: <20200222063855.89637-1-ryan@iXsystems.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 01M6e0Qr021810 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.12 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" This *is* a no-op, but there was a period of sickening dread while auditing to be sure that no actual confusion between bus and slot had occurred. I hope to avoid that by following the conventional order. Signed-off-by: Ryan Moeller --- src/bhyve/bhyve_parse_command.c | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman= d.c index dd6a626ff4..76423730d9 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -352,8 +352,8 @@ bhyveParseBhyveLPCArg(virDomainDefPtr def, =20 static int bhyveParsePCISlot(const char *slotdef, - unsigned *pcislot, unsigned *bus, + unsigned *slot, unsigned *function) { /* slot[:function] | bus:slot:function */ @@ -385,7 +385,7 @@ bhyveParsePCISlot(const char *slotdef, } =20 *bus =3D 0; - *pcislot =3D 0; + *slot =3D 0; *function =3D 0; =20 switch (i + 1) { @@ -393,12 +393,12 @@ bhyveParsePCISlot(const char *slotdef, /* pcislot[:function] */ *function =3D values[1]; case 1: - *pcislot =3D values[0]; + *slot =3D values[0]; break; case 3: /* bus:pcislot:function */ *bus =3D values[0]; - *pcislot =3D values[1]; + *slot =3D values[1]; *function =3D values[2]; break; } @@ -409,8 +409,8 @@ bhyveParsePCISlot(const char *slotdef, static int bhyveParsePCIDisk(virDomainDefPtr def, unsigned caps G_GNUC_UNUSED, - unsigned pcislot, unsigned pcibus, + unsigned pcislot, unsigned function, int bus, int device, @@ -430,8 +430,8 @@ bhyveParsePCIDisk(virDomainDefPtr def, disk->device =3D device; =20 disk->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI; - disk->info.addr.pci.slot =3D pcislot; disk->info.addr.pci.bus =3D pcibus; + disk->info.addr.pci.slot =3D pcislot; disk->info.addr.pci.function =3D function; =20 if (STRPREFIX(config, "/dev/")) @@ -480,8 +480,8 @@ static int bhyveParsePCINet(virDomainDefPtr def, virDomainXMLOptionPtr xmlopt, unsigned caps G_GNUC_UNUSED, - unsigned pcislot, - unsigned pcibus, + unsigned bus, + unsigned slot, unsigned function, int model, const char *config) @@ -503,8 +503,8 @@ bhyveParsePCINet(virDomainDefPtr def, =20 net->model =3D model; net->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI; - net->info.addr.pci.slot =3D pcislot; - net->info.addr.pci.bus =3D pcibus; + net->info.addr.pci.bus =3D bus; + net->info.addr.pci.slot =3D slot; net->info.addr.pci.function =3D function; =20 if (!config) @@ -565,7 +565,7 @@ bhyveParseBhyvePCIArg(virDomainDefPtr def, char *slotdef =3D NULL; char *emulation =3D NULL; char *conf =3D NULL; - unsigned pcislot, bus, function; + unsigned bus, slot, function; =20 separator =3D strchr(arg, ','); =20 @@ -584,35 +584,35 @@ bhyveParseBhyvePCIArg(virDomainDefPtr def, emulation =3D g_strdup(separator); } =20 - if (bhyveParsePCISlot(slotdef, &pcislot, &bus, &function) < 0) + if (bhyveParsePCISlot(slotdef, &bus, &slot, &function) < 0) goto error; =20 if (STREQ(emulation, "ahci-cd")) - bhyveParsePCIDisk(def, caps, pcislot, bus, function, + bhyveParsePCIDisk(def, caps, bus, slot, function, VIR_DOMAIN_DISK_BUS_SATA, VIR_DOMAIN_DISK_DEVICE_CDROM, nvirtiodisk, nahcidisk, conf); else if (STREQ(emulation, "ahci-hd")) - bhyveParsePCIDisk(def, caps, pcislot, bus, function, + bhyveParsePCIDisk(def, caps, bus, slot, function, VIR_DOMAIN_DISK_BUS_SATA, VIR_DOMAIN_DISK_DEVICE_DISK, nvirtiodisk, nahcidisk, conf); else if (STREQ(emulation, "virtio-blk")) - bhyveParsePCIDisk(def, caps, pcislot, bus, function, + bhyveParsePCIDisk(def, caps, bus, slot, function, VIR_DOMAIN_DISK_BUS_VIRTIO, VIR_DOMAIN_DISK_DEVICE_DISK, nvirtiodisk, nahcidisk, conf); else if (STREQ(emulation, "virtio-net")) - bhyveParsePCINet(def, xmlopt, caps, pcislot, bus, function, + bhyveParsePCINet(def, xmlopt, caps, bus, slot, function, VIR_DOMAIN_NET_MODEL_VIRTIO, conf); else if (STREQ(emulation, "e1000")) - bhyveParsePCINet(def, xmlopt, caps, pcislot, bus, function, + bhyveParsePCINet(def, xmlopt, caps, bus, slot, function, VIR_DOMAIN_NET_MODEL_E1000, conf); =20 VIR_FREE(emulation); --=20 2.24.1