- switch (msg.request.master) {
- case VHOST_USER_GET_FEATURES:
- ret = vhost_user_get_features(&dev, &msg);
- send_vhost_reply(fd, &msg);
- break;
- case VHOST_USER_SET_FEATURES:
- ret = vhost_user_set_features(&dev, &msg);
- break;
-
- case VHOST_USER_GET_PROTOCOL_FEATURES:
- ret = vhost_user_get_protocol_features(&dev, &msg);
- send_vhost_reply(fd, &msg);
- break;
- case VHOST_USER_SET_PROTOCOL_FEATURES:
- ret = vhost_user_set_protocol_features(&dev, &msg);
- break;
-
- case VHOST_USER_SET_OWNER:
- ret = vhost_user_set_owner(&dev, &msg);
- break;
- case VHOST_USER_RESET_OWNER:
- ret = vhost_user_reset_owner(&dev, &msg);
- break;
-
- case VHOST_USER_SET_MEM_TABLE:
- ret = vhost_user_set_mem_table(&dev, &msg);
- break;
-
- case VHOST_USER_SET_LOG_BASE:
- ret = vhost_user_set_log_base(&dev, &msg);
- if (ret)
- goto skip_to_reply;
- /* it needs a reply */
- send_vhost_reply(fd, &msg);
- break;
- case VHOST_USER_SET_LOG_FD:
- ret = vhost_user_set_log_fd(&dev, &msg);
- break;
-
- case VHOST_USER_SET_VRING_NUM:
- ret = vhost_user_set_vring_num(&dev, &msg);
- break;
- case VHOST_USER_SET_VRING_ADDR:
- ret = vhost_user_set_vring_addr(&dev, &msg);
- break;
- case VHOST_USER_SET_VRING_BASE:
- ret = vhost_user_set_vring_base(&dev, &msg);
- break;
-
- case VHOST_USER_GET_VRING_BASE:
- ret = vhost_user_get_vring_base(&dev, &msg);
- if (ret)
- goto skip_to_reply;
- send_vhost_reply(fd, &msg);
- break;
-
- case VHOST_USER_SET_VRING_KICK:
- ret = vhost_user_set_vring_kick(&dev, &msg);
- break;
- case VHOST_USER_SET_VRING_CALL:
- ret = vhost_user_set_vring_call(&dev, &msg);
- break;
-
- case VHOST_USER_SET_VRING_ERR:
- ret = vhost_user_set_vring_err(&dev, &msg);
- break;
-
- case VHOST_USER_GET_QUEUE_NUM:
- ret = vhost_user_get_queue_num(&dev, &msg);
- send_vhost_reply(fd, &msg);
- break;
-
- case VHOST_USER_SET_VRING_ENABLE:
- ret = vhost_user_set_vring_enable(&dev, &msg);
- break;
- case VHOST_USER_SEND_RARP:
- ret = vhost_user_send_rarp(&dev, &msg);
- break;
-
- case VHOST_USER_NET_SET_MTU:
- ret = vhost_user_net_set_mtu(&dev, &msg);
- break;
-
- case VHOST_USER_SET_SLAVE_REQ_FD:
- ret = vhost_user_set_req_fd(&dev, &msg);
- break;
-
- case VHOST_USER_IOTLB_MSG:
- ret = vhost_user_iotlb_msg(&dev, &msg);
- break;