Lines Matching full:packet

195         error_setg(errp, "multifd: received packet magic %x "  in multifd_recv_initial_packet()
201 error_setg(errp, "multifd: received packet version %u " in multifd_recv_initial_packet()
226 /* Fills a RAM multifd packet */
229 MultiFDPacket_t *packet = p->packet; in multifd_send_fill_packet() local
233 memset(packet, 0, p->packet_len); in multifd_send_fill_packet()
235 packet->hdr.magic = cpu_to_be32(MULTIFD_MAGIC); in multifd_send_fill_packet()
236 packet->hdr.version = cpu_to_be32(MULTIFD_VERSION); in multifd_send_fill_packet()
238 packet->hdr.flags = cpu_to_be32(p->flags); in multifd_send_fill_packet()
239 packet->next_packet_size = cpu_to_be32(p->next_packet_size); in multifd_send_fill_packet()
242 packet->packet_num = cpu_to_be64(packet_num); in multifd_send_fill_packet()
262 error_setg(errp, "multifd: received packet magic %x, expected %x", in multifd_recv_unfill_packet_header()
268 error_setg(errp, "multifd: received packet version %u, expected %u", in multifd_recv_unfill_packet_header()
281 MultiFDPacketDeviceState_t *packet = p->packet_dev_state; in multifd_recv_unfill_packet_device_state() local
283 packet->instance_id = be32_to_cpu(packet->instance_id); in multifd_recv_unfill_packet_device_state()
284 p->next_packet_size = be32_to_cpu(packet->next_packet_size); in multifd_recv_unfill_packet_device_state()
291 const MultiFDPacket_t *packet = p->packet; in multifd_recv_unfill_packet_ram() local
294 p->next_packet_size = be32_to_cpu(packet->next_packet_size); in multifd_recv_unfill_packet_ram()
295 p->packet_num = be64_to_cpu(packet->packet_num); in multifd_recv_unfill_packet_ram()
520 g_free(p->packet); in multifd_send_cleanup_channel()
521 p->packet = NULL; in multifd_send_cleanup_channel()
712 * The packet header in the zerocopy RAM case is accounted for in multifd_send_thread()
759 ret = qio_channel_write_all(p->c, (void *)p->packet, in multifd_send_thread()
764 /* p->next_packet_size will always be zero for a SYNC packet */ in multifd_send_thread()
954 p->packet = g_malloc0(p->packet_len); in multifd_send_setup()
1132 g_free(p->packet); in multifd_recv_cleanup_channel()
1133 p->packet = NULL; in multifd_recv_cleanup_channel()
1201 * the SYNC packet on the stream. in multifd_recv_sync_main()
1321 pkt_buf = (uint8_t *)p->packet + sizeof(hdr); in multifd_recv_thread()
1329 error_setg(&local_err, "multifd: unexpected EOF after packet header"); in multifd_recv_thread()
1352 * Even if it's a SYNC packet, this needs to be set in multifd_recv_thread()
1354 * the SYNC packet. in multifd_recv_thread()
1405 "multifd: received empty device state packet"); in multifd_recv_thread()
1413 "multifd: received SYNC device state packet"); in multifd_recv_thread()
1484 p->packet = g_malloc0(p->packet_len); in multifd_recv_setup()
1536 "failed to receive packet" in multifd_recv_new_channel()