vhost: support async dequeue for split ring
[dpdk.git] / lib / vhost / vhost_user.h
index be53669..ba1c5c7 100644 (file)
@@ -59,7 +59,6 @@ typedef enum VhostUserRequest {
        VHOST_USER_SET_INFLIGHT_FD = 32,
        VHOST_USER_SET_STATUS = 39,
        VHOST_USER_GET_STATUS = 40,
-       VHOST_USER_MAX = 41
 } VhostUserRequest;
 
 typedef enum VhostUserSlaveRequest {
@@ -67,7 +66,6 @@ typedef enum VhostUserSlaveRequest {
        VHOST_USER_SLAVE_IOTLB_MSG = 1,
        VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
        VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
-       VHOST_USER_SLAVE_MAX
 } VhostUserSlaveRequest;
 
 typedef struct VhostUserMemoryRegion {
@@ -152,10 +150,13 @@ typedef struct VhostUserMsg {
        /* Nothing should be added after the payload */
 } __rte_packed VhostUserMsg;
 
-struct vhu_msg_context {
+/* Note: this structure and VhostUserMsg can't be changed carelessly as
+ * external message handlers rely on them.
+ */
+struct __rte_packed vhu_msg_context {
+       VhostUserMsg msg;
        int fds[VHOST_MEMORY_MAX_NREGIONS];
        int fd_num;
-       VhostUserMsg msg;
 };
 
 #define VHOST_USER_HDR_SIZE offsetof(VhostUserMsg, payload.u64)