From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK5kA-0004jr-SJ for qemu-devel@nongnu.org; Wed, 11 May 2011 05:30:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK5k9-0002AW-Tw for qemu-devel@nongnu.org; Wed, 11 May 2011 05:30:10 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:52723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK5k9-0002A7-Qj for qemu-devel@nongnu.org; Wed, 11 May 2011 05:30:09 -0400 Received: by gxk26 with SMTP id 26so117594gxk.4 for ; Wed, 11 May 2011 02:30:08 -0700 (PDT) Message-ID: <4DCA571D.6010508@landley.net> Date: Wed, 11 May 2011 04:30:05 -0500 From: Rob Landley MIME-Version: 1.0 References: <4DC8EE85.4010109@landley.net> In-Reply-To: <4DC8EE85.4010109@landley.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] -net PCI bus order reversed since 1.14.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 05/10/2011 02:51 AM, Rob Landley wrote: > Until recently, -net options used to add interfaces to linux in the same > order they went on the command line, so the first one you listed on the > qemu command line would become eth0, the second -net became eth1, and so > on. Now they're added in _reverse_ order, so the _last_ one on the > command line is eth0. > > I bisected the behavior change to commit > 60c07d933c66c4b30a83b7ccbc8a0cb3df1b2d0e but don't understand why it > changes this behavior. (Probably making udev do something stupid, but > it happens consistently both before and after...) > > Rob I poked at this a bit more, and got the problem to be more explicit: $ ~/qemu/x86_64-softmmu/qemu-system-x86_64 -m 512 \ -kernel ~/linux/arch/x86/boot/bzImage -no-reboot -hda squeeze.ext3 \ -append "root=/dev/hda rw" \ -net nic,model=e1000,macaddr=52:54:00:11:11:11 -net user \ -redir tcp:9876::22 \ -net nic,model=e1000,macaddr=52:54:00:22:22:22 \ -net tap,ifname=kvm0,script=no,downscript=no Before the above commit the 11:11:11 interface becomes -net user (and thus dhclient works on it), and the 22:22:22 interface becomes -net tap and needs a static IP. After the above commit, 22:22:22 gets 10.0.2.16 (instead of 10.0.2.15), and 11:11:11 doesn't respond to dhcp. Would anyone like to explain what's going on, and what I _should_ be doing here to get predictable behavior? I deleted /etc/udev/rules.d/70-persistent-net.rules when it first started misbehaving, but that's not it. The association between -net nic and -net user/tap no longer seems to be in the order the command line options go. Rob