FreeBSD/sys/dev/hyperv/utilities/hv_kvp.c
/*
 * This routine is called whenever a message is received from the host
 */
This routine is called whenever a message is received from the host
This routine is called whenever a message is received from the host
static void
hv_kvp_transaction_init(hv_kvp_sc *sc, uint32_t rcv_len,
			uint64_t request_id, uint8_t *rcv_buf)
{
	sc->req_in_progress = true;
	sc->host_msg_len = rcv_len;
	sc->host_msg_id = request_id;
	sc->rcv_buf = rcv_buf;
	sc->host_kvp_msg = (struct hv_kvp_msg *)&rcv_buf[
		sizeof(struct hv_vmbus_pipe_hdr) +
		sizeof(struct hv_vmbus_icmsg_hdr)];
}
static void hv_kvp_transaction_init ( hv_kvp_sc * sc , uint32_t rcv_len , uint64_t request_id , uint8_t * rcv_buf ) { sc -> req_in_progress = true ; sc -> host_msg_len = rcv_len ; sc -> host_msg_id = request_id ; sc -> rcv_buf = rcv_buf ; sc -> host_kvp_msg = ( struct hv_kvp_msg * ) & rcv_buf [ sizeof ( struct hv_vmbus_pipe_hdr ) + sizeof ( struct hv_vmbus_icmsg_hdr ) ] ; }
This routine is called whenever a message is received from the host
This routine is called whenever a message is received from the host
/* Store all the relevant message details in the global structure */ /* Do not need to use mutex for req_in_progress here */