2
0

vhost_net-stub.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #include "qemu/osdep.h"
  13. #include "net/net.h"
  14. #include "net/tap.h"
  15. #include "net/vhost-user.h"
  16. #include "hw/virtio/virtio-net.h"
  17. #include "net/vhost_net.h"
  18. #include "qemu/error-report.h"
  19. uint64_t vhost_net_get_max_queues(VHostNetState *net)
  20. {
  21. return 1;
  22. }
  23. struct vhost_net *vhost_net_init(VhostNetOptions *options)
  24. {
  25. error_report("vhost-net support is not compiled in");
  26. return NULL;
  27. }
  28. int vhost_net_start(VirtIODevice *dev,
  29. NetClientState *ncs,
  30. int total_queues)
  31. {
  32. return -ENOSYS;
  33. }
  34. void vhost_net_stop(VirtIODevice *dev,
  35. NetClientState *ncs,
  36. int total_queues)
  37. {
  38. }
  39. void vhost_net_cleanup(struct vhost_net *net)
  40. {
  41. }
  42. uint64_t vhost_net_get_features(struct vhost_net *net, uint64_t features)
  43. {
  44. return features;
  45. }
  46. void vhost_net_ack_features(struct vhost_net *net, uint64_t features)
  47. {
  48. }
  49. uint64_t vhost_net_get_acked_features(VHostNetState *net)
  50. {
  51. return 0;
  52. }
  53. bool vhost_net_virtqueue_pending(VHostNetState *net, int idx)
  54. {
  55. return false;
  56. }
  57. void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
  58. int idx, bool mask)
  59. {
  60. }
  61. int vhost_net_notify_migration_done(struct vhost_net *net, char* mac_addr)
  62. {
  63. return -1;
  64. }
  65. VHostNetState *get_vhost_net(NetClientState *nc)
  66. {
  67. return 0;
  68. }
  69. int vhost_set_vring_enable(NetClientState *nc, int enable)
  70. {
  71. return 0;
  72. }
  73. int vhost_net_set_mtu(struct vhost_net *net, uint16_t mtu)
  74. {
  75. return 0;
  76. }