qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] -net PCI bus order reversed since 1.14.0
@ 2011-05-10  7:51 Rob Landley
  2011-05-11  9:30 ` Rob Landley
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Landley @ 2011-05-10  7:51 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] -net PCI bus order reversed since 1.14.0
  2011-05-10  7:51 [Qemu-devel] -net PCI bus order reversed since 1.14.0 Rob Landley
@ 2011-05-11  9:30 ` Rob Landley
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Landley @ 2011-05-11  9:30 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-11  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10  7:51 [Qemu-devel] -net PCI bus order reversed since 1.14.0 Rob Landley
2011-05-11  9:30 ` Rob Landley

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).