{
int ret;
int i;
- struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
+ struct vmbus_channel_packet_page_buffer desc;
u32 descSize;
u32 packetLen;
u32 packetLenAligned;
DumpVmbusChannel(Channel);
/*
- * Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the
+ * Adjust the size down since vmbus_channel_packet_page_buffer is the
* largest size we support
*/
- descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) -
+ descSize = sizeof(struct vmbus_channel_packet_page_buffer) -
((MAX_PAGE_BUFFER_COUNT - PageCount) *
sizeof(struct hv_page_buffer));
packetLen = descSize + BufferLen;
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
/* Setup the descriptor */
- desc.Type = VmbusPacketTypeDataUsingGpaDirect;
- desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
- desc.DataOffset8 = descSize >> 3; /* in 8-bytes grandularity */
- desc.Length8 = (u16)(packetLenAligned >> 3);
- desc.TransactionId = RequestId;
- desc.RangeCount = PageCount;
+ desc.type = VmbusPacketTypeDataUsingGpaDirect;
+ desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
+ desc.dataoffset8 = descSize >> 3; /* in 8-bytes grandularity */
+ desc.length8 = (u16)(packetLenAligned >> 3);
+ desc.transactionid = RequestId;
+ desc.rangecount = PageCount;
for (i = 0; i < PageCount; i++) {
- desc.Range[i].Length = PageBuffers[i].Length;
- desc.Range[i].Offset = PageBuffers[i].Offset;
- desc.Range[i].Pfn = PageBuffers[i].Pfn;
+ desc.range[i].Length = PageBuffers[i].Length;
+ desc.range[i].Offset = PageBuffers[i].Offset;
+ desc.range[i].Pfn = PageBuffers[i].Pfn;
}
sg_init_table(bufferList, 3);
void *Buffer, u32 BufferLen, u64 RequestId)
{
int ret;
- struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
+ struct vmbus_channel_packet_multipage_buffer desc;
u32 descSize;
u32 packetLen;
u32 packetLenAligned;
return -EINVAL;
/*
- * Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is
+ * Adjust the size down since vmbus_channel_packet_multipage_buffer is
* the largest size we support
*/
- descSize = sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) -
+ descSize = sizeof(struct vmbus_channel_packet_multipage_buffer) -
((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount) *
sizeof(u64));
packetLen = descSize + BufferLen;
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
/* Setup the descriptor */
- desc.Type = VmbusPacketTypeDataUsingGpaDirect;
- desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
- desc.DataOffset8 = descSize >> 3; /* in 8-bytes grandularity */
- desc.Length8 = (u16)(packetLenAligned >> 3);
- desc.TransactionId = RequestId;
- desc.RangeCount = 1;
+ desc.type = VmbusPacketTypeDataUsingGpaDirect;
+ desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
+ desc.dataoffset8 = descSize >> 3; /* in 8-bytes grandularity */
+ desc.length8 = (u16)(packetLenAligned >> 3);
+ desc.transactionid = RequestId;
+ desc.rangecount = 1;
- desc.Range.Length = MultiPageBuffer->Length;
- desc.Range.Offset = MultiPageBuffer->Offset;
+ desc.range.Length = MultiPageBuffer->Length;
+ desc.range.Offset = MultiPageBuffer->Offset;
- memcpy(desc.Range.PfnArray, MultiPageBuffer->PfnArray,
+ memcpy(desc.range.PfnArray, MultiPageBuffer->PfnArray,
PfnCount * sizeof(u64));
sg_init_table(bufferList, 3);
#include "channel_mgmt.h"
/* The format must be the same as struct vmdata_gpa_direct */
-struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
- u16 Type;
- u16 DataOffset8;
- u16 Length8;
- u16 Flags;
- u64 TransactionId;
- u32 Reserved;
- u32 RangeCount;
- struct hv_page_buffer Range[MAX_PAGE_BUFFER_COUNT];
+struct vmbus_channel_packet_page_buffer {
+ u16 type;
+ u16 dataoffset8;
+ u16 length8;
+ u16 flags;
+ u64 transactionid;
+ u32 reserved;
+ u32 rangecount;
+ struct hv_page_buffer range[MAX_PAGE_BUFFER_COUNT];
} __attribute__((packed));
/* The format must be the same as struct vmdata_gpa_direct */
-struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
- u16 Type;
- u16 DataOffset8;
- u16 Length8;
- u16 Flags;
- u64 TransactionId;
- u32 Reserved;
- u32 RangeCount; /* Always 1 in this case */
- struct hv_multipage_buffer Range;
+struct vmbus_channel_packet_multipage_buffer {
+ u16 type;
+ u16 dataoffset8;
+ u16 length8;
+ u16 flags;
+ u64 transactionid;
+ u32 reserved;
+ u32 rangecount; /* Always 1 in this case */
+ struct hv_multipage_buffer range;
} __attribute__((packed));
VMBUS_REVISION_NUMBER);
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
VMBUS_MESSAGE_SINT);
- DPRINT_DBG(VMBUS, "sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER)=%zd, "
+ DPRINT_DBG(VMBUS, "sizeof(vmbus_channel_packet_page_buffer)=%zd, "
"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
- sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER),
- sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER));
+ sizeof(struct vmbus_channel_packet_page_buffer),
+ sizeof(struct vmbus_channel_packet_multipage_buffer));
drv->name = gDriverName;
memcpy(&drv->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));