qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] net: Allow hubports to connect to other netdevs
Date: Tue, 16 Jan 2018 14:04:43 +0800	[thread overview]
Message-ID: <c3deae0c-688c-13eb-f2ab-9af26899a289@redhat.com> (raw)
In-Reply-To: <1516045855-27146-1-git-send-email-thuth@redhat.com>



On 2018年01月16日 03:50, Thomas Huth wrote:
> QEMU can emulate hubs to connect NICs and netdevs. This is currently
> primarily used for the mis-named 'vlan' feature of the networking
> subsystem. Now the 'vlan' feature has been marked as deprecated, since
> its name is rather confusing and the users often rather mis-configure
> their network when trying to use it. But while the 'vlan' parameter
> should be removed at one point in time, the basic idea of emulating
> a hub in QEMU is still good: It's useful for bundling up the output of
> multiple NICs into one single l2tp netdev for example.
>
> Now to be able to use the hubport feature without 'vlan's, there is one
> missing piece: The possibility to connect a hubport to a netdev, too.
> This patch adds this possibility by introducing a new "netdev=..."
> parameter to the hubports.
>
> To bundle up the output of multiple NICs into one socket netdev, you can
> now run QEMU with these parameters for example:
>
> qemu-system-ppc64 ... -netdev socket,id=s1,connect=:11122 \
>      -netdev hubport,hubid=1,id=h1,netdev=s1 \
>      -netdev hubport,hubid=1,id=h2 -device e1000,netdev=h2 \
>      -netdev hubport,hubid=1,id=h3 -device virtio-net-pci,netdev=h3
>
> For using the socket netdev, you have got to start another QEMU as the
> receiving side first, for example with network dumping enabled:
>
> qemu-system-x86_64 -M isapc -netdev socket,id=s0,listen=:11122 \
>      -device ne2k_isa,netdev=s0 \
>      -object filter-dump,id=f1,netdev=s0,file=/tmp/dump.dat
>
> After the ppc64 guest tried to boot from both NICs, you can see in the
> dump file (using Wireshark, for example), that the output of both NICs
> (the e1000 and the virtio-net-pci) has been successfully transfered
> via the socket netdev in this case.
>
> Suggested-by: Paolo Bonzini<pbonzini@redhat.com>
> Signed-off-by: Thomas Huth<thuth@redhat.com>
> ---
>   v2: Set up peer via qemu_new_net_client() instead of duplicating the
>       code to do this in net_init_hubport()

Applied.

Thanks

      reply	other threads:[~2018-01-16  6:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:50 [Qemu-devel] [PATCH v2] net: Allow hubports to connect to other netdevs Thomas Huth
2018-01-16  6:04 ` Jason Wang [this message]

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=c3deae0c-688c-13eb-f2ab-9af26899a289@redhat.com \
    --to=jasowang@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).