net/virtio-user: support memory hotplug
[dpdk.git] / drivers / net / virtio / virtio_user / virtio_user_dev.h
index 5f87557..cadff0c 100644 (file)
@@ -6,6 +6,7 @@
 #define _VIRTIO_USER_DEV_H
 
 #include <limits.h>
+#include <stdbool.h>
 #include "../virtio_pci.h"
 #include "../virtio_ring.h"
 #include "vhost.h"
@@ -13,6 +14,8 @@
 struct virtio_user_dev {
        /* for vhost_user backend */
        int             vhostfd;
+       int             listenfd;   /* listening fd */
+       bool            is_server;  /* server or client mode */
 
        /* for vhost_kernel backend */
        char            *ifname;
@@ -36,6 +39,8 @@ struct virtio_user_dev {
        char            path[PATH_MAX];
        struct vring    vrings[VIRTIO_MAX_VIRTQUEUES];
        struct virtio_user_backend_ops *ops;
+       pthread_mutex_t mutex;
+       bool            started;
 };
 
 int is_vhost_user_by_type(const char *path);