mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 02:56:18 +00:00
vendor: Update govmm to disable vhost when host doesn't support vhost-net
If the length of vhostfds is zero, it means host doesn't support vhost. So
do not pass vhost="on" in QMP.
Full list:
1a1fee7
qemu/qmp: nic can works without vhost
Fixes #169
Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
This commit is contained in:
parent
516b6ff1d0
commit
5ebb7cf6f5
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -123,11 +123,11 @@
|
||||
revision = "3520598351bb3500a49ae9563f5539666ae0a27c"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:7434a85a1d6c2bf64f322087ec7a7f84ab9e971179bef7b95deabaf0e3f7c126"
|
||||
digest = "1:2b062c3645f86b71bdb0487b4d69746704695fc09158fe4638c213d38c6cc5dc"
|
||||
name = "github.com/intel/govmm"
|
||||
packages = ["qemu"]
|
||||
pruneopts = "NUT"
|
||||
revision = "e2c716433e444017507e3587ce071868fd164380"
|
||||
revision = "032705ba6aae05a9bf41e296cf89c8529cffb822"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:01c37fcb6e2a1fe1321a97faaef74c66ac531ea292ca3f929b7189cc400b1d47"
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/intel/govmm"
|
||||
revision = "e2c716433e444017507e3587ce071868fd164380"
|
||||
revision = "032705ba6aae05a9bf41e296cf89c8529cffb822"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/kata-containers/agent"
|
||||
|
8
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
8
vendor/github.com/intel/govmm/qemu/qmp.go
generated
vendored
@ -812,13 +812,15 @@ func (q *QMP) ExecuteNetdevChardevAdd(ctx context.Context, netdevType, netdevID,
|
||||
// Must be valid QMP identifier.
|
||||
func (q *QMP) ExecuteNetdevAddByFds(ctx context.Context, netdevType, netdevID string, fdNames, vhostFdNames []string) error {
|
||||
fdNameStr := strings.Join(fdNames, ":")
|
||||
vhostFdNameStr := strings.Join(vhostFdNames, ":")
|
||||
args := map[string]interface{}{
|
||||
"type": netdevType,
|
||||
"id": netdevID,
|
||||
"fds": fdNameStr,
|
||||
"vhost": "on",
|
||||
"vhostfds": vhostFdNameStr,
|
||||
}
|
||||
if len(vhostFdNames) > 0 {
|
||||
vhostFdNameStr := strings.Join(vhostFdNames, ":")
|
||||
args["vhost"] = "on"
|
||||
args["vhostfds"] = vhostFdNameStr
|
||||
}
|
||||
|
||||
return q.executeCommand(ctx, "netdev_add", args, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user