mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 19:32:20 +00:00
virtio-devices: net: Loop over enabled queue pairs when activating
In some situations (booting with OVMF) fewer queues will be enabled therefore we should iterate over the number of enabled queues (as passed into VirtioDevice::activate()) rather than the number of create tap devices. Fixes: #2578 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
db66cb6e9b
commit
656b9f97f9
@ -546,7 +546,7 @@ impl VirtioDevice for Net {
|
||||
|
||||
let mut epoll_threads = Vec::new();
|
||||
let mut taps = self.taps.clone();
|
||||
for i in 0..taps.len() {
|
||||
for i in 0..queues.len() / 2 {
|
||||
let rx = RxVirtio::new();
|
||||
let tx = TxVirtio::new();
|
||||
let rx_tap_listening = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user