mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
Add the vhost-user netdev backend to the command line
The supplied chardev id will be inspected for supported options. Only a socket backend, with a set path (i.e. a Unix socket) and optionally the server parameter set, will be allowed. Other options (nowait, telnet) will make the chardev unusable and the netdev will not be initialised. Additional checks for validity: - requires `-numa node,memdev=..` - requires `-device virtio-net-*` The `vhostforce` option is used to force vhost-net when we deal with non-MSIX guests. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
d314f586b3
commit
03ce574442
8 changed files with 160 additions and 7 deletions
|
@ -62,6 +62,7 @@ const char *host_net_devices[] = {
|
|||
#ifdef CONFIG_VDE
|
||||
"vde",
|
||||
#endif
|
||||
"vhost-user",
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
@ -802,6 +803,9 @@ static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])(
|
|||
[NET_CLIENT_OPTIONS_KIND_BRIDGE] = net_init_bridge,
|
||||
#endif
|
||||
[NET_CLIENT_OPTIONS_KIND_HUBPORT] = net_init_hubport,
|
||||
#ifdef CONFIG_VHOST_NET_USED
|
||||
[NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -835,6 +839,9 @@ static int net_client_init1(const void *object, int is_netdev, Error **errp)
|
|||
case NET_CLIENT_OPTIONS_KIND_BRIDGE:
|
||||
#endif
|
||||
case NET_CLIENT_OPTIONS_KIND_HUBPORT:
|
||||
#ifdef CONFIG_VHOST_NET_USED
|
||||
case NET_CLIENT_OPTIONS_KIND_VHOST_USER:
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue