diff options
| author | Ladi Prosek | 2016-12-16 14:07:08 +0100 |
|---|---|---|
| committer | Michael Brown | 2017-01-22 14:22:19 +0100 |
| commit | fba3b39900af52e695d59bc34f28bb8d22526ddb (patch) | |
| tree | 6b2b6062085e52e545306937e48fcf6af5774cca /src/drivers/net | |
| parent | [virtio] Simplify virtqueue shutdown (diff) | |
| download | ipxe-fba3b39900af52e695d59bc34f28bb8d22526ddb.tar.gz ipxe-fba3b39900af52e695d59bc34f28bb8d22526ddb.tar.xz ipxe-fba3b39900af52e695d59bc34f28bb8d22526ddb.zip | |
[virtio] Remove queue size limit in legacy virtio
Virtio 0.9 implementation was limited to the maximum virtqueue size of
MAX_QUEUE_NUM and the virtio-net driver would fail to initialize on hosts
exceeding this limit.
This commit lifts the restriction by allocating the queue memory based on
the actual queue size instead of using a fixed maximum. Note that virtio
1.0 still uses the MAX_QUEUE_NUM constant to cap the size (unfortunately
this functionality is not available in virtio 0.9).
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net')
| -rw-r--r-- | src/drivers/net/virtio-net.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/net/virtio-net.c b/src/drivers/net/virtio-net.c index de3333d2f..eaf6ed382 100644 --- a/src/drivers/net/virtio-net.c +++ b/src/drivers/net/virtio-net.c @@ -185,6 +185,7 @@ static void virtnet_free_virtqueues ( struct net_device *netdev ) { for ( i = 0; i < QUEUE_NB; i++ ) { virtio_pci_unmap_capability ( &virtnet->virtqueue[i].notification ); + vp_free_vq ( &virtnet->virtqueue[i] ); } free ( virtnet->virtqueue ); |
