vhost: introduce postcopy advise message
[dpdk.git] / lib / librte_vhost / vhost_user.h
index 42166ad..2030b40 100644 (file)
@@ -50,7 +50,8 @@ typedef enum VhostUserRequest {
        VHOST_USER_IOTLB_MSG = 22,
        VHOST_USER_CRYPTO_CREATE_SESS = 26,
        VHOST_USER_CRYPTO_CLOSE_SESS = 27,
-       VHOST_USER_MAX = 28
+       VHOST_USER_POSTCOPY_ADVISE = 28,
+       VHOST_USER_MAX = 29
 } VhostUserRequest;
 
 typedef enum VhostUserSlaveRequest {
@@ -132,6 +133,7 @@ typedef struct VhostUserMsg {
                VhostUserVringArea area;
        } payload;
        int fds[VHOST_MEMORY_MAX_NREGIONS];
+       int fd_num;
 } __attribute((packed)) VhostUserMsg;
 
 #define VHOST_USER_HDR_SIZE offsetof(VhostUserMsg, payload.u64)
@@ -146,7 +148,8 @@ int vhost_user_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm);
 int vhost_user_host_notifier_ctrl(int vid, bool enable);
 
 /* socket.c */
-int read_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num);
+int read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
+               int *fd_num);
 int send_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num);
 
 #endif