Skip to contentSkip to conversation

8 NIC limit

DISCUSSION [email protected] 15 participants 45 messages Oct 5, 2010 – Nov 18, 2010 4 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Hello list:

I'm working on a project that calls for the creation of a firewall in KVM.
While adding a 20-interface trunk of virtio adapters to bring in a dual 10GB bond, I've discovered an 8 NIC limit in QEMU.

I found the following thread in the list archives detailing a similar problem:
http://kerneltrap.org/mailarchive/linux-kvm/2009/1/29/4848304

It includes a patch for the file qemu/net.h to allow 24 NICs:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm">qemu-kvm/+bug/595873/+attachment/1429544/+files/max_nics.patch

In my case I want to attach 29, and have simply changed line 8 to 30 from 24.

This will be the first patch I've ever had to do, and so far my internet search yields results that don't seem to apply.

Would someone like to recommend a pertinent tutorial?

Many thanks

#1 lore raw
Quoted 14 lines · On Tue, Oct 5, 2010 at 7:48 AM, <[email protected]> wrote:

Hello list:

I'm working on a project that calls for the creation of a firewall in KVM.
While adding a 20-interface trunk of virtio adapters to bring in a dual 10GB bond, I've discovered an 8 NIC limit in QEMU.

I found the following thread in the list archives detailing a similar problem:
http://kerneltrap.org/mailarchive/linux-kvm/2009/1/29/4848304

It includes a patch for the file qemu/net.h to allow 24 NICs:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm">qemu-kvm/+bug/595873/+attachment/1429544/+files/max_nics.patch

Quoted 7 lines

In my case I want to attach 29, and have simply changed line 8 to 30 from 24.

This will be the first patch I've ever had to do, and so far my internet search yields results that don't seem to apply.

Would someone like to recommend a pertinent tutorial?

Hi there,

I commented on the original bug in Launchpad. We're willing and able to carry the patch against qemu-kvm in Ubuntu, I just asked that the reporter at least submit the patch upstream for discussion. I don't see where that has happened yet. It's a trivial patch to submit. Please note in that bug a pointer to the mailing list thread, if you start one.

To your specific question, different communities have different
requirements on patch submission, so you do need to consult each
community. A good place to start might be the
Documentation/SubmittingPatches how-to in the kernel tree:
* http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/SubmittingPatches;hb=HEAD

In this case, I think you're going to want to send your patch to the qemu-devel (on CC) mailing list (perhaps in addition to sending it here, to the kvm list).

:-Dustin

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1286295603.7731.28.camel@x200

#4 lore raw

Re: 8 NIC limit - patch - places limit at 32

Attached is a patch that allows qemu to have up to 32 NICs, without using the qdev -device method.

net.h.my renamed from net.h +1 -1
@@ -119,7 +119,7 @@
 
 /* NIC info */
 
-#define MAX_NICS 8
+#define MAX_NICS 32 
 enum {
 	NIC_NVECTORS_UNSPECIFIED = -1
 };
#5 lore raw

[Qemu-devel] Re: 8 NIC limit - patch - places limit at 32

Quoted 3 lines · On 10/06/2010 12:46 AM, [email protected] wrote:

Attached is a patch that allows qemu to have up to 32 NICs, without using the qdev -device method.

I'd rather there be no fixed limit and we validate that when add fails because there isn't a TCP slot available, we do the right thing.

BTW, using -device, it should be possible to add a very high number of nics because you can specify the PCI address including a function. If this doesn't Just Work today, we should make it work.

Regards,

Anthony Liguori

#6 lore raw

Re: 8 NIC limit - patch - places limit at 32

It's 8 otherwise- and after the patch is applied, it still only goes to 28 for some reason.
28's acceptable for my needs, so I'll step aside from here & leave it to the experts.

As for the new -device method, that's all fine & good but AFAIK it's not implemented on my platform, so this was the answer.

Quoted 16 lines · Anthony Liguori
Quoted 3 lines · On 10/06/2010 12:46 AM, [email protected] wrote:

Attached is a patch that allows qemu to have up to 32 NICs, without using the qdev -device method.

I'd rather there be no fixed limit and we validate that when add fails because there isn't a TCP slot available, we do the right thing.

BTW, using -device, it should be possible to add a very high number of nics because you can specify the PCI address including a function. If this doesn't Just Work today, we should make it work.

Regards,

Anthony Liguori

#7 lore raw

Re: 8 NIC limit - patch - places limit at 32

Quoted 3 lines · * Anthony Liguori ([email protected]) wrote:

BTW, using -device, it should be possible to add a very high number of nics because you can specify the PCI address including a function. If this doesn't Just Work today, we should make it work.

Should work...test...mostly[1], but I don't actually know of any tools that make use of it.

thanks,
-chris

[1] 40 worked, 48 caused guest kernel stack corruption, didn't dig in to see why yet.

Here's my simple wrapper to build up the command line:

QEMU=/home/chrisw/git/kvm/qemu-kvm/x86_64-softmmu/qemu-system-x86_64 BIOS=/home/chrisw/git/kvm/qemu-kvm/pc-bios DISK=/home/chrisw/disk-snap1.img SCRIPT=/home/chrisw/git/kvm/qemu-kvm/kvm/scripts/qemu-ifup

unset NETARGS
i=0
dev=4
func=0
max_dev=40
while [ $i -lt $max_dev ]
do
unset MULTIFUNC
if [ $(($i + 1)) -lt $max_dev -a $func -eq 0 ]; then
MULTIFUNC=",multifunction=on"
fi

  NETARGS="${NETARGS} -netdev type=tap,id=netdev$i,script=$SCRIPT -device virtio-net-pci,mac=52:54:00:12:34:$(printf "%.2x\n" $i),netdev=netdev$i,bus=pci.0,addr=$dev.$func$MULTIFUNC"

i=$(($i+1))
func=$(($func+1))
if [ $func -eq 8 ]; then

    func=0
    dev=$(($dev+1))

fi
done

$QEMU -L $BIOS -m 1024 -drive file=$DISK,if=virtio,boot=on $NETARGS -vnc :0

#8 lore raw

[Qemu-devel] Hitting 29 NIC limit (was Re: 8 NIC limit - patch - places limit at 32)

In reply to [email protected]

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29 NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum that can be supported by the qdev mothod?

Thanks
Anjali

Quoted 2 lines · On 10/5/10 10:46 PM, "[email protected]" <[email protected]> wrote:

Attached is a patch that allows qemu to have up to 32 NICs, without using the qdev -device method.

#9 lore raw

Hitting 29 NIC limit

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29 NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum that can be supported by the qdev mothod?

Thanks
Anjali

#10 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 11 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29 NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

    args="$args -netdev user,id=eth${slot}_${fn}"
    args="$args -device 

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

Regards,

Anthony Liguori

Quoted 5 lines

Thanks
Anjali

#11 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 19 lines · Anthony Liguori
Quoted 10 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29 NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

    args="$args -netdev user,id=eth${slot}_${fn}"
    args="$args -device 
Quoted 8 lines

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

What's the motivation for such a huge number of interfaces?

Signature · 1 line
error compiling committee.c: too many arguments to function
#12 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 26 lines · Avi Kivity
Quoted 25 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -netdev user,id=eth${slot}_${fn}"
args="$args -device
virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

Quoted 8 lines
Quoted 5 lines

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Daniel

Signature · 4 lines
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
#13 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 32 lines · Daniel P. Berrange
Quoted 30 lines · Avi Kivity
Quoted 28 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

    args="$args -netdev user,id=eth${slot}_${fn}"
    args="$args -device

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

I've always been sceptical of this. When physical systems have a large number of NICs, it's via multiple functions, not a bunch of PCI bridges.

With just a handful of 8-port NICs, you can exceed the current slot-based limit on physical hardware. It's not an extremely common configuration but it does exist.

BTW, I don't think it's possible to hot-add physical functions. I believe I know of a card that supports dynamic add of physical functions (pre-dating SR-IOV).

Regards,

Anthony Liguori

Quoted 2 lines

Daniel

#14 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 4 lines · Anthony Liguori

I've always been sceptical of this. When physical systems have a large number of NICs, it's via multiple functions, not a bunch of PCI bridges.

Actually a lot of multiport PCI cards are in fact single or dual NICs behind PCI bridges.

-hpa

#15 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

In reply to Daniel P. Berrange
Quoted 2 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
#16 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 7 lines · Richard W.M. Jones
Quoted 3 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

anthony@howler:~$ wc -l /proc/partitions; tail /proc/partitions
422 /proc/partitions
 251     1618          1 vdcx2
 251     1621     489951 vdcx5
 251     1632   10485760 vdcy
 251     1633    9992398 vdcy1
 251     1634          1 vdcy2
 251     1637     489951 vdcy5
 251     1648   10485760 vdcz
 251     1649    9992398 vdcz1
 251     1650          1 vdcz2
 251     1653     489951 vdcz5

This is what makes qdev so useful.

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -drive
file=/home/anthony/images/linux.img,if=none,snapshot=on,id=disk${slot}_${fn}"
args="$args -device
virtio-blk-pci,addr=${slot}.${fn},drive=disk${slot}_${fn},multifunction=on" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm -serial stdio

Regards,

Anthony Liguori

Quoted 3 lines

Rich.

#17 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Can you send me pointers to the qdev documentation? How can I use it? Will it allow us to scale above the 32 PCI limit?

Anjali

Quoted 51 lines · Anthony Liguori
Quoted 7 lines · Richard W.M. Jones
Quoted 3 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

anthony@howler:~$ wc -l /proc/partitions; tail /proc/partitions
422 /proc/partitions
  251     1618          1 vdcx2
  251     1621     489951 vdcx5
  251     1632   10485760 vdcy
  251     1633    9992398 vdcy1
  251     1634          1 vdcy2
  251     1637     489951 vdcy5
  251     1648   10485760 vdcz
  251     1649    9992398 vdcz1
  251     1650          1 vdcz2
  251     1653     489951 vdcz5

This is what makes qdev so useful.

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -drive
file=/home/anthony/images/linux.img,if=none,snapshot=on,id=disk${slot}_${fn}"
args="$args -device
virtio-blk-pci,addr=${slot}.${fn},drive=disk${slot}_${fn},multifunction=on" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm -serial stdio

Regards,

Anthony Liguori

Quoted 3 lines

Rich.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#18 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 3 lines · Anjali Kulkarni

Can you send me pointers to the qdev documentation? How can I use it? Will it allow us to scale above the 32 PCI limit?

It's all below. You just have to create a PCI device and mark the multifunction flag to on and then assign it a PCI address that includes a function number. Then you can pack 8 virtio PCI devices into a single slot.

Regards,

Anthony Liguori

Quoted 63 lines

Anjali

Quoted 56 lines · Anthony Liguori
Quoted 10 lines · Richard W.M. Jones
Quoted 4 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

anthony@howler:~$ wc -l /proc/partitions; tail /proc/partitions
422 /proc/partitions
   251     1618          1 vdcx2
   251     1621     489951 vdcx5
   251     1632   10485760 vdcy
   251     1633    9992398 vdcy1
   251     1634          1 vdcy2
   251     1637     489951 vdcy5
   251     1648   10485760 vdcz
   251     1649    9992398 vdcz1
   251     1650          1 vdcz2
   251     1653     489951 vdcz5

This is what makes qdev so useful.

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -drive
file=/home/anthony/images/linux.img,if=none,snapshot=on,id=disk${slot}_${fn}"
args="$args -device
virtio-blk-pci,addr=${slot}.${fn},drive=disk${slot}_${fn},multifunction=on" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm -serial stdio

Regards,

Anthony Liguori

Quoted 4 lines

Rich.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#19 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Thanks. Does this work for e1000 as well?
Also, does it support pci hotplug?

Anjali

Quoted 5 lines · Anthony Liguori
Quoted 3 lines · Anjali Kulkarni

Can you send me pointers to the qdev documentation? How can I use it? Will it allow us to scale above the 32 PCI limit?

Quoted 49 lines

It's all below. You just have to create a PCI device and mark the multifunction flag to on and then assign it a PCI address that includes a function number. Then you can pack 8 virtio PCI devices into a single slot.

Regards,

Anthony Liguori

Quoted 40 lines

Anjali

Quoted 34 lines · Anthony Liguori
Quoted 10 lines · Richard W.M. Jones
Quoted 4 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

anthony@howler:~$ wc -l /proc/partitions; tail /proc/partitions
422 /proc/partitions
   251     1618          1 vdcx2
   251     1621     489951 vdcx5
   251     1632   10485760 vdcy
   251     1633    9992398 vdcy1
   251     1634          1 vdcy2
   251     1637     489951 vdcy5
   251     1648   10485760 vdcz
   251     1649    9992398 vdcz1
   251     1650          1 vdcz2
   251     1653     489951 vdcz5

This is what makes qdev so useful.

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -drive

file=/home/anthony/images/linux.img,if=none,snapshot=on,id=disk${slot}_${fn}>>> "

Quoted 24 lines
Quoted 23 lines
Quoted 22 lines

args="$args -device
virtio-blk-pci,addr=${slot}.${fn},drive=disk${slot}_${fn},multifunction=on" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm -serial stdio

Regards,

Anthony Liguori

Quoted 4 lines

Rich.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#20 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 2 lines · Anjali Kulkarni

Thanks. Does this work for e1000 as well?

Haven't tried. I don't know how various e1000 drivers would react.

Quoted 2 lines

Also, does it support pci hotplug?

No, but that's fixable down the road.

Regards,

Anthony Liguori

Quoted 99 lines

Anjali

Quoted 6 lines · Anthony Liguori
Quoted 4 lines · Anjali Kulkarni

Can you send me pointers to the qdev documentation? How can I use it? Will it allow us to scale above the 32 PCI limit?

Quoted 56 lines

It's all below. You just have to create a PCI device and mark the multifunction flag to on and then assign it a PCI address that includes a function number. Then you can pack 8 virtio PCI devices into a single slot.

Regards,

Anthony Liguori

Quoted 46 lines

Anjali

Quoted 39 lines · Anthony Liguori
Quoted 4 lines · Richard W.M. Jones

On Thu, Oct 14, 2010 at 01:10:47PM +0100, Daniel P. Berrange wrote:

Quoted 9 lines
Quoted 5 lines

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

anthony@howler:~$ wc -l /proc/partitions; tail /proc/partitions
422 /proc/partitions
    251     1618          1 vdcx2
    251     1621     489951 vdcx5
    251     1632   10485760 vdcy
    251     1633    9992398 vdcy1
    251     1634          1 vdcy2
    251     1637     489951 vdcy5
    251     1648   10485760 vdcz
    251     1649    9992398 vdcz1
    251     1650          1 vdcz2
    251     1653     489951 vdcz5

This is what makes qdev so useful.

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -drive

file=/home/anthony/images/linux.img,if=none,snapshot=on,id=disk${slot}_${fn}>>> "

Quoted 28 lines
Quoted 27 lines
Quoted 25 lines

args="$args -device
virtio-blk-pci,addr=${slot}.${fn},drive=disk${slot}_${fn},multifunction=on" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm -serial stdio

Regards,

Anthony Liguori

Quoted 5 lines

Rich.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#21 lore raw

Re: Hitting 29 NIC limit

Quoted 5 lines · Anthony Liguori
Quoted 1 line · Anjali Kulkarni

Thanks. Does this work for e1000 as well?

Haven't tried. I don't know how various e1000 drivers would react.

Quoted 7 lines
Quoted 1 line

Also, does it support pci hotplug?

No, but that's fixable down the road.

Regards,

Anthony Liguori

Probably not.

#22 lore raw

Re: Hitting 29 NIC limit

Quoted 11 lines · Michael S. Tsirkin
Quoted 9 lines · Anthony Liguori
Quoted 2 lines · Anjali Kulkarni

Thanks. Does this work for e1000 as well?

Haven't tried. I don't know how various e1000 drivers would react.

Quoted 2 lines

Also, does it support pci hotplug?

Quoted 8 lines
Quoted 6 lines

No, but that's fixable down the road.

Regards,

Anthony Liguori

Probably not.

FWIW, by fixable, I meant, we could add the ability to hot plug a multi-port NIC device. For instance, we could have -device virtio-net-pci-x8 which would be an 8-port virtio-net card.

Regards,

Anthony Liguori

#23 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

In reply to Anthony Liguori
Quoted 7 lines · Anthony Liguori
Quoted 4 lines · Richard W.M. Jones
Quoted 2 lines · Daniel P. Berrange

Or a PCI bridge to wire up more PCI buses, so we raise the max limit for any type of device we emulate.

Break the 29/30/31 virtio-blk limit ... please!

It was broken ages ago:

[...]

Excellent news indeeed.

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
#24 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

In reply to Avi Kivity
Quoted 26 lines · Avi Kivity
Quoted 25 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

    args="$args -netdev user,id=eth${slot}_${fn}"
    args="$args -device

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

Quoted 5 lines
Quoted 5 lines

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

I'm amazed that works. Can't see how creating another qdev in the same slot makes a proper multifunction device.

Quoted 2 lines

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

Indeed. As far as I know, we can't hot plug multifunction PCI devices.

Quoted 1 line

What's the motivation for such a huge number of interfaces?

#25 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 30 lines · Markus Armbruster
Quoted 27 lines · Avi Kivity
Quoted 25 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

     args="$args -netdev user,id=eth${slot}_${fn}"
     args="$args -device

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

I'm amazed that works. Can't see how creating another qdev in the same slot makes a proper multifunction device.

multifunction=on sets the multifunction bit for the PCI device. Then it's a matter of setting the address to be a specific function.

Our default platform devices are actually multifunction.

Quoted 5 lines
Quoted 3 lines

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

Indeed. As far as I know, we can't hot plug multifunction PCI devices.

Yup.

Regards,

Anthony Liguori

Quoted 7 lines
Quoted 2 lines

What's the motivation for such a huge number of interfaces?

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#26 lore raw

Re: Hitting 29 NIC limit

Quoted 37 lines · Anthony Liguori
Quoted 36 lines · Markus Armbruster
Quoted 33 lines · Avi Kivity
Quoted 31 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

     args="$args -netdev user,id=eth${slot}_${fn}"
     args="$args -device

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile=" done
done

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

Quoted 6 lines
Quoted 3 lines

I'm amazed that works. Can't see how creating another qdev in the same slot makes a proper multifunction device.

multifunction=on sets the multifunction bit for the PCI device. Then it's a matter of setting the address to be a specific function.

I missed that bit, or perhaps forgot it already. Neat!

Unfortunately, it's not yet good enough for hot plug. We need to plug the complete device in one go, not function by function. This is harder than hot unplug, where we can just add a command "unplug this PCI device", then device_del its functions at our leisure. The symmetric way to plug would be device_add the functions, then plug the device.

Backward compatibility headache: current device_add/del plug/unplug automatically.

Quoted 1 line

Our default platform devices are actually multifunction.

Yes, but they're built "by hand".

[...]

#27 lore raw

Passing in additional info to guest OS and e1000 test suite?

Hi,

- If I want to pass in additional arguments to the guest OS while booting(in particular which slot I want to map a nic to) - is there any way to do it? Some kind of configuration file that I can pass in would also be ok for me.
- Is there a KVM/Qemu/e1000 test suite that is already available and I can us?

Thanks
Anjali

#28 lore raw

Re: Passing in additional info to guest OS and e1000 test suite?

Quoted 8 lines · Anjali Kulkarni

Hi,

- If I want to pass in additional arguments to the guest OS while booting(in particular which slot I want to map a nic to) - is there any way to do it? Some kind of configuration file that I can pass in would also be ok for me.
- Is there a KVM/Qemu/e1000 test suite that is already available and I can us?

I'm a little confused about what you're really asking. Can you give a more illustrated example of what you're asking? Are you using libvirt?

Quoted 8 lines

Thanks
Anjali

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#29 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

In reply to Avi Kivity
Quoted 25 lines · Avi Kivity
Quoted 24 lines · Anthony Liguori
Quoted 10 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29 NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do

    args="$args -netdev user,id=eth${slot}_${fn}"
    args="$args -device 

virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile="

done
done

Quoted 6 lines
Quoted 4 lines

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug.

Yes. Our hotplug design is based on devices.. This is wrong, it should be based on bus-level concepts (like PCI slots).

Quoted 1 line

If we want to support a large number of interfaces, we need true multiport cards.

This magic here creates a multiport virtio-net card so I'm not really sure what you're suggesting. It would certainly be nice to make this all more user friendly (and make hotplug work).

Regards,

Anthony Liguori

Quoted 1 line

What's the motivation for such a huge number of interfaces?

#30 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 11 lines · Anthony Liguori
Quoted 3 lines
Quoted 1 line

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug.

Yes. Our hotplug design is based on devices.. This is wrong, it should be based on bus-level concepts (like PCI slots).

Quoted 1 line

If we want to support a large number of interfaces, we need true multiport cards.

This magic here creates a multiport virtio-net card so I'm not really sure what you're suggesting. It would certainly be nice to make this all more user friendly (and make hotplug work).

The big issue is to fix hotplug.

I don't see how we can make it user friendly, without making the ordinary case even more unfriendly. Looks like we need yet another level of indirection here.

Signature · 1 line
error compiling committee.c: too many arguments to function
#31 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 6 lines · Avi Kivity
Quoted 5 lines · Anthony Liguori
Quoted 3 lines
Quoted 1 line

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug.

Quoted 8 lines
Quoted 6 lines

Yes. Our hotplug design is based on devices.. This is wrong, it should be based on bus-level concepts (like PCI slots).

Quoted 1 line

If we want to support a large number of interfaces, we need true multiport cards.

This magic here creates a multiport virtio-net card so I'm not really sure what you're suggesting. It would certainly be nice to make this all more user friendly (and make hotplug work).

The big issue is to fix hotplug.

Yes, but this is entirely independent of multifunction devices.

Today we shoe-horn hot remove into device_del. Instead, we should have explicit bus-level interfaces for hot remove.

Regards,

Anthony Liguori

Quoted 2 lines

I don't see how we can make it user friendly, without making the ordinary case even more unfriendly. Looks like we need yet another level of indirection here.

#32 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit

Quoted 11 lines · Anthony Liguori
Quoted 10 lines · Avi Kivity
Quoted 9 lines · Anthony Liguori
Quoted 3 lines
Quoted 1 line

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug.

Yes. Our hotplug design is based on devices.. This is wrong, it should be based on bus-level concepts (like PCI slots).

Quoted 1 line

If we want to support a large number of interfaces, we need true multiport cards.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This magic here creates a multiport virtio-net card so I'm not really sure what you're suggesting. It would certainly be nice to make this all more user friendly (and make hotplug work).

The big issue is to fix hotplug.

Yes, but this is entirely independent of multifunction devices.

Today we shoe-horn hot remove into device_del. Instead, we should have explicit bus-level interfaces for hot remove.

I'm not saying multiplug is not the right way to approach this (it is). The only concern is to get hotplug right.

Signature · 1 line
error compiling committee.c: too many arguments to function
#33 lore raw

Re: [Qemu-devel] Hitting 29 NIC limit (+Intel VT-c)

In reply to Avi Kivity
Quoted 4 lines · Avi Kivity
Quoted 1 line · Anthony Liguori

On 10/13/2010 05:32 PM, Anjali Kulkarni wrote:

What's the motivation for such a huge number of interfaces?

Ultimately to bring multiple 10Gb bonds into a Vyatta guest.

---

Quoted 3 lines

BTW, I don't think it's possible to hot-add physical functions. I believe I know of a card that supports dynamic add of physical functions (pre-dating SR-IOV)

I don't know what you're talking about, but it seems you have a better handle than I on this VT-c stuff, so perhaps misguidedly I'll direct my next question to you.

Is additional configuration required to make use of SR-IOV & VTq? I don't immediateley understand how the queueing knows who is who in the absense of eth.vlan- or if I need to for that matter.

My hope is that this is something like plug n play as long as kernel, host & driver versions are >foo, but I haven't yet found documentation to confirm it.

For the sake of future queries, I've come across these references so far:

http://download.intel.com/design/network/applnots/321211.pdf
http://www.linux-kvm.org/wiki/images/6/6a/KvmForum2008%24kdf2008_7.pdf
http://www.mail-archive.com/[email protected]/msg27860.html
http://www.mail-archive.com/[email protected]/msg22721.html
http://thread.gmane.org/gmane.linux.kernel.mm/38508
http://ark.intel.com/Product.aspx?id=36918

#34 lore raw

Re: Hitting 29 NIC limit

In reply to Avi Kivity
Quoted 25 lines · Avi Kivity
Quoted 24 lines · Anthony Liguori
Quoted 12 lines · Anjali Kulkarni

Hi,

Using the legacy way of starting up NICs, I am hitting a limitation after 29
NICs ie no more than 29 are detected (that's because of the 32 PCI slot limit on a single bus- 3 are already taken up)
I had initially increased the MAX_NICS to 48, just on my tree, to get to more, but ofcource that wont work.
Is there any way to go beyond 29 NICs the legacy way? What is the maximum
that can be supported by the qdev mothod?

I got up to 104 without trying very hard using the following script:

args=""
for slot in 5 6 7 8 9 10 11 12 13 14 15 16 17; do
for fn in 0 1 2 3 4 5 6 7; do
args="$args -netdev user,id=eth${slot}_${fn}"
args="$args -device virtio-net-pci,addr=${slot}.${fn},netdev=eth${slot}_${fn},multifunction=on,romfile="
done
done

Quoted 8 lines
Quoted 5 lines

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img ${args} -enable-kvm

The key is to make the virtio-net devices multifunction and to fill out all 8 functions for each slot.

This is unlikely to work right wrt pci hotplug. If we want to support a large number of interfaces, we need true multiport cards.

Bridge support seems to be working mostly fine here. That will let you go up to 256 devices without multifunction.

Signature · 1 line
MST

A message that is not in the archive (sent off-list or not yet received): C9081994.3517C%[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#37 lore raw

[Qemu-devel] Re: Hitting 29 NIC limit

Right now, qemu is internally ready to handle pci-to-pci bridge emulators and it's quite easy to add a new simple p2p bridge emulator. Just a single function to initialize vid/did and a single PCIDevinceInfo.

But it's difficult to use multi pci buses at the moment because other part isn't ready. It's only for developers who are interested in this area.

BTW, how many pci buses/slots/functions do you want at most?

What we have in the upstream repository is
- various fixes for p2p bridge support
- the library for p2p bridge support
- pcie root/upstream/downstream port emulators which is p2p bridges ioh3420/xio3130_upstream/xio3130_downstream

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.
- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering
this isn't a must, I suppose
I have those patches locally.

thanks,

Quoted 13 lines · Michael S. Tsirkin
Quoted 6 lines · Anjali Kulkarni

Hi,

Can you elaborate what you mean by bridge support? I would really like to go to 256 interfaces.

Anjali

Isaku Yamahata wrote most of it, I'll let him comment.

Signature · 1 line
MST
Signature · 1 line
yamahata
#38 lore raw

Re: [Qemu-devel] Re: Hitting 29 NIC limit

Isaku,

Could you explain more on irq routing in dsdt and related code in qemu? I encountered a problem: emulated user networking (-net nic -net user) cannot work in my qemu-kvm+q35+pcie code. Your original q35 (pure qemu) works fine.

Thanks!
Wei

Quoted 43 lines · Isaku Yamahata

Right now, qemu is internally ready to handle pci-to-pci bridge emulators and it's quite easy to add a new simple p2p bridge emulator. Just a single function to initialize vid/did and a single PCIDevinceInfo.

But it's difficult to use multi pci buses at the moment because other part isn't ready. It's only for developers who are interested in this area.

BTW, how many pci buses/slots/functions do you want at most?

What we have in the upstream repository is
- various fixes for p2p bridge support
- the library for p2p bridge support
- pcie root/upstream/downstream port emulators which is p2p bridges ioh3420/xio3130_upstream/xio3130_downstream

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.
- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering
this isn't a must, I suppose
I have those patches locally.

thanks,

Quoted 13 lines · Michael S. Tsirkin
Quoted 6 lines · Anjali Kulkarni

Hi,

Can you elaborate what you mean by bridge support? I would really like to go to 256 interfaces.

Anjali

Isaku Yamahata wrote most of it, I'll let him comment.

Signature · 1 line
MST
#39 lore raw

Re: [Qemu-devel] Re: Hitting 29 NIC limit

Quoted 3 lines · Wei Xu

Could you explain more on irq routing in dsdt and related code in qemu? I encountered a problem: emulated user networking (-net nic -net user) cannot work in my qemu-kvm+q35+pcie code. Your original q35 (pure qemu) works fine.

The related functions are ich9_lpc_set_irq_pic() and ich9_lpc_set_irq() in q35.c.
I'm aware that there is something wrong.
I'll fix it when I rebase the patches, but I haven't found time yet.

Signature · 1 line
yamahata
#40 lore raw

[Qemu-devel] Re: Hitting 29 NIC limit

In reply to Isaku Yamahata
Quoted 17 lines · Isaku Yamahata

Right now, qemu is internally ready to handle pci-to-pci bridge emulators and it's quite easy to add a new simple p2p bridge emulator. Just a single function to initialize vid/did and a single PCIDevinceInfo.

But it's difficult to use multi pci buses at the moment because other part isn't ready. It's only for developers who are interested in this area.

BTW, how many pci buses/slots/functions do you want at most?

What we have in the upstream repository is
- various fixes for p2p bridge support
- the library for p2p bridge support
- pcie root/upstream/downstream port emulators which is p2p bridges ioh3420/xio3130_upstream/xio3130_downstream

Quoted 3 lines

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.

IMHO, what we really need is a way to specify bridges through qdev. Not a machine with a hard-coded buses. The firmware paths used by Gleb's code might supply a good syntax to specify topology.

Quoted 4 lines

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering

Interesting. What's the motivation for this?

Quoted 22 lines

this isn't a must, I suppose
I have those patches locally.

thanks,

Quoted 13 lines · Michael S. Tsirkin
Quoted 6 lines · Anjali Kulkarni

Hi,

Can you elaborate what you mean by bridge support? I would really like to go to 256 interfaces.

Anjali

Isaku Yamahata wrote most of it, I'll let him comment.

Signature · 1 line
MST
Signature · 1 line
yamahata
#41 lore raw

[Qemu-devel] Re: Hitting 29 NIC limit

Quoted 6 lines · Michael S. Tsirkin
Quoted 3 lines

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.

IMHO, what we really need is a way to specify bridges through qdev. Not a machine with a hard-coded buses.

Yes, it's long-term goal.

Quoted 9 lines

The firmware paths used by Gleb's code might supply a good syntax to specify topology.

Quoted 4 lines

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering

Interesting. What's the motivation for this?

For hot-plugging pci-to-pci bridge. It requires sparse pci bus numbering. In fact, it's not so strong requirement.
Possibly I would have to dig into dsdt.

Signature · 1 line
yamahata
#42 lore raw

[Qemu-devel] Re: Hitting 29 NIC limit

Quoted 14 lines · Isaku Yamahata
Quoted 6 lines · Michael S. Tsirkin
Quoted 3 lines

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.

IMHO, what we really need is a way to specify bridges through qdev. Not a machine with a hard-coded buses.

Yes, it's long-term goal.

Quoted 3 lines

The firmware paths used by Gleb's code might supply a good syntax to specify topology.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering

Interesting. What's the motivation for this?

For hot-plugging pci-to-pci bridge. It requires sparse pci bus numbering.

Not sure I understand. pci bus numbering should be completely up to the guest.

Quoted 2 lines

In fact, it's not so strong requirement.
Possibly I would have to dig into dsdt.

Yes, some guest-side technology like acpi might be needed.

Quoted 2 lines
Signature · 1 line
yamahata
#43 lore raw

[Qemu-devel] Re: Hitting 29 NIC limit

Quoted 20 lines · Michael S. Tsirkin
Quoted 19 lines · Isaku Yamahata
Quoted 6 lines · Michael S. Tsirkin
Quoted 3 lines

What is missing for multiple pci buses is
- a new PC machine description which has multiple pci buses My Q35 chipset patch will provide this.

IMHO, what we really need is a way to specify bridges through qdev. Not a machine with a hard-coded buses.

Yes, it's long-term goal.

Quoted 8 lines

The firmware paths used by Gleb's code might supply a good syntax to specify topology.

Quoted 4 lines

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)
- pv pci bus numbering

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Interesting. What's the motivation for this?

For hot-plugging pci-to-pci bridge. It requires sparse pci bus numbering.

Not sure I understand. pci bus numbering should be completely up to the guest.

Yes.

Quoted 4 lines
Quoted 2 lines

In fact, it's not so strong requirement.
Possibly I would have to dig into dsdt.

Yes, some guest-side technology like acpi might be needed.

OSes like Linux tries to keep bios settings as much as possible. It means seabios needs to understand dsdt and initialize pci buses properly according to it.
I think pv numbering is much easier than teaching seabios dsdt parsing.

Signature · 1 line
yamahata
#44 lore raw

Re: [Qemu-devel] Re: Hitting 29 NIC limit

In reply to Isaku Yamahata

Hi,

Quoted 5 lines

What is missing for multiple pci buses is

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)

Is this really needed?

IIRC there are (used to be?) multiport nic pci cards which are simply multiple ethernet card pci chips behind a pci-to-pci bridge. Such a pci-to-pci bridge should be able to operate without bios support, no?

So one cold just do ...

-device pci-bridge,id=br
-device e1000,bus=br.0
-device e1000,bus=br.0

to create a bridge with two nics behind it?

cheers,
Gerd

#45 lore raw

Re: [Qemu-devel] Re: Hitting 29 NIC limit

Quoted 9 lines · Gerd Hoffmann

Hi,

Quoted 5 lines

What is missing for multiple pci buses is

- a simple P2P bridge emulator for pc architecture
- seabios support
- DSDT for a new machine which has multi pci buses(IRQ routing)

Is this really needed?

Q35 IRQ routing is different from piix4's. So new one is necessary. Possibly it won't depend on the number of pci buses,
I haven't confirmed it.

Signature · 1 line
yamahata
#46 lore raw
In reply to [email protected]
Quoted 6 lines · [email protected] writes:

Hello list:

I'm working on a project that calls for the creation of a firewall in KVM.
While adding a 20-interface trunk of virtio adapters to bring in a dual 10GB bond, I've discovered an 8 NIC limit in QEMU.

Have you tried creating NICs with -device? The limit shouldn't apply there.

#47 lore raw
Quoted 1 line

Have you tried creating NICs with -device?

I'm not sure what that is, will look into it, thanks.

I'm using ProxmoxVE, and currently add them via a web interface.

Someone happens to host a screenshot of that part here:
http://c-nergy.be/blog/wp-content/uploads/Proxmox_Net2.png

Quoted 12 lines · Markus Armbruster
Quoted 6 lines · [email protected] writes:

Hello list:

I'm working on a project that calls for the creation of a firewall in KVM.
While adding a 20-interface trunk of virtio adapters to bring in a dual 10GB bond, I've discovered an 8 NIC limit in QEMU.

Have you tried creating NICs with -device? The limit shouldn't apply there.

#48 lore raw
In reply to [email protected]
Quoted 11 lines · On 10/5/2010 9:48 AM, [email protected] wrote:

Hello list:

I'm working on a project that calls for the creation of a firewall in KVM.
While adding a 20-interface trunk of virtio adapters to bring in a dual 10GB bond, I've discovered an 8 NIC limit in QEMU.

I found the following thread in the list archives detailing a similar problem:
http://kerneltrap.org/mailarchive/linux-kvm/2009/1/29/4848304

Quoted 5 lines

It includes a patch for the file qemu/net.h to allow 24 NICs:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm">qemu-kvm/+bug/595873/+attachment/1429544/+files/max_nics.patch

In my case I want to attach 29, and have simply changed line 8 to 30 from 24.

I'd guess you'll bump into a pci device number limit (I believe it is 32 at the moment).

Quoted 10 lines

This will be the first patch I've ever had to do, and so far my internet search yields results that don't seem to apply.

Would someone like to recommend a pertinent tutorial?

Many thanks
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html