qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [RFC PATCH] spapr: add ibmveth to the supported network adapters list
Date: Fri, 18 Oct 2013 16:39:40 +1100	[thread overview]
Message-ID: <5260C99C.4090404@ozlabs.ru> (raw)
In-Reply-To: <1381460995-11855-1-git-send-email-aik@ozlabs.ru>

On 10/11/2013 02:09 PM, Alexey Kardashevskiy wrote:
> The problem is that "-net nic,model=?" does not print "ibmveth" in
> the list while it is actually supported.
> 
> Most of the QEMU emulated network devices are PCI but "ibmveth"
> (a.k.a. spapr-vlan) is not. However with "-net nic,model=?", QEMU prints
> only PCI devices in the list, even if it does not say that the list is
> all about PCI devices.
> 
> This adds "?"/"help" handling in spapr.c and adds "ibmveth" in the beginning
> of the list.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> This is an RFC patch.


Ping?


> The other solutions could be:
> 1. add "ibmveth" into pci_nic_models[] in hw/pci/pci.c but this would not
> be correct as "ibmveth" is not PCI and it must appear only on pseries machine.
> 
> 2. implemement short version of qdev_print_category_devices() and call it
> with DEVICE_CATEGORY_NETWORK but that would print more devices than
> pci_nic_init_nofail() can handle (vmxnet3, usb-bt-dongle).
> 
> 3. fix qemu_check_nic_model() to specifically say that this is a list of
> PCI devices and there might be some other devices which "-net nic,model+"
> supports but there are not PCI but that could break compatibility (some
> management software may rely on this exact string).
> 
> 4. Reject the patch and just say that people must stop using "-net". Ok for me :)
> 
> Since "-net" is kind of obsolete interface and does not seem to be extended ever,
> the proposed patch does not look too ugly, does not it?
> ---
>  hw/ppc/spapr.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index c0613e4..45ed3da 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1276,6 +1276,21 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
>  
>          if (strcmp(nd->model, "ibmveth") == 0) {
>              spapr_vlan_create(spapr->vio_bus, nd);
> +        } else if (is_help_option(nd->model)) {
> +            static const char * const nic_models[] = {
> +                "ibmveth",
> +                "ne2k_pci",
> +                "i82551",
> +                "i82557b",
> +                "i82559er",
> +                "rtl8139",
> +                "e1000",
> +                "pcnet",
> +                "virtio",
> +                NULL
> +            };
> +            qemu_show_nic_models(nd->model, nic_models);
> +            exit(0);
>          } else {
>              pci_nic_init_nofail(&nd_table[i], phb->bus, nd->model, NULL);
>          }
> 


-- 
Alexey

  reply	other threads:[~2013-10-18  5:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11  3:09 [Qemu-devel] [RFC PATCH] spapr: add ibmveth to the supported network adapters list Alexey Kardashevskiy
2013-10-18  5:39 ` Alexey Kardashevskiy [this message]
2013-10-27 18:03 ` Alexander Graf
2013-11-01 10:52   ` Alexey Kardashevskiy
2013-11-01 12:47     ` Alexander Graf
2013-11-02 11:51       ` Markus Armbruster
2013-11-02 22:52         ` Alexander Graf
2013-11-02 10:56     ` Paolo Bonzini
2013-11-02 12:07       ` Markus Armbruster
2013-11-04 10:22         ` Paolo Bonzini
2013-11-02 12:26       ` Alexey Kardashevskiy

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=5260C99C.4090404@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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.
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 NNTP newsgroup(s).