From: Michael Tokarev <mjt@tls.msk.ru>
To: Andreas Plesner Jacobsen <apj@mutt.dk>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
KVM list <kvm@vger.kernel.org>
Subject: Re: net packet storms with multiple NICs
Date: Fri, 23 Oct 2009 20:57:00 +0400 [thread overview]
Message-ID: <4AE1E05C.4050606@msgid.tls.msk.ru> (raw)
In-Reply-To: <20091023163339.GN2455@nerd.dk>
Andreas Plesner Jacobsen wrote:
> On Fri, Oct 23, 2009 at 08:25:39PM +0400, Michael Tokarev wrote:
>> o why different -net guest -net host pairs are not getting different
>> vlan= indexes by default, to stop the above-mentioned packet
>> storms right away? I think it's a wise default to assign different
>> pairs to different vlans, by counting -net host and -net guest
>> sequences.
>
> I think the major issue is that the definition of a "pair" is when the
> vlan-options match. There's no requirement to define the two after each
> other.
I mean something like this (rough approximation:
int host_vlan_no = 0, guest_vlan_no = 0;
while(parse_option()) {
if (option == host-side-net) {
if (!explicit_vlan) vlan = host_vlan_no;
++host_vlan_no;
}
if (option == guest-side-net) {
if (!explicit_vlan) vlan = guest_vlan_no;
++guest_vlan_no;
}
}
this way, consecutive host-side -net will receive
consecutive vlan=NN, and consecutive guest-side -net
also consecutive vlan=NN numbers.
But having in mind Marc's reply I don't think it's
necessary anymore.
Thanks!
/mjt
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Andreas Plesner Jacobsen <apj@mutt.dk>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: net packet storms with multiple NICs
Date: Fri, 23 Oct 2009 20:57:00 +0400 [thread overview]
Message-ID: <4AE1E05C.4050606@msgid.tls.msk.ru> (raw)
In-Reply-To: <20091023163339.GN2455@nerd.dk>
Andreas Plesner Jacobsen wrote:
> On Fri, Oct 23, 2009 at 08:25:39PM +0400, Michael Tokarev wrote:
>> o why different -net guest -net host pairs are not getting different
>> vlan= indexes by default, to stop the above-mentioned packet
>> storms right away? I think it's a wise default to assign different
>> pairs to different vlans, by counting -net host and -net guest
>> sequences.
>
> I think the major issue is that the definition of a "pair" is when the
> vlan-options match. There's no requirement to define the two after each
> other.
I mean something like this (rough approximation:
int host_vlan_no = 0, guest_vlan_no = 0;
while(parse_option()) {
if (option == host-side-net) {
if (!explicit_vlan) vlan = host_vlan_no;
++host_vlan_no;
}
if (option == guest-side-net) {
if (!explicit_vlan) vlan = guest_vlan_no;
++guest_vlan_no;
}
}
this way, consecutive host-side -net will receive
consecutive vlan=NN, and consecutive guest-side -net
also consecutive vlan=NN numbers.
But having in mind Marc's reply I don't think it's
necessary anymore.
Thanks!
/mjt
next prev parent reply other threads:[~2009-10-23 16:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 16:25 net packet storms with multiple NICs Michael Tokarev
2009-10-23 16:25 ` [Qemu-devel] " Michael Tokarev
2009-10-23 16:33 ` Andreas Plesner Jacobsen
2009-10-23 16:33 ` [Qemu-devel] " Andreas Plesner Jacobsen
2009-10-23 16:57 ` Michael Tokarev [this message]
2009-10-23 16:57 ` Michael Tokarev
2009-10-23 16:43 ` [Qemu-devel] " Mark McLoughlin
2009-10-25 14:22 ` Avi Kivity
2009-10-26 13:40 ` Krumme, Chris
2009-10-26 13:40 ` Krumme, Chris
2009-10-26 13:44 ` Avi Kivity
2009-11-11 1:38 ` Anthony Liguori
2009-11-11 1:19 ` Paul Brook
2009-11-11 9:23 ` Michael Tokarev
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=4AE1E05C.4050606@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=apj@mutt.dk \
--cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.