virDomainNetDefPtr net,
int vlan,
int bootindex,
+ bool multiqueue,
virQEMUCapsPtr qemuCaps)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
virDomainVirtioEventIdxTypeToString(net->driver.virtio.event_idx));
}
}
+ if (usingVirtio && multiqueue)
+ virBufferAddLit(&buf, ",mq=on");
if (vlan == -1)
virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias);
else
virCommandAddArgList(cmd, "-netdev", host, NULL);
}
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
- if (!(nic = qemuBuildNicDevStr(def, net, vlan, bootindex, qemuCaps)))
+ bool multiqueue = tapfdSize > 1 || vhostfdSize > 1;
+
+ if (!(nic = qemuBuildNicDevStr(def, net, vlan, bootindex,
+ multiqueue, qemuCaps)))
goto cleanup;
virCommandAddArgList(cmd, "-device", nic, NULL);
} else {
}
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
- if (!(nicstr = qemuBuildNicDevStr(vm->def, net, vlan, 0, priv->qemuCaps)))
+ bool multiqueue = tapfdSize > 1 || vhostfdSize > 1;
+
+ if (!(nicstr = qemuBuildNicDevStr(vm->def, net, vlan, 0,
+ multiqueue, priv->qemuCaps)))
goto try_remove;
} else {
if (!(nicstr = qemuBuildNicStr(net, NULL, vlan)))