net_util, virtio-devices, vmm: Accept multiple TAP fds

This patch enables multi-queue support for creating virtio-net devices by
accepting multiple TAP fds, e.g. '--net fds=3:7'.

Fixes: #2164

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2021-01-26 20:52:50 -08:00
committed by Rob Bradford
parent 5209026f52
commit 6664e5a6e7
4 changed files with 43 additions and 17 deletions

View File

@@ -1790,11 +1790,11 @@ impl DeviceManager {
)
.map_err(DeviceManagerError::CreateVirtioNet)?,
))
} else if let Some(fd) = net_cfg.fd {
} else if let Some(fds) = &net_cfg.fds {
Arc::new(Mutex::new(
virtio_devices::Net::from_tap_fd(
virtio_devices::Net::from_tap_fds(
id.clone(),
fd,
fds,
Some(net_cfg.mac),
net_cfg.iommu,
net_cfg.queue_size,