From a1af1cb099a1d242d7de4da4c990e442113a3332 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 14 Dec 2018 15:34:34 -0800 Subject: [PATCH] virtcontainers: network: Rely on hypervisor capabilities for multi queues In order to properly setup the network, hence allocate or not multiple queues, this commit makes sure that the hypervisor capabilities are checked for this. Fixes #1027 Signed-off-by: Sebastien Boeuf --- virtcontainers/network.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/virtcontainers/network.go b/virtcontainers/network.go index 41f3bbe4fe..e1d1d25e3c 100644 --- a/virtcontainers/network.go +++ b/virtcontainers/network.go @@ -505,7 +505,12 @@ func getLinkByName(netHandle *netlink.Handle, name string, expectedLink netlink. func xConnectVMNetwork(endpoint Endpoint, h hypervisor) error { netPair := endpoint.NetworkPair() - queues := int(h.hypervisorConfig().NumVCPUs) + queues := 0 + caps := h.capabilities() + if caps.isMultiQueueSupported() { + queues = int(h.hypervisorConfig().NumVCPUs) + } + disableVhostNet := h.hypervisorConfig().DisableVhostNet if netPair.NetInterworkingModel == NetXConnectDefaultModel {