Skip to contentSkip to conversation

ne2k_isa: how to specify a custom iobase and irq?

Qemu-devel Sebastian Herbszt 4 participants 13 messages Dec 17, 2009 – Dec 21, 2009

lore
Share & tools
lore
#0 lore raw

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

- Sebastian

#1 lore raw
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

#2 lore raw
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

Also needs vlan=0, otherwise you'll end up with an unconnected nic.

cheers,
Gerd

#3 lore raw
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

Also needs vlan=0, otherwise you'll end up with an unconnected nic.

Shouldn't vlan have a default value of 0 like it does with the "-net" syntax?

- Sebastian

#4 lore raw
Quoted 8 lines · Sebastian Herbszt
Quoted 7 lines · Gerd Hoffmann
Quoted 6 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

-device ne2k_isa,irq=5,iobase=0x280

Also needs vlan=0, otherwise you'll end up with an unconnected nic.

Shouldn't vlan have a default value of 0 like it does with the "-net" syntax?

No, you don't actually have to tie it to a vlan.

Regards,

Anthony Liguori

#5 lore raw
Quoted 9 lines · Anthony Liguori
Quoted 8 lines · Sebastian Herbszt
Quoted 7 lines · Gerd Hoffmann
Quoted 6 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

-device ne2k_isa,irq=5,iobase=0x280

Also needs vlan=0, otherwise you'll end up with an unconnected nic.

Shouldn't vlan have a default value of 0 like it does with the "-net" syntax?

No, you don't actually have to tie it to a vlan.

Actually you have to else networking doesn't work at all. Without specifying "vlan" with the "-device" syntax you end up with vlan=<null> and not vlan=0 with "info qtree".

- Sebastian

#6 lore raw
Quoted 3 lines · Sebastian Herbszt

Actually you have to else networking doesn't work at all. Without specifying "vlan" with the "-device" syntax you end up with vlan=<null> and not vlan=0 with "info qtree".

-netdev type=tap,id=mynic -device ne2k_isa,irq=5,iobase=0x280,id=mynic

One of the changes in 0.12 allows for a network configuration that does not have the builtin hub (aka vlans). This is really important for a number of reasons. The main is that it allows for much more aggressive optimization without having to teach the vlan code how to deal with things like software GSO.

That might look awkward, but that's because it's designed to be used from a config file. The config entry for that is:

[device "mynic"]
driver = "ne2k_isa"
irq = "5"
iobase = "0x280"

[netdev "mynic"]
type = "tap"

Which looks pretty nice IMHO.

Regards,

Anthony Liguori

#7 lore raw
In reply to Markus Armbruster
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

Shouldn't this also be possible with the "-net" syntax? It does accept "addr" which is pci specific.

- Sebastian

#8 lore raw
Quoted 11 lines · Sebastian Herbszt
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

Shouldn't this also be possible with the "-net" syntax? It does accept "addr" which is pci specific.

addr= is a hack. It predates qdev-ification.

-device is now the preferred way to do this sort of thing.

Regards,

Anthony Liguori

#9 lore raw
In reply to Markus Armbruster
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

If i specify "-net nic,model=pcnet" i end up only with a pcnet nic. With the above syntax i get a e1000 and a ne2k_isa. It also loads the e1000 rom.

- Sebastian

#10 lore raw
Quoted 11 lines · Sebastian Herbszt
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

If i specify "-net nic,model=pcnet" i end up only with a pcnet nic. With the above syntax i get a e1000 and a ne2k_isa. It also loads the e1000 rom.

Can you supply the full command lines. I'm a little confused about what you're reporting.

Regards,

Anthony Liguori

#11 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 7 lines · Sebastian Herbszt
Quoted 6 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

-device ne2k_isa,irq=5,iobase=0x280

If i specify "-net nic,model=pcnet" i end up only with a pcnet nic. With the above syntax i get a e1000 and a ne2k_isa. It also loads the e1000 rom.

Can you supply the full command lines. I'm a little confused about what you're reporting.

"qemu -device ne2k_isa,irq=10" and "info qtree" has e1000 and ne2k_isa. "qemu -net nic,model=pcnet" and "info qtree" has only pcnet.

Maybe because of hw/pc.c:

       if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0))
           pc_init_ne2k_isa(nd);
       else
           pci_nic_init_nofail(nd, "e1000", NULL);

- Sebastian

#12 lore raw
Quoted 15 lines · Sebastian Herbszt
Quoted 14 lines · Anthony Liguori
Quoted 12 lines · Sebastian Herbszt
Quoted 7 lines · Markus Armbruster
Quoted 3 lines · Sebastian Herbszt

The default iobase and irq for the ne2k_isa card are 0x300 and 9. It should be possible to override both using the "-net" syntax like "-net nic,model=ne2k_isa,irq=5,iobase=0x280".

-device ne2k_isa,irq=5,iobase=0x280

If i specify "-net nic,model=pcnet" i end up only with a pcnet nic. With the above syntax i get a e1000 and a ne2k_isa. It also loads the e1000 rom.

Quoted 5 lines
Quoted 2 lines

Can you supply the full command lines. I'm a little confused about what you're reporting.

"qemu -device ne2k_isa,irq=10" and "info qtree" has e1000 and ne2k_isa. "qemu -net nic,model=pcnet" and "info qtree" has only pcnet.

Unlike -net nic, -device doesn't suppress the default NIC. Unfortunate. You can get rid of it with -nodefaults, but that also rids you of other default devices.

[...]