Skip to content

Commit 0f63b0c

Browse files
committed
ch: Correctly set queue pairs for tapfdsize
1 parent 5f20dd8 commit 0f63b0c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/ch/ch_monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ virCHMonitorBuildNetJson(virDomainObjPtr vm, virJSONValuePtr nets, virDomainNetD
406406
}
407407
}
408408
if (netdef->driver.virtio.queues) {
409-
if (virJSONValueObjectAppendNumberInt(net, "num_queues", netdef->driver.virtio.queues) < 0)
409+
if (virJSONValueObjectAppendNumberInt(net, "num_queues", 2 * priv->tapfdSize) < 0)
410410
goto cleanup;
411411
}
412412

src/ch/ch_process.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,7 @@ chProcessNetworkPrepareDevices(virCHDriverPtr driver, virDomainObjPtr vm)
592592
} else if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ) {
593593
tapfdSize = net->driver.virtio.queues;
594594
if (!tapfdSize)
595-
tapfdSize = 2; //This needs to be at least 2, based on
596-
// https://github.com/cloud-hypervisor/cloud-hypervisor/blob/master/docs/networking.md
595+
tapfdSize = 1;
597596

598597
tapfd = g_new(int, tapfdSize);
599598

0 commit comments

Comments
 (0)