]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/virtio/virtio_user/virtio_user_dev.h
net/virtio-user: support memory hotplug
[dpdk.git] / drivers / net / virtio / virtio_user / virtio_user_dev.h
index 5f8755771be8adcd567f4a4a0c63fa948f4ca81d..cadff0cba6de10f5ed8a587110ad02c12dcbeb25 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);