qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: peter.crosthwaite@xilinx.com,
	Jean-Christophe DUBOIS <jcd@tribudubois.net>,
	peter.chubb@nicta.com.au, qemu-devel@nongnu.org,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver
Date: Mon, 6 May 2013 11:51:06 +0300	[thread overview]
Message-ID: <20130506085106.GA15909@redhat.com> (raw)
In-Reply-To: <CAFEAcA-PY-4sJXeFFJiU1UaahKbR-5FejMWU=0_Q9xuRRJF9xw@mail.gmail.com>

On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote:
> On 5 May 2013 22:15, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Sun, May 05, 2013 at 07:01:34PM +0100, Peter Maydell wrote:
> >> Sorry, you can't say this until we've sorted out the mess
> >> that is new-style networking options in a machine which
> >> creates embedded network controllers.
> 
> > What is missing exactly?
> > Could you please give some examples of the problems
> > that -netdev + -device has but -net does not have?
> 
> -netdev + -device is fine (unsurprisingly since that's the
> PC usecase); -netdev + a device that's preinstantiated by the
> board is not so fine. And you can't use -device to instantiate
> most embedded network controllers because there's no way to
> wire up the IRQs and MMIOs.

Can't board code look for instanciated controllers
and wire them up?

> 
> There's probably a nasty workaround involving '-global', but:
>  * that requires the user to know the device name for the
>    onboard NIC for the board, which is a regression from
>    the -net situation
>  * it's not clear how it works if the board has two NICs
>    of the same type

How does it work now?
I am guessing each -net nic gets mapped to a random device.
At some level that's worse than documenting about internal names,
we are teaching users to learn order of initialization
by trial and error and then rely on this.

>  * if we claim -global is the right approach we need to actually
>    document it (and document all the board NIC names, yuck)
>  * we need to fix existing boards which do the "don't instantiate
>    NIC unless the user said -net nic" trick by looking at
>    nd_table[]
>  * we need to make the board code pass the right NIC properties
>    in both the "legacy -net option" and "new style" cases (at the
>    moment, for instance, lan911_init() insists on having a
>    NICInfo* passed to it)
> 
> -net nic works for these use cases because it will operate on
> the NICs created by the machine models, because the machine
> models look at the nd_table[] when they create the NICs.
> 
> thanks
> -- PMM


-- 
MST

  reply	other threads:[~2013-05-06  8:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04 14:09 [Qemu-devel] [PATCH v2 0/4] Add i.MX25 support through the 3DS evaluation board Jean-Christophe DUBOIS
2013-05-04 14:09 ` [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver Jean-Christophe DUBOIS
2013-05-05  3:11   ` Peter Crosthwaite
2013-05-05 11:46     ` Andreas Färber
2013-05-05 11:59       ` Peter Crosthwaite
2013-05-05 12:41         ` Peter Maydell
2013-05-05 13:14     ` Jean-Christophe DUBOIS
2013-05-05 13:31       ` Andreas Färber
2013-05-05 14:05         ` Jean-Christophe DUBOIS
2013-05-05 17:49   ` Michael S. Tsirkin
2013-05-05 18:01     ` Peter Maydell
2013-05-05 21:15       ` Michael S. Tsirkin
2013-05-05 22:00         ` Peter Maydell
2013-05-06  8:51           ` Michael S. Tsirkin [this message]
2013-05-06  9:08             ` Peter Maydell
2013-05-06  9:24               ` Michael S. Tsirkin
2013-05-06 12:01                 ` Peter Maydell
2013-05-07  0:39                   ` Peter Crosthwaite
2013-05-07  9:03                     ` Peter Maydell
2013-05-04 14:09 ` [Qemu-devel] [PATCH v2 2/4] Add i.MX I2C controller driver Jean-Christophe DUBOIS
2013-05-05  3:14   ` Peter Crosthwaite
2013-05-05  3:58     ` Jean-Christophe DUBOIS
2013-05-05 10:47       ` Peter Maydell
2013-05-05 10:53         ` Peter Crosthwaite
2013-05-05 11:41           ` Peter Maydell
2013-05-05 11:53             ` Peter Crosthwaite
2013-05-05 12:28               ` Jean-Christophe DUBOIS
2013-05-05 11:34     ` Andreas Färber
2013-05-05 12:34       ` Jean-Christophe DUBOIS
2013-05-04 14:09 ` [Qemu-devel] [PATCH v2 3/4] Add i.MX25 3DS evaluation board support Jean-Christophe DUBOIS
2013-05-04 14:09 ` [Qemu-devel] [PATCH v2 4/4] Add qtest support for i.MX I2C device emulation Jean-Christophe DUBOIS
2013-05-04 16:53   ` Andreas Färber
2013-05-04 19:02     ` Jean-Christophe DUBOIS
2013-05-04 19:48       ` [Qemu-devel] compile the latest source in mac error Peter Cheung
2013-05-04 20:51         ` Peter Maydell

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=20130506085106.GA15909@redhat.com \
    --to=mst@redhat.com \
    --cc=afaerber@suse.de \
    --cc=jcd@tribudubois.net \
    --cc=peter.chubb@nicta.com.au \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).