From: Thomas Huth <thuth@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Cc: Jason Wang <jasowang@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH] net: Enable vlans and dump for -netdev, too,
Date: Tue, 26 May 2015 20:15:46 +0200 [thread overview]
Message-ID: <20150526201546.53cd4ec5@thh440s> (raw)
In-Reply-To: <CAJSP0QWD2zkYvY3kSfrCT+ROc=tzLpr+Pvu1WFvR0d2j2vOcOA@mail.gmail.com>
On Tue, 26 May 2015 17:43:09 +0100
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Tue, May 26, 2015 at 3:36 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
> > On Tue, May 26, 2015 at 04:29:51PM +0200, Markus Armbruster wrote:
> >> Stefan Hajnoczi <stefanha@redhat.com> writes:
> >>
> >> > On Fri, May 22, 2015 at 09:22:19PM +0200, Thomas Huth wrote:
> >> >> So far, it is not possible to use the network dump interface
> >> >> with the "-netdev" option yet, it only works with the legacy
> >> >> "-net" option. To be able to use it with "-netdev", too, this
> >> >> patch now enables the "vlan" packet distribution for the
> >> >> "-netdev" option, too, so that you can now dump network packets
> >> >> like this:
> >> >>
> >> >> qemu... -device e1000,netdev=myhub -netdev hubport,hubid=1,id=myhub \
> >> >> -netdev user,id=n1,vlan=1,tftp=/tmp/tftp,bootfile=zImage \
> >> >> -netdev dump,id=n2,vlan=1,file=/tmp/dump.dat
> >> >>
> >> >> Signed-off-by: Thomas Huth <thuth@redhat.com>
> >> >> ---
> >> >> net/net.c | 3 +++
> >> >> qapi-schema.json | 1 +
> >> >> 2 files changed, 4 insertions(+)
> >> >>
> >> >> [Note: I'm quite new to this area of the code, please review carefully
> >> >> whether this approach makes sense or whether it should be done differently]
> >> >
> >> > We thought the QEMU "vlan" concept would be dropped completely in the
> >> > future, so it was never added to -netdev. No patches to do that have
> >> > been posted over the years, so I think it was more of a conceptual goal
> >> > than a concrete requirement.
> >>
> >> Well, patches to do that first need to replace the VLAN-only dump
> >> feature.
> >>
> >> To fully deprecate -net, we also have to replace -net nic for
> >> configuring onboard NICs.
> >>
> >> Prior discussion:
> >> http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg03743.html
> >>
> >> We haven't really tried either.
> >>
> >> Thomas's patch declares defeat on VLANs: it ports them to -netdev,
> >> perpetuating the concept.
> >>
> >> > I'm okay with merging this but will leave some time for discussion
> >> > before merging the patch.
> >> >
> >> > "Speak now or forever hold your peace"
> >>
> >> Sure we're ready to give up without having tried?
> >
> > Seems to me that we'd be better off taking the -netdev arg and
> > adding a new parameter 'dump=filename' that can be used with any
> > netdev backend. eg with tap
> >
> > -netdev tap,id=foo,fd=3,dump=/somefile,dumplen=1024
> >
> > The use of a dedicated 'dump' network backend always appear rather
> > strange as a conceptual approach, and I don't think we should
> > propagate its use into -netdev
>
> I'm happy with this approach too.
I'm certainly fine with both two approaches - as long as the -net vs.
-netdev chaos finally goes away.
However, there is one thing to consider: The "vlans" currently emulate
some kind of hub hardware. If we do not support these with -netdev and
finally remove -net one day, QEMU looses this feature, so that could be
considered as a regression. Question is how useful this feature was
beside connecting it to the dump device, and whether anybody really
used it... for example, when running QEMU inside QEMU with nested
virtualization, could the outer QEMU emulate a hub this way to connect
the two contained virtual machines? OTOH, I think such behavior can
also be reached by different means, so it should be ok to loose this
feature, shouldn't it?
Thomas
next prev parent reply other threads:[~2015-05-26 18:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 19:22 [Qemu-devel] [RFC PATCH] net: Enable vlans and dump for -netdev, too, Thomas Huth
2015-05-22 19:42 ` Eric Blake
2015-05-26 12:52 ` Stefan Hajnoczi
2015-05-26 13:07 ` Thomas Huth
2015-05-26 18:25 ` Paolo Bonzini
2015-05-26 14:29 ` Markus Armbruster
2015-05-26 14:36 ` Daniel P. Berrange
2015-05-26 16:43 ` Stefan Hajnoczi
2015-05-26 18:15 ` Thomas Huth [this message]
2015-05-27 7:22 ` Markus Armbruster
2015-07-17 6:53 ` [Qemu-devel] net: Next steps to deprecate -net (was: [RFC PATCH] Enable vlans and dump for -netdev, too) Thomas Huth
2015-07-17 7:25 ` Peter Maydell
2015-07-17 7:48 ` [Qemu-devel] net: Next steps to deprecate -net Thomas Huth
2015-07-22 13:40 ` Markus Armbruster
2015-07-22 16:20 ` Michael S. Tsirkin
2015-07-22 16:45 ` Thomas Huth
2015-07-17 8:16 ` [Qemu-devel] net: Next steps to deprecate -net (was: [RFC PATCH] Enable vlans and dump for -netdev, too) Stefan Hajnoczi
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=20150526201546.53cd4ec5@thh440s \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@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).