diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-02-14 18:35:49 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-02-21 12:28:01 -0500 |
commit | 56f41de7372eb81e751e65942e7ec928e07fb67e (patch) | |
tree | 0de8e97db26597c57ebde105375528eb4cfe9069 /net/Makefile.objs | |
parent | 7b28c61524540e325e241aa31e6f10e99a5a9516 (diff) |
vhost-net-user: add stubs for when no virtio-net device is present
hw/net/vhost_net.c needs functions that are declared in net/vhost-user.c: the
vhost-user code is always compiled into QEMU, only the constructor
net_init_vhost_user is unreachable. Also, net/vhost-user.c needs functions
declared in hw/virtio/vhost-stub.c even if no virtio device exists.
Break this dependency. First, add a minimal version of net/vhost-user.c,
with no functionality and no dependency on vhost code. Second, #ifdef out
the calls back to net/vhost-user.c from hw/net/vhost_net.c.
While at it, this patch fixes the CONFIG_VHOST_NET_USE*D* typo.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1543851204-41186-3-git-send-email-pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1550165756-21617-3-git-send-email-pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/Makefile.objs')
-rw-r--r-- | net/Makefile.objs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/Makefile.objs b/net/Makefile.objs index b2bf88a0ef..df2b409066 100644 --- a/net/Makefile.objs +++ b/net/Makefile.objs @@ -3,7 +3,9 @@ common-obj-y += socket.o common-obj-y += dump.o common-obj-y += eth.o common-obj-$(CONFIG_L2TPV3) += l2tpv3.o -common-obj-$(CONFIG_POSIX) += vhost-user.o +common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET_USER)) += vhost-user.o +common-obj-$(call land,$(call lnot,$(CONFIG_VIRTIO_NET)),$(CONFIG_VHOST_NET_USER)) += vhost-user-stub.o +common-obj-$(CONFIG_ALL) += vhost-user-stub.o common-obj-$(CONFIG_SLIRP) += slirp.o common-obj-$(CONFIG_VDE) += vde.o common-obj-$(CONFIG_NETMAP) += netmap.o |