From: Benjamin <mlspirat42@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [QEMU] net: adapt dump to support the new syntax
Date: Mon, 06 Feb 2012 01:30:57 +0900 [thread overview]
Message-ID: <4F2EAEC1.8010801@gmail.com> (raw)
In-Reply-To: <m3aa5dnwgh.fsf@blackfin.pond.sub.org>
On 01/24/12 20:58, Markus Armbruster wrote:
> Stefan Hajnoczi<stefanha@gmail.com> writes:
>
>> On Tue, Jan 24, 2012 at 6:22 PM, Benjamin<mlspirat42@gmail.com> wrote:
>>> Hello Stefan,
>>
>> Hi,
>> Please send QEMU development emails to the mailing list so others can
>> help or we can avoid duplicating work in case someone else is already
>> looking into this. I have CCed the mailing list.
>>
>>> I've seen your blog and I hope you can help me address the issue of
>>> -net dump not being compatible with the new -netdev syntax.
>>
>> The reason is because packet capture is implemented as a net client -
>> it receives packets on the "VLAN" and writes them to the pcap file.
>> In the -netdev model each client has a peer (another net client that
>> is communicates with). So it's not possible to plug the "dump" net
>> client together with an emulated NIC client and a host tap client, for
>> example. Since "VLANs" broadcast packets to all attached net clients
>> it works there.
>>
>>> I think it is possible to achieve but I've had a lot of trouble
>>> understanding the code, VLANs are everywhere and even though the new
>>> syntax doesn't use them it looks like the code still uses a VLAN logic.
>>>
>>> Before I really start to get serious about this task, do you have any
>>> advice or recommendation?
>>
>> I refactored the network subsystem to drop the "VLAN" concept a while
>> back but never got around to submitting the patches:
>>
>> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/vlan-hub
>>
>> This branch completely removes the "VLAN" feature. Instead it
>> introduces hubs, which are net clients that have multiple ports and
>> broadcast packets between them. This allows you to achieve the same
>> behavior as "VLANs" except we remove all the hardcoded special cases
>> in the net subsystem and instead push that feature out into the hub
>> net client.
>
> Sounds more advanced than my experimental hackery to kill VLANs.
>
>> If you rebase the vlan-hub branch onto a recent qemu.git, then you can
>> use -netdev syntax to create an emulated NIC, host device, dump
>> device, and a hub. The three clients must be attached to the hub.
>>
>> I think the code is already there, it should work. I didn't submit
>> this because I wanted to implement automated tests to ensure that
>> these changes don't brake the old syntax for "VLANs".
>>
>> Feel free to play around with the vlan-hub branch, test it, and push
>> it upstream along with changes that you make.
>
> Yes, please.
I will rebase it and test it then. Thanks.
next prev parent reply other threads:[~2012-02-05 7:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F1EF6CE.9060306@gmail.com>
2012-01-24 10:42 ` [Qemu-devel] [QEMU] net: adapt dump to support the new syntax Stefan Hajnoczi
2012-01-24 11:58 ` Markus Armbruster
2012-02-05 16:30 ` Benjamin [this message]
2012-02-05 22:18 ` Paolo Bonzini
2012-05-17 5:24 ` Zhi Yong Wu
2012-05-17 5:59 ` Zhi Yong Wu
2012-05-17 9:51 ` Paolo Bonzini
2012-05-17 10:05 ` Zhi Yong Wu
2012-05-17 13:29 ` Paolo Bonzini
2012-02-17 6:54 ` Zhi Yong Wu
2012-02-17 10:55 ` Stefan Hajnoczi
2012-02-18 4:16 ` Zhi Yong Wu
2012-02-18 8:57 ` Zhi Yong Wu
2012-02-18 9:48 ` Stefan Hajnoczi
2012-02-18 10:48 ` Zhi Yong Wu
2012-02-19 15:33 ` Michael S. Tsirkin
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=4F2EAEC1.8010801@gmail.com \
--to=mlspirat42@gmail.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).