qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 0/7] Improvements and clean-ups related to -net
Date: Wed, 21 Feb 2018 12:34:06 +0100	[thread overview]
Message-ID: <525b685f-597c-02c0-0f16-a6ffd6016968@redhat.com> (raw)
In-Reply-To: <556ae8d1-bb6c-d9cc-2b2b-d28fad96aa7b@ilande.co.uk>

On 21/02/2018 11:41, Mark Cave-Ayland wrote:
> 1) Does the new -nic syntax support multiple on-board NICs? I remember
> seeing this on some of the ARM boards I was studying when trying to
> implement something similar for SPARC.

Yes, but they will be in different subnets if you do "-nic user -nic
user".  If you want to put them on the same trunk, what you want is
(cut-and-pasted from an offlist email from Thomas):

     -netdev user,id=slirp \
     -netdev hubport,id=port,netdev=slirp,hubid=0 \
     -nic hubport,hubid=0 \
     -nic hubport,hubid=0

We could make id and hubid optional (id was already optional in -net so
the logic is there already, see assign_name in net/net.c), giving the
much nicer:

     -netdev user,id=slirp \
     -netdev hubport,netdev=slirp \
     -nic hubport \
     -nic hubport

Thanks,

Paolo

> 2) Is it possible to provide a convenient wrapper function to handle the
> logic related to determining whether a specified NIC is on-board or not?

  parent reply	other threads:[~2018-02-21 11:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 10:18 [Qemu-devel] [PATCH v3 0/7] Improvements and clean-ups related to -net Thomas Huth
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 1/7] net: Move error reporting from net_init_client/netdev to the calling site Thomas Huth
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 2/7] net: List available netdevs with "-netdev help" Thomas Huth
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 3/7] net: Only show vhost-user in the help text if CONFIG_POSIX is defined Thomas Huth
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 4/7] net: Make net_client_init() static Thomas Huth
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 5/7] net: Remove the deprecated way of dumping network packets Thomas Huth
2018-02-21 16:31   ` Eric Blake
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 6/7] net: Remove the deprecated 'host_net_add' and 'host_net_remove' HMP commands Thomas Huth
2018-02-27 12:44   ` Dr. David Alan Gilbert
2018-02-21 10:18 ` [Qemu-devel] [PATCH v3 7/7] net: Add a new convenience option "--nic" to configure default/on-board NICs Thomas Huth
2018-02-21 10:41 ` [Qemu-devel] [PATCH v3 0/7] Improvements and clean-ups related to -net Mark Cave-Ayland
2018-02-21 11:26   ` Thomas Huth
2018-02-21 11:34   ` Paolo Bonzini [this message]
2018-02-27  7:53 ` Jason Wang

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=525b685f-597c-02c0-0f16-a6ffd6016968@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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.
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).