From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 93B5F5A0268 for ; Wed, 22 Feb 2023 01:45:19 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PLy9m1P59z4x8G; Wed, 22 Feb 2023 11:45:16 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1677026716; bh=IQ2/WHj0GruiT7H4GyvlpJKnAl3WqNhRzwPj0qPwI00=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lSCdzGfH1gqgxnu7eFR53fnbU0Bjz6nsVQ8sWTI9ZWRZGWtO2fembzZc03Im3L6Ro YSb05icSwC5aPNuAVARTkI0lcr1ytVhNjCLdQ2oPDgALFQCgKxO8+GLoG0vKcLi/ai piqnaYCRkFK+5uwpRFehPk6YapsKeOj76AGsIGcQ= Date: Wed, 22 Feb 2023 11:27:40 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] qrap: Pass PCI device numbers to qemu in base 10, not in base 16 Message-ID: References: <20230221192425.3745394-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YBBhOzivn4UWDadR" Content-Disposition: inline In-Reply-To: <20230221192425.3745394-1-sbrivio@redhat.com> Message-ID-Hash: 6EMRBLDXDQORLV3Y3JXWNZWEQ7UBMQJS X-Message-ID-Hash: 6EMRBLDXDQORLV3Y3JXWNZWEQ7UBMQJS X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Alona Paz , Andrea Bolognani X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --YBBhOzivn4UWDadR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 21, 2023 at 08:24:25PM +0100, Stefano Brivio wrote: > Alona reports that when libvirt starts qrap (KubeVirt integration) > and the domain description leads to more than 10 devices, indices of > PCI device descriptors are formatted as hexadecimal, so we end up > with things like "pci.a" instead of "pci.10". >=20 > Reported-by: Alona Paz > Fixes: 5307faa05997 ("qrap: Strip network devices from command line, set = them up according to machine") > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > qrap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/qrap.c b/qrap.c > index 287198e..ff99c89 100644 > --- a/qrap.c > +++ b/qrap.c > @@ -281,11 +281,11 @@ int main(int argc, char **argv) > qemu_argv[qemu_argc++] =3D "-device"; > if (!has_json) { > snprintf(dev_str, ARG_MAX, > - "%s,%s%x%s,netdev=3Dhostnet0,x-txburst=3D4096", > + "%s,%s%i%s,netdev=3Dhostnet0,x-txburst=3D4096", > dev->name, dev->template, i, dev->template_post); > } else { > snprintf(dev_str, ARG_MAX, > - "{\"driver\":\"%s\",%s%x\"%s,\"netdev\":\"hostnet0\",\"x-txb= urst\":4096}", > + "{\"driver\":\"%s\",%s%i\"%s,\"netdev\":\"hostnet0\",\"x-txb= urst\":4096}", > dev->name, dev->template_json, i, dev->template_json_post); > } > qemu_argv[qemu_argc++] =3D dev_str; --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --YBBhOzivn4UWDadR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmP1YWIACgkQzQJF27ox 2Gcj+w/+JU4/MYZepE90ZwBnyTh8hYphEnLAaCxbnQRKU23tWE4xCJIYjPVaUnQC y7em+d0raNqK77c0AQXneovLqwqSYxTB77lvEhuIeurNa2pU1Wb7ndCA5Bz+b5GV R8Y4yCp7Fyw1r3FU49M6Z1VD4QS63Zrqb8/9Up9WzqFZLbPdmayrfJlPITN3wGQR bL5CCTw3ccMnDrvE4osahgg8NZ1pYG0HfLCWHt2Z5/3qhvepSwY8KgoyTCzrXtsO EebG/w7XIjMe5YBQR0SY2uU0WVBmdkilT8rHPrFBWOT89Yu4MfsW0W9dJd89RAqh 6cupPS2s+cstIjQysw3wCs3H2mPFfLxYlR0wkKNwbAiNWnj3OzGPHpCXQC+cMg5I DHQOu4OO4EN2qeSGqB3e/9mAywqqMz9pB25AMHA/tLilJkNAOjWfBHsf0GoAtWmB HH5K9nWGEEOjNJZWb/WAm8uCQjhxqNPHmGBL09z7DiNBYQaS20o+rZYFebq4wLhZ tiseG1FHDgAsYPOMqigqW/OlMlVSDA9GKdXvCOQiJp8nZ9VxVet2w4KbQOZJHWqD 6Ln4dvFP2IAqmfbBjfDa4KeqBsJyzTjd/R7Kyiw+Nkys5P+r/W8EU+siMOoCXqKa YP++xX50lfQdrllNylQKNA11KgoD9YWJ65fYSOawB8Kl5sKHO14= =XJif -----END PGP SIGNATURE----- --YBBhOzivn4UWDadR--