vhost_net.h 796 字节
Newer Older
M
Michael S. Tsirkin 已提交
1 2 3
#ifndef VHOST_NET_H
#define VHOST_NET_H

P
Paolo Bonzini 已提交
4
#include "net/net.h"
M
Michael S. Tsirkin 已提交
5 6 7 8

struct vhost_net;
typedef struct vhost_net VHostNetState;

9
VHostNetState *vhost_net_init(NetClientState *backend, int devfd, bool force);
M
Michael S. Tsirkin 已提交
10

11
bool vhost_net_query(VHostNetState *net, VirtIODevice *dev);
J
Jason Wang 已提交
12 13
int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues);
void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, int total_queues);
M
Michael S. Tsirkin 已提交
14 15 16 17 18 19

void vhost_net_cleanup(VHostNetState *net);

unsigned vhost_net_get_features(VHostNetState *net, unsigned features);
void vhost_net_ack_features(VHostNetState *net, unsigned features);

20 21 22
bool vhost_net_virtqueue_pending(VHostNetState *net, int n);
void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
                              int idx, bool mask);
M
Michael S. Tsirkin 已提交
23
#endif