mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-01 22:50:54 +00:00
runtime: Enforce >= 1 queue pairs for tapNetworkPair
In the xConnectVMNetwork path, we have queues = 0 as a baseline, set to h.HypervisorConfig().NumVCPUs() iff h.Capabilities() advertise MultiQueueSupport. This is certainly incorrect as we always want, as a baseline, at least one queue pair. Make queues := 1 by default to ensure the NetworkPair has at least one queue pair for all virtio-net paths. Signed-off-by: Cameron Baird <cameronbaird@microsoft.com>
This commit is contained in:
@@ -856,7 +856,7 @@ func xConnectVMNetwork(ctx context.Context, endpoint Endpoint, h Hypervisor) err
|
||||
|
||||
netPair := endpoint.NetworkPair()
|
||||
|
||||
queues := 0
|
||||
queues := 1
|
||||
caps := h.Capabilities(ctx)
|
||||
if caps.IsMultiQueueSupported() {
|
||||
queues = int(h.HypervisorConfig().NumVCPUs())
|
||||
|
||||
Reference in New Issue
Block a user