mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(region,host): support multiqueues on vhost network (#14455)
Guest network add attribute num_queues, one is default. And we can assign queues on guest create, eg: server-create --net num-queues=4 Signed-off-by: wanyaoqi <d3lx.yq@gmail.com> Co-authored-by: wanyaoqi <wanyaoqi@baidu.com>
This commit is contained in:
@@ -242,6 +242,8 @@ func ParseNetworkConfig(desc string, idx int) (*compute.NetworkConfig, error) {
|
||||
netConfig.StandbyAddrCount, _ = strconv.Atoi(p[len("standby-addr="):])
|
||||
} else if utils.IsInStringArray(p, []string{"virtio", "e1000", "vmxnet3"}) {
|
||||
netConfig.Driver = p
|
||||
} else if strings.HasPrefix(p, "num-queues=") {
|
||||
netConfig.NumQueues, _ = strconv.Atoi(p[len("num-queues="):])
|
||||
} else if regutils.MatchSize(p) {
|
||||
bw, err := fileutils.GetSizeMb(p, 'M', 1000)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user