Lines Matching refs:msg

98 		vhost_message_handlers[ctx->msg.request.master].description,  in validate_msg_fds()
300 ctx->msg.payload.u64 = features; in vhost_user_get_features()
301 ctx->msg.size = sizeof(ctx->msg.payload.u64); in vhost_user_get_features()
320 ctx->msg.payload.u64 = (uint64_t)queue_num; in vhost_user_get_queue_num()
321 ctx->msg.size = sizeof(ctx->msg.payload.u64); in vhost_user_get_queue_num()
336 uint64_t features = ctx->msg.payload.u64; in vhost_user_set_features()
423 struct vhost_virtqueue *vq = dev->virtqueue[ctx->msg.payload.state.index]; in vhost_user_set_vring_num()
425 if (ctx->msg.payload.state.num > 32768) { in vhost_user_set_vring_num()
427 dev->ifname, ctx->msg.payload.state.num); in vhost_user_set_vring_num()
431 vq->size = ctx->msg.payload.state.num; in vhost_user_set_vring_num()
863 struct vhost_vring_addr *addr = &ctx->msg.payload.addr; in vhost_user_set_vring_addr()
870 vq = dev->virtqueue[ctx->msg.payload.addr.index]; in vhost_user_set_vring_addr()
885 dev = translate_ring_addresses(dev, ctx->msg.payload.addr.index); in vhost_user_set_vring_addr()
904 struct vhost_virtqueue *vq = dev->virtqueue[ctx->msg.payload.state.index]; in vhost_user_set_vring_base()
905 uint64_t val = ctx->msg.payload.state.num; in vhost_user_set_vring_base()
922 vq->last_used_idx = ctx->msg.payload.state.num; in vhost_user_set_vring_base()
923 vq->last_avail_idx = ctx->msg.payload.state.num; in vhost_user_set_vring_base()
928 dev->ifname, ctx->msg.payload.state.index, vq->last_used_idx, in vhost_user_set_vring_base()
1130 memory = &ctx->msg.payload.memory; in vhost_user_postcopy_register()
1152 if (ack_ctx.msg.request.master != VHOST_USER_SET_MEM_TABLE) { in vhost_user_postcopy_register()
1154 dev->ifname, ack_ctx.msg.request.master); in vhost_user_postcopy_register()
1261 struct VhostUserMemory *memory = &ctx->msg.payload.memory; in vhost_user_set_mem_table()
1552 if (ctx->msg.size != sizeof(ctx->msg.payload.inflight)) { in vhost_user_get_inflight_fd()
1554 dev->ifname, ctx->msg.size); in vhost_user_get_inflight_fd()
1576 num_queues = ctx->msg.payload.inflight.num_queues; in vhost_user_get_inflight_fd()
1577 queue_size = ctx->msg.payload.inflight.queue_size; in vhost_user_get_inflight_fd()
1580 dev->ifname, ctx->msg.payload.inflight.num_queues); in vhost_user_get_inflight_fd()
1582 dev->ifname, ctx->msg.payload.inflight.queue_size); in vhost_user_get_inflight_fd()
1593 ctx->msg.payload.inflight.mmap_size = 0; in vhost_user_get_inflight_fd()
1609 dev->inflight_info->size = ctx->msg.payload.inflight.mmap_size = mmap_size; in vhost_user_get_inflight_fd()
1611 ctx->msg.payload.inflight.mmap_offset = 0; in vhost_user_get_inflight_fd()
1627 dev->ifname, ctx->msg.payload.inflight.mmap_size); in vhost_user_get_inflight_fd()
1629 dev->ifname, ctx->msg.payload.inflight.mmap_offset); in vhost_user_get_inflight_fd()
1653 if (ctx->msg.size != sizeof(ctx->msg.payload.inflight) || fd < 0) { in vhost_user_set_inflight_fd()
1655 dev->ifname, ctx->msg.size, fd); in vhost_user_set_inflight_fd()
1659 mmap_size = ctx->msg.payload.inflight.mmap_size; in vhost_user_set_inflight_fd()
1660 mmap_offset = ctx->msg.payload.inflight.mmap_offset; in vhost_user_set_inflight_fd()
1661 num_queues = ctx->msg.payload.inflight.num_queues; in vhost_user_set_inflight_fd()
1662 queue_size = ctx->msg.payload.inflight.queue_size; in vhost_user_set_inflight_fd()
1746 expected_fds = (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) ? 0 : 1; in vhost_user_set_vring_call()
1750 file.index = ctx->msg.payload.u64 & VHOST_USER_VRING_IDX_MASK; in vhost_user_set_vring_call()
1751 if (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) in vhost_user_set_vring_call()
1780 expected_fds = (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) ? 0 : 1; in vhost_user_set_vring_err()
1784 if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK)) in vhost_user_set_vring_err()
2000 expected_fds = (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) ? 0 : 1; in vhost_user_set_vring_kick()
2004 file.index = ctx->msg.payload.u64 & VHOST_USER_VRING_IDX_MASK; in vhost_user_set_vring_kick()
2005 if (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) in vhost_user_set_vring_kick()
2069 struct vhost_virtqueue *vq = dev->virtqueue[ctx->msg.payload.state.index]; in vhost_user_get_vring_base()
2086 ctx->msg.payload.state.num = val; in vhost_user_get_vring_base()
2088 ctx->msg.payload.state.num = vq->last_avail_idx; in vhost_user_get_vring_base()
2092 dev->ifname, ctx->msg.payload.state.index, in vhost_user_get_vring_base()
2093 ctx->msg.payload.state.num); in vhost_user_get_vring_base()
2125 ctx->msg.size = sizeof(ctx->msg.payload.state); in vhost_user_get_vring_base()
2145 bool enable = !!ctx->msg.payload.state.num; in vhost_user_set_vring_enable()
2146 int index = (int)ctx->msg.payload.state.index; in vhost_user_set_vring_enable()
2176 ctx->msg.payload.u64 = protocol_features; in vhost_user_get_protocol_features()
2177 ctx->msg.size = sizeof(ctx->msg.payload.u64); in vhost_user_get_protocol_features()
2189 uint64_t protocol_features = ctx->msg.payload.u64; in vhost_user_set_protocol_features()
2225 if (ctx->msg.size != sizeof(VhostUserLog)) { in vhost_user_set_log_base()
2227 dev->ifname, ctx->msg.size, (int)sizeof(VhostUserLog)); in vhost_user_set_log_base()
2231 size = ctx->msg.payload.log.mmap_size; in vhost_user_set_log_base()
2232 off = ctx->msg.payload.log.mmap_offset; in vhost_user_set_log_base()
2289 ctx->msg.size = 0; in vhost_user_set_log_base()
2328 uint8_t *mac = (uint8_t *)&ctx->msg.payload.u64; in vhost_user_send_rarp()
2357 if (ctx->msg.payload.u64 < VIRTIO_MIN_MTU || in vhost_user_net_set_mtu()
2358 ctx->msg.payload.u64 > VIRTIO_MAX_MTU) { in vhost_user_net_set_mtu()
2360 dev->ifname, ctx->msg.payload.u64); in vhost_user_net_set_mtu()
2365 dev->mtu = ctx->msg.payload.u64; in vhost_user_net_set_mtu()
2476 struct vhost_iotlb_msg *imsg = &ctx->msg.payload.iotlb; in vhost_user_iotlb_msg()
2596 ctx->msg.payload.u64 = 0; in vhost_user_postcopy_end()
2597 ctx->msg.size = sizeof(ctx->msg.payload.u64); in vhost_user_postcopy_end()
2610 ctx->msg.payload.u64 = dev->status; in vhost_user_get_status()
2611 ctx->msg.size = sizeof(ctx->msg.payload.u64); in vhost_user_get_status()
2625 if (ctx->msg.payload.u64 > UINT8_MAX) { in vhost_user_set_status()
2627 dev->ifname, ctx->msg.payload.u64); in vhost_user_set_status()
2631 dev->status = ctx->msg.payload.u64; in vhost_user_set_status()
2710 ret = read_fd_message(dev->ifname, sockfd, (char *)&ctx->msg, VHOST_USER_HDR_SIZE, in read_vhost_message()
2720 if (ctx->msg.size) { in read_vhost_message()
2721 if (ctx->msg.size > sizeof(ctx->msg.payload)) { in read_vhost_message()
2723 dev->ifname, ctx->msg.size); in read_vhost_message()
2726 ret = read(sockfd, &ctx->msg.payload, ctx->msg.size); in read_vhost_message()
2729 if (ret != (int)ctx->msg.size) { in read_vhost_message()
2744 return send_fd_message(dev->ifname, sockfd, (char *)&ctx->msg, in send_vhost_message()
2745 VHOST_USER_HDR_SIZE + ctx->msg.size, ctx->fds, ctx->fd_num); in send_vhost_message()
2754 ctx->msg.flags &= ~VHOST_USER_VERSION_MASK; in send_vhost_reply()
2755 ctx->msg.flags &= ~VHOST_USER_NEED_REPLY; in send_vhost_reply()
2756 ctx->msg.flags |= VHOST_USER_VERSION; in send_vhost_reply()
2757 ctx->msg.flags |= VHOST_USER_REPLY_MASK; in send_vhost_reply()
2768 if (ctx->msg.flags & VHOST_USER_NEED_REPLY) in send_vhost_slave_message()
2772 if (ret < 0 && (ctx->msg.flags & VHOST_USER_NEED_REPLY)) in send_vhost_slave_message()
2787 switch (ctx->msg.request.master) { in vhost_user_check_and_alloc_queue_pair()
2791 vring_idx = ctx->msg.payload.u64 & VHOST_USER_VRING_IDX_MASK; in vhost_user_check_and_alloc_queue_pair()
2797 vring_idx = ctx->msg.payload.state.index; in vhost_user_check_and_alloc_queue_pair()
2800 vring_idx = ctx->msg.payload.addr.index; in vhost_user_check_and_alloc_queue_pair()
2803 vring_idx = ctx->msg.payload.inflight.num_queues - 1; in vhost_user_check_and_alloc_queue_pair()
2891 request = ctx.msg.request.master; in vhost_user_msg_handler()
2950 RTE_BUILD_BUG_ON(offsetof(struct vhu_msg_context, msg) != 0); in vhost_user_msg_handler()
2999 RTE_BUILD_BUG_ON(offsetof(struct vhu_msg_context, msg) != 0); in vhost_user_msg_handler()
3027 if (ctx.msg.flags & VHOST_USER_NEED_REPLY) { in vhost_user_msg_handler()
3028 ctx.msg.payload.u64 = ret == RTE_VHOST_MSG_RESULT_ERR; in vhost_user_msg_handler()
3029 ctx.msg.size = sizeof(ctx.msg.payload.u64); in vhost_user_msg_handler()
3086 if ((ctx->msg.flags & VHOST_USER_NEED_REPLY) == 0) in process_slave_message_reply()
3101 if (msg_reply.msg.request.slave != ctx->msg.request.slave) { in process_slave_message_reply()
3103 dev->ifname, msg_reply.msg.request.slave, ctx->msg.request.slave); in process_slave_message_reply()
3108 ret = msg_reply.msg.payload.u64 ? -1 : 0; in process_slave_message_reply()
3120 .msg = { in vhost_user_iotlb_miss()
3123 .size = sizeof(ctx.msg.payload.iotlb), in vhost_user_iotlb_miss()
3147 .msg = { in vhost_user_slave_config_change()
3155 ctx.msg.flags |= VHOST_USER_NEED_REPLY; in vhost_user_slave_config_change()
3186 .msg = { in vhost_user_slave_set_vring_host_notifier()
3189 .size = sizeof(ctx.msg.payload.area), in vhost_user_slave_set_vring_host_notifier()
3199 ctx.msg.payload.area.u64 |= VHOST_USER_VRING_NOFD_MASK; in vhost_user_slave_set_vring_host_notifier()