master
c 126 lines 2.45 KB
Raw
1 /*
2 * vhost-net support
3 *
4 * Copyright Red Hat, Inc. 2010
5 *
6 * Authors:
7 * Michael S. Tsirkin <mst@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
13 #include "qemu/osdep.h"
14 #include "net/net.h"
15 #include "net/tap.h"
16
17 #include "hw/virtio/virtio-net.h"
18 #include "net/vhost_net.h"
19 #include "qemu/error-report.h"
20
21
22 uint64_t vhost_net_get_max_queues(VHostNetState *net)
23 {
24 return 1;
25 }
26
27 struct vhost_net *vhost_net_init(VhostNetOptions *options)
28 {
29 error_report("vhost-net support is not compiled in");
30 return NULL;
31 }
32
33 int vhost_net_start(VirtIODevice *dev,
34 NetClientState *ncs,
35 int data_queue_pairs, int cvq)
36 {
37 return -ENOSYS;
38 }
39 void vhost_net_stop(VirtIODevice *dev,
40 NetClientState *ncs,
41 int data_queue_pairs, int cvq)
42 {
43 }
44
45 void vhost_net_cleanup(struct vhost_net *net)
46 {
47 }
48
49 void vhost_net_get_features_ex(struct vhost_net *net, uint64_t *features)
50 {
51 }
52
53 int vhost_net_get_config(struct vhost_net *net, uint8_t *config,
54 uint32_t config_len)
55 {
56 return 0;
57 }
58 int vhost_net_set_config(struct vhost_net *net, const uint8_t *data,
59 uint32_t offset, uint32_t size, uint32_t flags)
60 {
61 return 0;
62 }
63
64 void vhost_net_ack_features_ex(struct vhost_net *net, const uint64_t *features)
65 {
66 }
67
68 void vhost_net_get_acked_features_ex(VHostNetState *net, uint64_t *features)
69 {
70 }
71
72 bool vhost_net_virtqueue_pending(VHostNetState *net, int idx)
73 {
74 return false;
75 }
76
77 void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
78 int idx, bool mask)
79 {
80 }
81
82 bool vhost_net_config_pending(VHostNetState *net)
83 {
84 return false;
85 }
86
87 void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask)
88 {
89 }
90
91 int vhost_net_notify_migration_done(struct vhost_net *net, char* mac_addr)
92 {
93 return -1;
94 }
95
96 VHostNetState *get_vhost_net(NetClientState *nc)
97 {
98 return 0;
99 }
100
101 int vhost_net_set_vring_enable(NetClientState *nc, int enable)
102 {
103 return 0;
104 }
105
106 int vhost_net_set_mtu(struct vhost_net *net, uint16_t mtu)
107 {
108 return 0;
109 }
110
111 void vhost_net_virtqueue_reset(VirtIODevice *vdev, NetClientState *nc,
112 int vq_index)
113 {
114
115 }
116
117 int vhost_net_virtqueue_restart(VirtIODevice *vdev, NetClientState *nc,
118 int vq_index)
119 {
120 return 0;
121 }
122
123 void vhost_net_save_acked_features(NetClientState *nc)
124 {
125
126 }