|
From: | Michael Tokarev |
Subject: | [Qemu-devel] Re: net packet storms with multiple NICs |
Date: | Fri, 23 Oct 2009 20:57:00 +0400 |
User-agent: | Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |