]> git.proxmox.com Git - mirror_qemu.git/blame - hw/net/vhost_net-stub.c
virtio: fix reachable assertion due to stale value of cached region size
[mirror_qemu.git] / hw / net / vhost_net-stub.c
CommitLineData
7b28c615
PB
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#include "net/vhost-user.h"
17
18#include "hw/virtio/virtio-net.h"
19#include "net/vhost_net.h"
20#include "qemu/error-report.h"
21
22
23uint64_t vhost_net_get_max_queues(VHostNetState *net)
24{
25 return 1;
26}
27
28struct vhost_net *vhost_net_init(VhostNetOptions *options)
29{
30 error_report("vhost-net support is not compiled in");
31 return NULL;
32}
33
34int vhost_net_start(VirtIODevice *dev,
35 NetClientState *ncs,
05ba3f63 36 int data_queue_pairs, int cvq)
7b28c615
PB
37{
38 return -ENOSYS;
39}
40void vhost_net_stop(VirtIODevice *dev,
41 NetClientState *ncs,
05ba3f63 42 int data_queue_pairs, int cvq)
7b28c615
PB
43{
44}
45
46void vhost_net_cleanup(struct vhost_net *net)
47{
48}
49
50uint64_t vhost_net_get_features(struct vhost_net *net, uint64_t features)
51{
52 return features;
53}
54
38140cc4
CL
55int vhost_net_get_config(struct vhost_net *net, uint8_t *config,
56 uint32_t config_len)
57{
58 return 0;
59}
60int vhost_net_set_config(struct vhost_net *net, const uint8_t *data,
61 uint32_t offset, uint32_t size, uint32_t flags)
62{
63 return 0;
64}
65
7b28c615
PB
66void vhost_net_ack_features(struct vhost_net *net, uint64_t features)
67{
68}
69
70uint64_t vhost_net_get_acked_features(VHostNetState *net)
71{
72 return 0;
73}
74
75bool vhost_net_virtqueue_pending(VHostNetState *net, int idx)
76{
77 return false;
78}
79
80void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
81 int idx, bool mask)
82{
83}
84
8aab0d1d
CL
85bool vhost_net_config_pending(VHostNetState *net)
86{
87 return false;
88}
89
90void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask)
91{
92}
93
7b28c615
PB
94int vhost_net_notify_migration_done(struct vhost_net *net, char* mac_addr)
95{
96 return -1;
97}
98
99VHostNetState *get_vhost_net(NetClientState *nc)
100{
101 return 0;
102}
103
104int vhost_set_vring_enable(NetClientState *nc, int enable)
105{
106 return 0;
107}
108
109int vhost_net_set_mtu(struct vhost_net *net, uint16_t mtu)
110{
111 return 0;
112}
c2daa08e
KX
113
114void vhost_net_virtqueue_reset(VirtIODevice *vdev, NetClientState *nc,
115 int vq_index)
116{
117
118}
10f8a115
KX
119
120int vhost_net_virtqueue_restart(VirtIODevice *vdev, NetClientState *nc,
121 int vq_index)
122{
123 return 0;
124}
c9bdc449
HH
125
126void vhost_net_save_acked_features(NetClientState *nc)
127{
128
129}