mirror of https://gitee.com/openkylin/linux.git
staging: hv: Convert camel cased struct fields in vmbus_packet_format.h to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
767dff6853
commit
415f228712
|
@ -872,7 +872,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
|
||||||
DPRINT_DBG(BLKVSC_DRV, "blkvsc_submit_request() - "
|
DPRINT_DBG(BLKVSC_DRV, "blkvsc_submit_request() - "
|
||||||
"req %p pfn[%d] %llx\n",
|
"req %p pfn[%d] %llx\n",
|
||||||
blkvsc_req, i,
|
blkvsc_req, i,
|
||||||
blkvsc_req->request.data_buffer.PfnArray[i]);
|
blkvsc_req->request.data_buffer.pfn_array[i]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -338,16 +338,16 @@ static void dump_gpadl_header(struct vmbus_channel_gpadl_header *gpadl)
|
||||||
"gpadl header - relid %d, range count %d, range buflen %d",
|
"gpadl header - relid %d, range count %d, range buflen %d",
|
||||||
gpadl->child_relid, gpadl->rangecount, gpadl->range_buflen);
|
gpadl->child_relid, gpadl->rangecount, gpadl->range_buflen);
|
||||||
for (i = 0; i < gpadl->rangecount; i++) {
|
for (i = 0; i < gpadl->rangecount; i++) {
|
||||||
pagecount = gpadl->range[i].ByteCount >> PAGE_SHIFT;
|
pagecount = gpadl->range[i].byte_count >> PAGE_SHIFT;
|
||||||
pagecount = (pagecount > 26) ? 26 : pagecount;
|
pagecount = (pagecount > 26) ? 26 : pagecount;
|
||||||
|
|
||||||
DPRINT_DBG(VMBUS, "gpadl range %d - len %d offset %d "
|
DPRINT_DBG(VMBUS, "gpadl range %d - len %d offset %d "
|
||||||
"page count %d", i, gpadl->range[i].ByteCount,
|
"page count %d", i, gpadl->range[i].byte_count,
|
||||||
gpadl->range[i].ByteOffset, pagecount);
|
gpadl->range[i].byte_offset, pagecount);
|
||||||
|
|
||||||
for (j = 0; j < pagecount; j++)
|
for (j = 0; j < pagecount; j++)
|
||||||
DPRINT_DBG(VMBUS, "%d) pfn %llu", j,
|
DPRINT_DBG(VMBUS, "%d) pfn %llu", j,
|
||||||
gpadl->range[i].PfnArray[j]);
|
gpadl->range[i].pfn_array[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,10 +399,10 @@ static int create_gpadl_header(void *kbuffer, u32 size,
|
||||||
gpadl_header->rangecount = 1;
|
gpadl_header->rangecount = 1;
|
||||||
gpadl_header->range_buflen = sizeof(struct gpa_range) +
|
gpadl_header->range_buflen = sizeof(struct gpa_range) +
|
||||||
pagecount * sizeof(u64);
|
pagecount * sizeof(u64);
|
||||||
gpadl_header->range[0].ByteOffset = 0;
|
gpadl_header->range[0].byte_offset = 0;
|
||||||
gpadl_header->range[0].ByteCount = size;
|
gpadl_header->range[0].byte_count = size;
|
||||||
for (i = 0; i < pfncount; i++)
|
for (i = 0; i < pfncount; i++)
|
||||||
gpadl_header->range[0].PfnArray[i] = pfn+i;
|
gpadl_header->range[0].pfn_array[i] = pfn+i;
|
||||||
*msginfo = msgheader;
|
*msginfo = msgheader;
|
||||||
*messagecount = 1;
|
*messagecount = 1;
|
||||||
|
|
||||||
|
@ -463,10 +463,10 @@ static int create_gpadl_header(void *kbuffer, u32 size,
|
||||||
gpadl_header->rangecount = 1;
|
gpadl_header->rangecount = 1;
|
||||||
gpadl_header->range_buflen = sizeof(struct gpa_range) +
|
gpadl_header->range_buflen = sizeof(struct gpa_range) +
|
||||||
pagecount * sizeof(u64);
|
pagecount * sizeof(u64);
|
||||||
gpadl_header->range[0].ByteOffset = 0;
|
gpadl_header->range[0].byte_offset = 0;
|
||||||
gpadl_header->range[0].ByteCount = size;
|
gpadl_header->range[0].byte_count = size;
|
||||||
for (i = 0; i < pagecount; i++)
|
for (i = 0; i < pagecount; i++)
|
||||||
gpadl_header->range[0].PfnArray[i] = pfn+i;
|
gpadl_header->range[0].pfn_array[i] = pfn+i;
|
||||||
|
|
||||||
*msginfo = msgheader;
|
*msginfo = msgheader;
|
||||||
*messagecount = 1;
|
*messagecount = 1;
|
||||||
|
@ -739,12 +739,12 @@ int vmbus_sendpacket(struct vmbus_channel *channel, const void *buffer,
|
||||||
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
||||||
|
|
||||||
/* Setup the descriptor */
|
/* Setup the descriptor */
|
||||||
desc.Type = type; /* VmbusPacketTypeDataInBand; */
|
desc.type = type; /* VmbusPacketTypeDataInBand; */
|
||||||
desc.Flags = flags; /* VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; */
|
desc.flags = flags; /* VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; */
|
||||||
/* in 8-bytes granularity */
|
/* in 8-bytes granularity */
|
||||||
desc.DataOffset8 = sizeof(struct vmpacket_descriptor) >> 3;
|
desc.offset8 = sizeof(struct vmpacket_descriptor) >> 3;
|
||||||
desc.Length8 = (u16)(packetlen_aligned >> 3);
|
desc.len8 = (u16)(packetlen_aligned >> 3);
|
||||||
desc.TransactionId = requestid;
|
desc.trans_id = requestid;
|
||||||
|
|
||||||
sg_init_table(bufferlist, 3);
|
sg_init_table(bufferlist, 3);
|
||||||
sg_set_buf(&bufferlist[0], &desc, sizeof(struct vmpacket_descriptor));
|
sg_set_buf(&bufferlist[0], &desc, sizeof(struct vmpacket_descriptor));
|
||||||
|
@ -798,7 +798,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
|
||||||
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
||||||
|
|
||||||
/* Setup the descriptor */
|
/* Setup the descriptor */
|
||||||
desc.type = VmbusPacketTypeDataUsingGpaDirect;
|
desc.type = VM_PKT_DATA_USING_GPA_DIRECT;
|
||||||
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
|
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
|
||||||
desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */
|
desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */
|
||||||
desc.length8 = (u16)(packetlen_aligned >> 3);
|
desc.length8 = (u16)(packetlen_aligned >> 3);
|
||||||
|
@ -867,7 +867,7 @@ int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
|
||||||
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
|
||||||
|
|
||||||
/* Setup the descriptor */
|
/* Setup the descriptor */
|
||||||
desc.type = VmbusPacketTypeDataUsingGpaDirect;
|
desc.type = VM_PKT_DATA_USING_GPA_DIRECT;
|
||||||
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
|
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
|
||||||
desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */
|
desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */
|
||||||
desc.length8 = (u16)(packetlen_aligned >> 3);
|
desc.length8 = (u16)(packetlen_aligned >> 3);
|
||||||
|
@ -934,14 +934,14 @@ int vmbus_recvpacket(struct vmbus_channel *channel, void *buffer,
|
||||||
|
|
||||||
/* VmbusChannelClearEvent(Channel); */
|
/* VmbusChannelClearEvent(Channel); */
|
||||||
|
|
||||||
packetlen = desc.Length8 << 3;
|
packetlen = desc.len8 << 3;
|
||||||
userlen = packetlen - (desc.DataOffset8 << 3);
|
userlen = packetlen - (desc.offset8 << 3);
|
||||||
/* ASSERT(userLen > 0); */
|
/* ASSERT(userLen > 0); */
|
||||||
|
|
||||||
DPRINT_DBG(VMBUS, "packet received on channel %p relid %d <type %d "
|
DPRINT_DBG(VMBUS, "packet received on channel %p relid %d <type %d "
|
||||||
"flag %d tid %llx pktlen %d datalen %d> ",
|
"flag %d tid %llx pktlen %d datalen %d> ",
|
||||||
channel, channel->offermsg.child_relid, desc.Type,
|
channel, channel->offermsg.child_relid, desc.type,
|
||||||
desc.Flags, desc.TransactionId, packetlen, userlen);
|
desc.flags, desc.trans_id, packetlen, userlen);
|
||||||
|
|
||||||
*buffer_actual_len = userlen;
|
*buffer_actual_len = userlen;
|
||||||
|
|
||||||
|
@ -953,11 +953,11 @@ int vmbus_recvpacket(struct vmbus_channel *channel, void *buffer,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*requestid = desc.TransactionId;
|
*requestid = desc.trans_id;
|
||||||
|
|
||||||
/* Copy over the packet to the user buffer */
|
/* Copy over the packet to the user buffer */
|
||||||
ret = ringbuffer_read(&channel->inbound, buffer, userlen,
|
ret = ringbuffer_read(&channel->inbound, buffer, userlen,
|
||||||
(desc.DataOffset8 << 3));
|
(desc.offset8 << 3));
|
||||||
|
|
||||||
spin_unlock_irqrestore(&channel->inbound_lock, flags);
|
spin_unlock_irqrestore(&channel->inbound_lock, flags);
|
||||||
|
|
||||||
|
@ -994,13 +994,13 @@ int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer,
|
||||||
|
|
||||||
/* VmbusChannelClearEvent(Channel); */
|
/* VmbusChannelClearEvent(Channel); */
|
||||||
|
|
||||||
packetlen = desc.Length8 << 3;
|
packetlen = desc.len8 << 3;
|
||||||
userlen = packetlen - (desc.DataOffset8 << 3);
|
userlen = packetlen - (desc.offset8 << 3);
|
||||||
|
|
||||||
DPRINT_DBG(VMBUS, "packet received on channel %p relid %d <type %d "
|
DPRINT_DBG(VMBUS, "packet received on channel %p relid %d <type %d "
|
||||||
"flag %d tid %llx pktlen %d datalen %d> ",
|
"flag %d tid %llx pktlen %d datalen %d> ",
|
||||||
channel, channel->offermsg.child_relid, desc.Type,
|
channel, channel->offermsg.child_relid, desc.type,
|
||||||
desc.Flags, desc.TransactionId, packetlen, userlen);
|
desc.flags, desc.trans_id, packetlen, userlen);
|
||||||
|
|
||||||
*buffer_actual_len = packetlen;
|
*buffer_actual_len = packetlen;
|
||||||
|
|
||||||
|
@ -1012,7 +1012,7 @@ int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer,
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
*requestid = desc.TransactionId;
|
*requestid = desc.trans_id;
|
||||||
|
|
||||||
/* Copy over the entire packet to the user buffer */
|
/* Copy over the entire packet to the user buffer */
|
||||||
ret = ringbuffer_read(&channel->inbound, buffer, packetlen, 0);
|
ret = ringbuffer_read(&channel->inbound, buffer, packetlen, 0);
|
||||||
|
|
|
@ -194,7 +194,7 @@ void chn_cb_negotiate(void *context)
|
||||||
|
|
||||||
vmbus_sendpacket(channel, buf,
|
vmbus_sendpacket(channel, buf,
|
||||||
recvlen, requestid,
|
recvlen, requestid,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
|
|
@ -224,7 +224,7 @@ kvp_respond_to_host(char *key, char *value, int error)
|
||||||
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE;
|
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE;
|
||||||
|
|
||||||
vmbus_sendpacket(channel, recv_buffer, buf_len, req_id,
|
vmbus_sendpacket(channel, recv_buffer, buf_len, req_id,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
|
|
||||||
kvp_transaction.active = false;
|
kvp_transaction.active = false;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ void hv_kvp_onchannelcallback(void *context)
|
||||||
|
|
||||||
vmbus_sendpacket(channel, recv_buffer,
|
vmbus_sendpacket(channel, recv_buffer,
|
||||||
recvlen, requestid,
|
recvlen, requestid,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ static void shutdown_onchannelcallback(void *context)
|
||||||
|
|
||||||
vmbus_sendpacket(channel, shut_txf_buf,
|
vmbus_sendpacket(channel, shut_txf_buf,
|
||||||
recvlen, requestid,
|
recvlen, requestid,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (execute_shutdown == true)
|
if (execute_shutdown == true)
|
||||||
|
@ -179,7 +179,7 @@ static void timesync_onchannelcallback(void *context)
|
||||||
|
|
||||||
vmbus_sendpacket(channel, time_txf_buf,
|
vmbus_sendpacket(channel, time_txf_buf,
|
||||||
recvlen, requestid,
|
recvlen, requestid,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ static void heartbeat_onchannelcallback(void *context)
|
||||||
|
|
||||||
vmbus_sendpacket(channel, hbeat_txf_buf,
|
vmbus_sendpacket(channel, hbeat_txf_buf,
|
||||||
recvlen, requestid,
|
recvlen, requestid,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ static int netvsc_init_recv_buf(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, init_packet,
|
ret = vmbus_sendpacket(device->channel, init_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)init_packet,
|
(unsigned long)init_packet,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(NETVSC,
|
DPRINT_ERR(NETVSC,
|
||||||
|
@ -404,7 +404,7 @@ static int netvsc_init_send_buf(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, init_packet,
|
ret = vmbus_sendpacket(device->channel, init_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)init_packet,
|
(unsigned long)init_packet,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(NETVSC,
|
DPRINT_ERR(NETVSC,
|
||||||
|
@ -466,7 +466,7 @@ static int netvsc_destroy_recv_buf(struct netvsc_device *net_device)
|
||||||
revoke_packet,
|
revoke_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)revoke_packet,
|
(unsigned long)revoke_packet,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
/*
|
/*
|
||||||
* If we failed here, we might as well return and
|
* If we failed here, we might as well return and
|
||||||
* have a leak rather than continue and a bugchk
|
* have a leak rather than continue and a bugchk
|
||||||
|
@ -540,7 +540,7 @@ static int netvsc_destroy_send_buf(struct netvsc_device *net_device)
|
||||||
revoke_packet,
|
revoke_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)revoke_packet,
|
(unsigned long)revoke_packet,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
/*
|
/*
|
||||||
* If we failed here, we might as well return and have a leak
|
* If we failed here, we might as well return and have a leak
|
||||||
* rather than continue and a bugchk
|
* rather than continue and a bugchk
|
||||||
|
@ -612,7 +612,7 @@ static int netvsc_connect_vsp(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, init_packet,
|
ret = vmbus_sendpacket(device->channel, init_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)init_packet,
|
(unsigned long)init_packet,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -666,7 +666,7 @@ static int netvsc_connect_vsp(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, init_packet,
|
ret = vmbus_sendpacket(device->channel, init_packet,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)init_packet,
|
(unsigned long)init_packet,
|
||||||
VmbusPacketTypeDataInBand, 0);
|
VM_PKT_DATA_INBAND, 0);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(NETVSC,
|
DPRINT_ERR(NETVSC,
|
||||||
"unable to send NvspMessage1TypeSendNdisVersion");
|
"unable to send NvspMessage1TypeSendNdisVersion");
|
||||||
|
@ -872,7 +872,7 @@ static void netvsc_send_completion(struct hv_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
nvsp_packet = (struct nvsp_message *)((unsigned long)packet +
|
nvsp_packet = (struct nvsp_message *)((unsigned long)packet +
|
||||||
(packet->DataOffset8 << 3));
|
(packet->offset8 << 3));
|
||||||
|
|
||||||
DPRINT_DBG(NETVSC, "send completion packet - type %d",
|
DPRINT_DBG(NETVSC, "send completion packet - type %d",
|
||||||
nvsp_packet->hdr.msg_type);
|
nvsp_packet->hdr.msg_type);
|
||||||
|
@ -890,7 +890,7 @@ static void netvsc_send_completion(struct hv_device *device,
|
||||||
NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE) {
|
NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE) {
|
||||||
/* Get the send context */
|
/* Get the send context */
|
||||||
nvsc_packet = (struct hv_netvsc_packet *)(unsigned long)
|
nvsc_packet = (struct hv_netvsc_packet *)(unsigned long)
|
||||||
packet->TransactionId;
|
packet->trans_id;
|
||||||
/* ASSERT(nvscPacket); */
|
/* ASSERT(nvscPacket); */
|
||||||
|
|
||||||
/* Notify the layer above us */
|
/* Notify the layer above us */
|
||||||
|
@ -946,7 +946,7 @@ static int netvsc_send(struct hv_device *device,
|
||||||
ret = vmbus_sendpacket(device->channel, &sendMessage,
|
ret = vmbus_sendpacket(device->channel, &sendMessage,
|
||||||
sizeof(struct nvsp_message),
|
sizeof(struct nvsp_message),
|
||||||
(unsigned long)packet,
|
(unsigned long)packet,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -987,15 +987,15 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
* All inbound packets other than send completion should be xfer page
|
* All inbound packets other than send completion should be xfer page
|
||||||
* packet
|
* packet
|
||||||
*/
|
*/
|
||||||
if (packet->Type != VmbusPacketTypeDataUsingTransferPages) {
|
if (packet->type != VM_PKT_DATA_USING_XFER_PAGES) {
|
||||||
DPRINT_ERR(NETVSC, "Unknown packet type received - %d",
|
DPRINT_ERR(NETVSC, "Unknown packet type received - %d",
|
||||||
packet->Type);
|
packet->type);
|
||||||
put_net_device(device);
|
put_net_device(device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nvsp_packet = (struct nvsp_message *)((unsigned long)packet +
|
nvsp_packet = (struct nvsp_message *)((unsigned long)packet +
|
||||||
(packet->DataOffset8 << 3));
|
(packet->offset8 << 3));
|
||||||
|
|
||||||
/* Make sure this is a valid nvsp packet */
|
/* Make sure this is a valid nvsp packet */
|
||||||
if (nvsp_packet->hdr.msg_type !=
|
if (nvsp_packet->hdr.msg_type !=
|
||||||
|
@ -1011,16 +1011,16 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
|
|
||||||
vmxferpage_packet = (struct vmtransfer_page_packet_header *)packet;
|
vmxferpage_packet = (struct vmtransfer_page_packet_header *)packet;
|
||||||
|
|
||||||
if (vmxferpage_packet->TransferPageSetId != NETVSC_RECEIVE_BUFFER_ID) {
|
if (vmxferpage_packet->xfer_pageset_id != NETVSC_RECEIVE_BUFFER_ID) {
|
||||||
DPRINT_ERR(NETVSC, "Invalid xfer page set id - "
|
DPRINT_ERR(NETVSC, "Invalid xfer page set id - "
|
||||||
"expecting %x got %x", NETVSC_RECEIVE_BUFFER_ID,
|
"expecting %x got %x", NETVSC_RECEIVE_BUFFER_ID,
|
||||||
vmxferpage_packet->TransferPageSetId);
|
vmxferpage_packet->xfer_pageset_id);
|
||||||
put_net_device(device);
|
put_net_device(device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT_DBG(NETVSC, "xfer page - range count %d",
|
DPRINT_DBG(NETVSC, "xfer page - range count %d",
|
||||||
vmxferpage_packet->RangeCount);
|
vmxferpage_packet->range_cnt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grab free packets (range count + 1) to represent this xfer
|
* Grab free packets (range count + 1) to represent this xfer
|
||||||
|
@ -1031,7 +1031,7 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
spin_lock_irqsave(&net_device->recv_pkt_list_lock, flags);
|
spin_lock_irqsave(&net_device->recv_pkt_list_lock, flags);
|
||||||
while (!list_empty(&net_device->recv_pkt_list)) {
|
while (!list_empty(&net_device->recv_pkt_list)) {
|
||||||
list_move_tail(net_device->recv_pkt_list.next, &listHead);
|
list_move_tail(net_device->recv_pkt_list.next, &listHead);
|
||||||
if (++count == vmxferpage_packet->RangeCount + 1)
|
if (++count == vmxferpage_packet->range_cnt + 1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&net_device->recv_pkt_list_lock, flags);
|
spin_unlock_irqrestore(&net_device->recv_pkt_list_lock, flags);
|
||||||
|
@ -1044,7 +1044,7 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
if (count < 2) {
|
if (count < 2) {
|
||||||
DPRINT_ERR(NETVSC, "Got only %d netvsc pkt...needed %d pkts. "
|
DPRINT_ERR(NETVSC, "Got only %d netvsc pkt...needed %d pkts. "
|
||||||
"Dropping this xfer page packet completely!",
|
"Dropping this xfer page packet completely!",
|
||||||
count, vmxferpage_packet->RangeCount + 1);
|
count, vmxferpage_packet->range_cnt + 1);
|
||||||
|
|
||||||
/* Return it to the freelist */
|
/* Return it to the freelist */
|
||||||
spin_lock_irqsave(&net_device->recv_pkt_list_lock, flags);
|
spin_lock_irqsave(&net_device->recv_pkt_list_lock, flags);
|
||||||
|
@ -1056,7 +1056,7 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
flags);
|
flags);
|
||||||
|
|
||||||
netvsc_send_recv_completion(device,
|
netvsc_send_recv_completion(device,
|
||||||
vmxferpage_packet->d.TransactionId);
|
vmxferpage_packet->d.trans_id);
|
||||||
|
|
||||||
put_net_device(device);
|
put_net_device(device);
|
||||||
return;
|
return;
|
||||||
|
@ -1071,9 +1071,9 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
/* ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <= */
|
/* ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <= */
|
||||||
/* vmxferpagePacket->RangeCount); */
|
/* vmxferpagePacket->RangeCount); */
|
||||||
|
|
||||||
if (xferpage_packet->count != vmxferpage_packet->RangeCount) {
|
if (xferpage_packet->count != vmxferpage_packet->range_cnt) {
|
||||||
DPRINT_INFO(NETVSC, "Needed %d netvsc pkts to satisy this xfer "
|
DPRINT_INFO(NETVSC, "Needed %d netvsc pkts to satisy this xfer "
|
||||||
"page...got %d", vmxferpage_packet->RangeCount,
|
"page...got %d", vmxferpage_packet->range_cnt,
|
||||||
xferpage_packet->count);
|
xferpage_packet->count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1091,10 +1091,10 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
netvsc_packet->device = device;
|
netvsc_packet->device = device;
|
||||||
/* Save this so that we can send it back */
|
/* Save this so that we can send it back */
|
||||||
netvsc_packet->completion.recv.recv_completion_tid =
|
netvsc_packet->completion.recv.recv_completion_tid =
|
||||||
vmxferpage_packet->d.TransactionId;
|
vmxferpage_packet->d.trans_id;
|
||||||
|
|
||||||
netvsc_packet->total_data_buflen =
|
netvsc_packet->total_data_buflen =
|
||||||
vmxferpage_packet->Ranges[i].ByteCount;
|
vmxferpage_packet->ranges[i].byte_count;
|
||||||
netvsc_packet->page_buf_cnt = 1;
|
netvsc_packet->page_buf_cnt = 1;
|
||||||
|
|
||||||
/* ASSERT(vmxferpagePacket->Ranges[i].ByteOffset + */
|
/* ASSERT(vmxferpagePacket->Ranges[i].ByteOffset + */
|
||||||
|
@ -1102,20 +1102,20 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
/* netDevice->ReceiveBufferSize); */
|
/* netDevice->ReceiveBufferSize); */
|
||||||
|
|
||||||
netvsc_packet->page_buf[0].len =
|
netvsc_packet->page_buf[0].len =
|
||||||
vmxferpage_packet->Ranges[i].ByteCount;
|
vmxferpage_packet->ranges[i].byte_count;
|
||||||
|
|
||||||
start = virt_to_phys((void *)((unsigned long)net_device->
|
start = virt_to_phys((void *)((unsigned long)net_device->
|
||||||
recv_buf + vmxferpage_packet->Ranges[i].ByteOffset));
|
recv_buf + vmxferpage_packet->ranges[i].byte_offset));
|
||||||
|
|
||||||
netvsc_packet->page_buf[0].pfn = start >> PAGE_SHIFT;
|
netvsc_packet->page_buf[0].pfn = start >> PAGE_SHIFT;
|
||||||
end_virtual = (unsigned long)net_device->recv_buf
|
end_virtual = (unsigned long)net_device->recv_buf
|
||||||
+ vmxferpage_packet->Ranges[i].ByteOffset
|
+ vmxferpage_packet->ranges[i].byte_offset
|
||||||
+ vmxferpage_packet->Ranges[i].ByteCount - 1;
|
+ vmxferpage_packet->ranges[i].byte_count - 1;
|
||||||
end = virt_to_phys((void *)end_virtual);
|
end = virt_to_phys((void *)end_virtual);
|
||||||
|
|
||||||
/* Calculate the page relative offset */
|
/* Calculate the page relative offset */
|
||||||
netvsc_packet->page_buf[0].offset =
|
netvsc_packet->page_buf[0].offset =
|
||||||
vmxferpage_packet->Ranges[i].ByteOffset &
|
vmxferpage_packet->ranges[i].byte_offset &
|
||||||
(PAGE_SIZE - 1);
|
(PAGE_SIZE - 1);
|
||||||
if ((end >> PAGE_SHIFT) != (start >> PAGE_SHIFT)) {
|
if ((end >> PAGE_SHIFT) != (start >> PAGE_SHIFT)) {
|
||||||
/* Handle frame across multiple pages: */
|
/* Handle frame across multiple pages: */
|
||||||
|
@ -1147,8 +1147,8 @@ static void netvsc_receive(struct hv_device *device,
|
||||||
}
|
}
|
||||||
DPRINT_DBG(NETVSC, "[%d] - (abs offset %u len %u) => "
|
DPRINT_DBG(NETVSC, "[%d] - (abs offset %u len %u) => "
|
||||||
"(pfn %llx, offset %u, len %u)", i,
|
"(pfn %llx, offset %u, len %u)", i,
|
||||||
vmxferpage_packet->Ranges[i].ByteOffset,
|
vmxferpage_packet->ranges[i].byte_offset,
|
||||||
vmxferpage_packet->Ranges[i].ByteCount,
|
vmxferpage_packet->ranges[i].byte_count,
|
||||||
netvsc_packet->page_buf[0].pfn,
|
netvsc_packet->page_buf[0].pfn,
|
||||||
netvsc_packet->page_buf[0].offset,
|
netvsc_packet->page_buf[0].offset,
|
||||||
netvsc_packet->page_buf[0].len);
|
netvsc_packet->page_buf[0].len);
|
||||||
|
@ -1187,7 +1187,7 @@ static void netvsc_send_recv_completion(struct hv_device *device,
|
||||||
/* Send the completion */
|
/* Send the completion */
|
||||||
ret = vmbus_sendpacket(device->channel, &recvcompMessage,
|
ret = vmbus_sendpacket(device->channel, &recvcompMessage,
|
||||||
sizeof(struct nvsp_message), transaction_id,
|
sizeof(struct nvsp_message), transaction_id,
|
||||||
VmbusPacketTypeCompletion, 0);
|
VM_PKT_COMP, 0);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* success */
|
/* success */
|
||||||
/* no-op */
|
/* no-op */
|
||||||
|
@ -1300,12 +1300,12 @@ static void netvsc_channel_cb(void *context)
|
||||||
bytes_recvd, request_id);
|
bytes_recvd, request_id);
|
||||||
|
|
||||||
desc = (struct vmpacket_descriptor *)buffer;
|
desc = (struct vmpacket_descriptor *)buffer;
|
||||||
switch (desc->Type) {
|
switch (desc->type) {
|
||||||
case VmbusPacketTypeCompletion:
|
case VM_PKT_COMP:
|
||||||
netvsc_send_completion(device, desc);
|
netvsc_send_completion(device, desc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VmbusPacketTypeDataUsingTransferPages:
|
case VM_PKT_DATA_USING_XFER_PAGES:
|
||||||
netvsc_receive(device, desc);
|
netvsc_receive(device, desc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1313,7 +1313,7 @@ static void netvsc_channel_cb(void *context)
|
||||||
DPRINT_ERR(NETVSC,
|
DPRINT_ERR(NETVSC,
|
||||||
"unhandled packet type %d, "
|
"unhandled packet type %d, "
|
||||||
"tid %llx len %d\n",
|
"tid %llx len %d\n",
|
||||||
desc->Type, request_id,
|
desc->type, request_id,
|
||||||
bytes_recvd);
|
bytes_recvd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@ static int stor_vsc_channel_init(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)request,
|
(unsigned long)request,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(STORVSC,
|
DPRINT_ERR(STORVSC,
|
||||||
|
@ -249,7 +249,7 @@ static int stor_vsc_channel_init(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)request,
|
(unsigned long)request,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(STORVSC,
|
DPRINT_ERR(STORVSC,
|
||||||
|
@ -280,7 +280,7 @@ static int stor_vsc_channel_init(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)request,
|
(unsigned long)request,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -317,7 +317,7 @@ static int stor_vsc_channel_init(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)request,
|
(unsigned long)request,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -642,7 +642,7 @@ int stor_vsc_on_host_reset(struct hv_device *device)
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)&stor_device->reset_request,
|
(unsigned long)&stor_device->reset_request,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
|
DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
|
||||||
|
@ -744,7 +744,7 @@ static int stor_vsc_on_io_request(struct hv_device *device,
|
||||||
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
ret = vmbus_sendpacket(device->channel, vstor_packet,
|
||||||
sizeof(struct vstor_packet),
|
sizeof(struct vstor_packet),
|
||||||
(unsigned long)request_extension,
|
(unsigned long)request_extension,
|
||||||
VmbusPacketTypeDataInBand,
|
VM_PKT_DATA_INBAND,
|
||||||
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,43 +25,43 @@
|
||||||
#define _VMBUSPACKETFORMAT_H_
|
#define _VMBUSPACKETFORMAT_H_
|
||||||
|
|
||||||
struct vmpacket_descriptor {
|
struct vmpacket_descriptor {
|
||||||
u16 Type;
|
u16 type;
|
||||||
u16 DataOffset8;
|
u16 offset8;
|
||||||
u16 Length8;
|
u16 len8;
|
||||||
u16 Flags;
|
u16 flags;
|
||||||
u64 TransactionId;
|
u64 trans_id;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct vmpacket_header {
|
struct vmpacket_header {
|
||||||
u32 PreviousPacketStartOffset;
|
u32 prev_pkt_start_offset;
|
||||||
struct vmpacket_descriptor Descriptor;
|
struct vmpacket_descriptor descriptor;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct vmtransfer_page_range {
|
struct vmtransfer_page_range {
|
||||||
u32 ByteCount;
|
u32 byte_count;
|
||||||
u32 ByteOffset;
|
u32 byte_offset;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct vmtransfer_page_packet_header {
|
struct vmtransfer_page_packet_header {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u16 TransferPageSetId;
|
u16 xfer_pageset_id;
|
||||||
bool SenderOwnsSet;
|
bool sender_owns_set;
|
||||||
u8 Reserved;
|
u8 reserved;
|
||||||
u32 RangeCount;
|
u32 range_cnt;
|
||||||
struct vmtransfer_page_range Ranges[1];
|
struct vmtransfer_page_range ranges[1];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct vmgpadl_packet_header {
|
struct vmgpadl_packet_header {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u32 Gpadl;
|
u32 gpadl;
|
||||||
u32 Reserved;
|
u32 reserved;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct vmadd_remove_transfer_page_set {
|
struct vmadd_remove_transfer_page_set {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u32 Gpadl;
|
u32 gpadl;
|
||||||
u16 TransferPageSetId;
|
u16 xfer_pageset_id;
|
||||||
u16 Reserved;
|
u16 reserved;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -69,9 +69,9 @@ struct vmadd_remove_transfer_page_set {
|
||||||
* look virtually contiguous.
|
* look virtually contiguous.
|
||||||
*/
|
*/
|
||||||
struct gpa_range {
|
struct gpa_range {
|
||||||
u32 ByteCount;
|
u32 byte_count;
|
||||||
u32 ByteOffset;
|
u32 byte_offset;
|
||||||
u64 PfnArray[0];
|
u64 pfn_array[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -83,9 +83,9 @@ struct gpa_range {
|
||||||
*/
|
*/
|
||||||
struct vmestablish_gpadl {
|
struct vmestablish_gpadl {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u32 Gpadl;
|
u32 gpadl;
|
||||||
u32 RangeCount;
|
u32 range_cnt;
|
||||||
struct gpa_range Range[1];
|
struct gpa_range range[1];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -94,8 +94,8 @@ struct vmestablish_gpadl {
|
||||||
*/
|
*/
|
||||||
struct vmteardown_gpadl {
|
struct vmteardown_gpadl {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u32 Gpadl;
|
u32 gpadl;
|
||||||
u32 Reserved; /* for alignment to a 8-byte boundary */
|
u32 reserved; /* for alignment to a 8-byte boundary */
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -104,56 +104,56 @@ struct vmteardown_gpadl {
|
||||||
*/
|
*/
|
||||||
struct vmdata_gpa_direct {
|
struct vmdata_gpa_direct {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u32 Reserved;
|
u32 reserved;
|
||||||
u32 RangeCount;
|
u32 range_cnt;
|
||||||
struct gpa_range Range[1];
|
struct gpa_range range[1];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
/* This is the format for a Additional Data Packet. */
|
/* This is the format for a Additional Data Packet. */
|
||||||
struct vmadditional_data {
|
struct vmadditional_data {
|
||||||
struct vmpacket_descriptor d;
|
struct vmpacket_descriptor d;
|
||||||
u64 TotalBytes;
|
u64 total_bytes;
|
||||||
u32 ByteOffset;
|
u32 offset;
|
||||||
u32 ByteCount;
|
u32 byte_cnt;
|
||||||
unsigned char Data[1];
|
unsigned char data[1];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
union vmpacket_largest_possible_header {
|
union vmpacket_largest_possible_header {
|
||||||
struct vmpacket_descriptor SimpleHeader;
|
struct vmpacket_descriptor simple_hdr;
|
||||||
struct vmtransfer_page_packet_header TransferPageHeader;
|
struct vmtransfer_page_packet_header xfer_page_hdr;
|
||||||
struct vmgpadl_packet_header GpadlHeader;
|
struct vmgpadl_packet_header gpadl_hdr;
|
||||||
struct vmadd_remove_transfer_page_set AddRemoveTransferPageHeader;
|
struct vmadd_remove_transfer_page_set add_rm_xfer_page_hdr;
|
||||||
struct vmestablish_gpadl EstablishGpadlHeader;
|
struct vmestablish_gpadl establish_gpadl_hdr;
|
||||||
struct vmteardown_gpadl TeardownGpadlHeader;
|
struct vmteardown_gpadl teardown_gpadl_hdr;
|
||||||
struct vmdata_gpa_direct DataGpaDirectHeader;
|
struct vmdata_gpa_direct data_gpa_direct_hdr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VMPACKET_DATA_START_ADDRESS(__packet) \
|
#define VMPACKET_DATA_START_ADDRESS(__packet) \
|
||||||
(void *)(((unsigned char *)__packet) + \
|
(void *)(((unsigned char *)__packet) + \
|
||||||
((struct vmpacket_descriptor)__packet)->DataOffset8 * 8)
|
((struct vmpacket_descriptor)__packet)->offset8 * 8)
|
||||||
|
|
||||||
#define VMPACKET_DATA_LENGTH(__packet) \
|
#define VMPACKET_DATA_LENGTH(__packet) \
|
||||||
((((struct vmpacket_descriptor)__packet)->Length8 - \
|
((((struct vmpacket_descriptor)__packet)->len8 - \
|
||||||
((struct vmpacket_descriptor)__packet)->DataOffset8) * 8)
|
((struct vmpacket_descriptor)__packet)->offset8) * 8)
|
||||||
|
|
||||||
#define VMPACKET_TRANSFER_MODE(__packet) \
|
#define VMPACKET_TRANSFER_MODE(__packet) \
|
||||||
(((struct IMPACT)__packet)->Type)
|
(((struct IMPACT)__packet)->type)
|
||||||
|
|
||||||
enum vmbus_packet_type {
|
enum vmbus_packet_type {
|
||||||
VmbusPacketTypeInvalid = 0x0,
|
VM_PKT_INVALID = 0x0,
|
||||||
VmbusPacketTypeSynch = 0x1,
|
VM_PKT_SYNCH = 0x1,
|
||||||
VmbusPacketTypeAddTransferPageSet = 0x2,
|
VM_PKT_ADD_XFER_PAGESET = 0x2,
|
||||||
VmbusPacketTypeRemoveTransferPageSet = 0x3,
|
VM_PKT_RM_XFER_PAGESET = 0x3,
|
||||||
VmbusPacketTypeEstablishGpadl = 0x4,
|
VM_PKT_ESTABLISH_GPADL = 0x4,
|
||||||
VmbusPacketTypeTearDownGpadl = 0x5,
|
VM_PKT_TEARDOWN_GPADL = 0x5,
|
||||||
VmbusPacketTypeDataInBand = 0x6,
|
VM_PKT_DATA_INBAND = 0x6,
|
||||||
VmbusPacketTypeDataUsingTransferPages = 0x7,
|
VM_PKT_DATA_USING_XFER_PAGES = 0x7,
|
||||||
VmbusPacketTypeDataUsingGpadl = 0x8,
|
VM_PKT_DATA_USING_GPADL = 0x8,
|
||||||
VmbusPacketTypeDataUsingGpaDirect = 0x9,
|
VM_PKT_DATA_USING_GPA_DIRECT = 0x9,
|
||||||
VmbusPacketTypeCancelRequest = 0xa,
|
VM_PKT_CANCEL_REQUEST = 0xa,
|
||||||
VmbusPacketTypeCompletion = 0xb,
|
VM_PKT_COMP = 0xb,
|
||||||
VmbusPacketTypeDataUsingAdditionalPackets = 0xc,
|
VM_PKT_DATA_USING_ADDITIONAL_PKT = 0xc,
|
||||||
VmbusPacketTypeAdditionalData = 0xd
|
VM_PKT_ADDITIONAL_DATA = 0xd
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED 1
|
#define VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED 1
|
||||||
|
|
Loading…
Reference in New Issue