]> Git Repo - qemu.git/blob - include/net/vhost_net.h
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
[qemu.git] / include / net / vhost_net.h
1 #ifndef VHOST_NET_H
2 #define VHOST_NET_H
3
4 #include "net/net.h"
5 #include "hw/virtio/vhost-backend.h"
6
7 struct vhost_net;
8 typedef struct vhost_net VHostNetState;
9
10 typedef struct VhostNetOptions {
11     VhostBackendType backend_type;
12     NetClientState *net_backend;
13     void *opaque;
14 } VhostNetOptions;
15
16 struct vhost_net *vhost_net_init(VhostNetOptions *options);
17
18 int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues);
19 void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, int total_queues);
20
21 void vhost_net_cleanup(VHostNetState *net);
22
23 uint64_t vhost_net_get_features(VHostNetState *net, uint64_t features);
24 void vhost_net_ack_features(VHostNetState *net, uint64_t features);
25
26 bool vhost_net_virtqueue_pending(VHostNetState *net, int n);
27 void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
28                               int idx, bool mask);
29 VHostNetState *get_vhost_net(NetClientState *nc);
30 #endif
This page took 0.025122 seconds and 4 git commands to generate.