Skip to content
  • Luka Blaskovic's avatar
    Add support for KVM multiqueue virtio-net · 47eca2c6
    Luka Blaskovic authored
    This patch adds support for multiqueue virtio-net[1] which sets a number of
    queues (file descriptors) from virtio_net_queues parameter for tap device
    to parallelize packets sending or receiving. Tap devices will be created with
    MULTI_QUEUE (IFF_MULTI_QUEUE) support.
    
    KVM paravirtual nics (virtio-net) are only one which supports this feature.
    Number of queues are limited by kernel tap implementation (currently to 8).
    Instances must manually set number of queues, on Linux using:
    
    ethtool -L ethX combined $queues
    
    Network device options logic is moved to separate method
    _GetNetworkDeviceFeatures which is now properly reused in hotplugging part.
    This also fixes unreported bug when vhost_net parameter is set to true,
    hotplugged network device will be created without "vhost=on" parameter.
    
    [1] http://www.linux-kvm.org/page/Multiqueue
    
    
    
    Signed-off-by: default avatarLuka Blaskovic <lblasc@znode.net>
    Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
    47eca2c6