From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, Alona Paz <alkaplan@redhat.com>,
Andrea Bolognani <abologna@redhat.com>
Subject: Re: [PATCH] qrap: Pass PCI device numbers to qemu in base 10, not in base 16
Date: Wed, 22 Feb 2023 11:27:40 +1100 [thread overview]
Message-ID: <Y/VhfEbH7v2KD0XL@yekko> (raw)
In-Reply-To: <20230221192425.3745394-1-sbrivio@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
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".
>
> Reported-by: Alona Paz <alkaplan@redhat.com>
> Fixes: 5307faa05997 ("qrap: Strip network devices from command line, set them up according to machine")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> qrap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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++] = "-device";
> if (!has_json) {
> snprintf(dev_str, ARG_MAX,
> - "%s,%s%x%s,netdev=hostnet0,x-txburst=4096",
> + "%s,%s%i%s,netdev=hostnet0,x-txburst=4096",
> dev->name, dev->template, i, dev->template_post);
> } else {
> snprintf(dev_str, ARG_MAX,
> - "{\"driver\":\"%s\",%s%x\"%s,\"netdev\":\"hostnet0\",\"x-txburst\":4096}",
> + "{\"driver\":\"%s\",%s%i\"%s,\"netdev\":\"hostnet0\",\"x-txburst\":4096}",
> dev->name, dev->template_json, i, dev->template_json_post);
> }
> qemu_argv[qemu_argc++] = dev_str;
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-02-22 0:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 19:24 [PATCH] qrap: Pass PCI device numbers to qemu in base 10, not in base 16 Stefano Brivio
2023-02-22 0:27 ` David Gibson [this message]
2023-02-22 10:40 ` Andrea Bolognani
2023-02-22 10:45 ` Stefano Brivio
2023-02-22 12:47 ` Andrea Bolognani
2023-02-22 13:02 ` Stefano Brivio
2023-02-22 22:27 ` David Gibson
2023-02-23 14:06 ` Andrea Bolognani
2023-02-24 7:14 ` Stefano Brivio
2023-02-24 19:05 ` Andrea Bolognani
2023-02-24 19:32 ` Stefano Brivio
2023-02-25 1:44 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/VhfEbH7v2KD0XL@yekko \
--to=david@gibson.dropbear.id.au \
--cc=abologna@redhat.com \
--cc=alkaplan@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).