diff options
author | Nikolay Nikolaev | 2014-05-27 14:05:22 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2014-06-19 15:41:56 +0200 |
commit | 81647a655fa4ff99fd5748363a174edd87a40950 (patch) | |
tree | e13e0fafe22ef7bcd48f9fdf2fbcc04b75ca9966 /include/net | |
parent | Refactor virtio-net to use generic get_vhost_net (diff) | |
download | qemu-81647a655fa4ff99fd5748363a174edd87a40950.tar.gz qemu-81647a655fa4ff99fd5748363a174edd87a40950.tar.xz qemu-81647a655fa4ff99fd5748363a174edd87a40950.zip |
vhost_net_init will use VhostNetOptions to get all its arguments
vhost_dev_init will replace devfd and devpath with a single opaque argument.
This is initialised with a file descriptor. When TAP is used (through
vhost_net), open /dev/vhost-net and pass the fd as an opaque parameter in
VhostNetOptions. The same applies to vhost-scsi - open /dev/vhost-scsi and
pass the fd.
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/vhost_net.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index e2bd61c784..2067ee2298 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -6,7 +6,13 @@ struct vhost_net; typedef struct vhost_net VHostNetState; -VHostNetState *vhost_net_init(NetClientState *backend, int devfd, bool force); +typedef struct VhostNetOptions { + NetClientState *net_backend; + void *opaque; + bool force; +} VhostNetOptions; + +struct vhost_net *vhost_net_init(VhostNetOptions *options); bool vhost_net_query(VHostNetState *net, VirtIODevice *dev); int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues); |