Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
virtcontainers: network: Rely on hypervisor capabilities for multi qu…
Browse files Browse the repository at this point in the history
…eues

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 <sebastien.boeuf@intel.com>
  • Loading branch information
Sebastien Boeuf committed Dec 14, 2018
1 parent a227ab8 commit a1af1cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion virtcontainers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a1af1cb

Please # to comment.