common/sfc_efx/base: add function control window concept
[dpdk.git] / drivers / net / virtio / virtio_user / vhost.h
index 668cc99..8f49ef4 100644 (file)
@@ -2,8 +2,8 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
-#ifndef _VHOST_NET_USER_H
-#define _VHOST_NET_USER_H
+#ifndef _VIRTIO_USER_VHOST_H
+#define _VIRTIO_USER_VHOST_H
 
 #include <stdint.h>
 #include <linux/types.h>
@@ -44,6 +44,23 @@ struct vhost_vring_addr {
        uint64_t log_guest_addr;
 };
 
+#ifndef VHOST_USER_F_PROTOCOL_FEATURES
+#define VHOST_USER_F_PROTOCOL_FEATURES 30
+#endif
+
+/** Protocol features. */
+#ifndef VHOST_USER_PROTOCOL_F_MQ
+#define VHOST_USER_PROTOCOL_F_MQ 0
+#endif
+
+#ifndef VHOST_USER_PROTOCOL_F_REPLY_ACK
+#define VHOST_USER_PROTOCOL_F_REPLY_ACK 3
+#endif
+
+#ifndef VHOST_USER_PROTOCOL_F_STATUS
+#define VHOST_USER_PROTOCOL_F_STATUS 16
+#endif
+
 enum vhost_user_request {
        VHOST_USER_NONE = 0,
        VHOST_USER_GET_FEATURES = 1,
@@ -64,10 +81,12 @@ enum vhost_user_request {
        VHOST_USER_SET_PROTOCOL_FEATURES = 16,
        VHOST_USER_GET_QUEUE_NUM = 17,
        VHOST_USER_SET_VRING_ENABLE = 18,
+       VHOST_USER_SET_STATUS = 39,
+       VHOST_USER_GET_STATUS = 40,
        VHOST_USER_MAX
 };
 
-const char * const vhost_msg_strings[VHOST_USER_MAX];
+extern const char * const vhost_msg_strings[VHOST_USER_MAX];
 
 struct vhost_memory_region {
        uint64_t guest_phys_addr;
@@ -88,7 +107,7 @@ struct virtio_user_backend_ops {
                         int enable);
 };
 
-struct virtio_user_backend_ops ops_user;
-struct virtio_user_backend_ops ops_kernel;
+extern struct virtio_user_backend_ops virtio_ops_user;
+extern struct virtio_user_backend_ops virtio_ops_kernel;
 
 #endif