diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
commit | 1d2a1959fe534279cf37aba20b08c24c20840e52 (patch) | |
tree | 67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /drivers/staging/hv/vmbus_packet_format.h | |
parent | 5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff) | |
parent | 054cfaacf88865bff1dd58d305443d5d6c068a08 (diff) | |
download | linux-1d2a1959fe534279cf37aba20b08c24c20840e52.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'drivers/staging/hv/vmbus_packet_format.h')
-rw-r--r-- | drivers/staging/hv/vmbus_packet_format.h | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/drivers/staging/hv/vmbus_packet_format.h b/drivers/staging/hv/vmbus_packet_format.h index f9f6b4b..c0b2c2b 100644 --- a/drivers/staging/hv/vmbus_packet_format.h +++ b/drivers/staging/hv/vmbus_packet_format.h @@ -25,53 +25,53 @@ #define _VMBUSPACKETFORMAT_H_ struct vmpacket_descriptor { - u16 Type; - u16 DataOffset8; - u16 Length8; - u16 Flags; - u64 TransactionId; -} __attribute__((packed)); + u16 type; + u16 offset8; + u16 len8; + u16 flags; + u64 trans_id; +} __packed; struct vmpacket_header { - u32 PreviousPacketStartOffset; - struct vmpacket_descriptor Descriptor; -} __attribute__((packed)); + u32 prev_pkt_start_offset; + struct vmpacket_descriptor descriptor; +} __packed; struct vmtransfer_page_range { - u32 ByteCount; - u32 ByteOffset; -} __attribute__((packed)); + u32 byte_count; + u32 byte_offset; +} __packed; struct vmtransfer_page_packet_header { struct vmpacket_descriptor d; - u16 TransferPageSetId; - bool SenderOwnsSet; - u8 Reserved; - u32 RangeCount; - struct vmtransfer_page_range Ranges[1]; -} __attribute__((packed)); + u16 xfer_pageset_id; + bool sender_owns_set; + u8 reserved; + u32 range_cnt; + struct vmtransfer_page_range ranges[1]; +} __packed; struct vmgpadl_packet_header { struct vmpacket_descriptor d; - u32 Gpadl; - u32 Reserved; -} __attribute__((packed)); + u32 gpadl; + u32 reserved; +} __packed; struct vmadd_remove_transfer_page_set { struct vmpacket_descriptor d; - u32 Gpadl; - u16 TransferPageSetId; - u16 Reserved; -} __attribute__((packed)); + u32 gpadl; + u16 xfer_pageset_id; + u16 reserved; +} __packed; /* * This structure defines a range in guest physical space that can be made to * look virtually contiguous. */ struct gpa_range { - u32 ByteCount; - u32 ByteOffset; - u64 PfnArray[0]; + u32 byte_count; + u32 byte_offset; + u64 pfn_array[0]; }; /* @@ -83,10 +83,10 @@ struct gpa_range { */ struct vmestablish_gpadl { struct vmpacket_descriptor d; - u32 Gpadl; - u32 RangeCount; - struct gpa_range Range[1]; -} __attribute__((packed)); + u32 gpadl; + u32 range_cnt; + struct gpa_range range[1]; +} __packed; /* * This is the format for a Teardown Gpadl packet, which indicates that the @@ -94,9 +94,9 @@ struct vmestablish_gpadl { */ struct vmteardown_gpadl { struct vmpacket_descriptor d; - u32 Gpadl; - u32 Reserved; /* for alignment to a 8-byte boundary */ -} __attribute__((packed)); + u32 gpadl; + u32 reserved; /* for alignment to a 8-byte boundary */ +} __packed; /* * This is the format for a GPA-Direct packet, which contains a set of GPA @@ -104,56 +104,56 @@ struct vmteardown_gpadl { */ struct vmdata_gpa_direct { struct vmpacket_descriptor d; - u32 Reserved; - u32 RangeCount; - struct gpa_range Range[1]; -} __attribute__((packed)); + u32 reserved; + u32 range_cnt; + struct gpa_range range[1]; +} __packed; /* This is the format for a Additional Data Packet. */ struct vmadditional_data { struct vmpacket_descriptor d; - u64 TotalBytes; - u32 ByteOffset; - u32 ByteCount; - unsigned char Data[1]; -} __attribute__((packed)); + u64 total_bytes; + u32 offset; + u32 byte_cnt; + unsigned char data[1]; +} __packed; union vmpacket_largest_possible_header { - struct vmpacket_descriptor SimpleHeader; - struct vmtransfer_page_packet_header TransferPageHeader; - struct vmgpadl_packet_header GpadlHeader; - struct vmadd_remove_transfer_page_set AddRemoveTransferPageHeader; - struct vmestablish_gpadl EstablishGpadlHeader; - struct vmteardown_gpadl TeardownGpadlHeader; - struct vmdata_gpa_direct DataGpaDirectHeader; + struct vmpacket_descriptor simple_hdr; + struct vmtransfer_page_packet_header xfer_page_hdr; + struct vmgpadl_packet_header gpadl_hdr; + struct vmadd_remove_transfer_page_set add_rm_xfer_page_hdr; + struct vmestablish_gpadl establish_gpadl_hdr; + struct vmteardown_gpadl teardown_gpadl_hdr; + struct vmdata_gpa_direct data_gpa_direct_hdr; }; #define VMPACKET_DATA_START_ADDRESS(__packet) \ (void *)(((unsigned char *)__packet) + \ - ((struct vmpacket_descriptor)__packet)->DataOffset8 * 8) + ((struct vmpacket_descriptor)__packet)->offset8 * 8) #define VMPACKET_DATA_LENGTH(__packet) \ - ((((struct vmpacket_descriptor)__packet)->Length8 - \ - ((struct vmpacket_descriptor)__packet)->DataOffset8) * 8) + ((((struct vmpacket_descriptor)__packet)->len8 - \ + ((struct vmpacket_descriptor)__packet)->offset8) * 8) #define VMPACKET_TRANSFER_MODE(__packet) \ - (((struct IMPACT)__packet)->Type) + (((struct IMPACT)__packet)->type) enum vmbus_packet_type { - VmbusPacketTypeInvalid = 0x0, - VmbusPacketTypeSynch = 0x1, - VmbusPacketTypeAddTransferPageSet = 0x2, - VmbusPacketTypeRemoveTransferPageSet = 0x3, - VmbusPacketTypeEstablishGpadl = 0x4, - VmbusPacketTypeTearDownGpadl = 0x5, - VmbusPacketTypeDataInBand = 0x6, - VmbusPacketTypeDataUsingTransferPages = 0x7, - VmbusPacketTypeDataUsingGpadl = 0x8, - VmbusPacketTypeDataUsingGpaDirect = 0x9, - VmbusPacketTypeCancelRequest = 0xa, - VmbusPacketTypeCompletion = 0xb, - VmbusPacketTypeDataUsingAdditionalPackets = 0xc, - VmbusPacketTypeAdditionalData = 0xd + VM_PKT_INVALID = 0x0, + VM_PKT_SYNCH = 0x1, + VM_PKT_ADD_XFER_PAGESET = 0x2, + VM_PKT_RM_XFER_PAGESET = 0x3, + VM_PKT_ESTABLISH_GPADL = 0x4, + VM_PKT_TEARDOWN_GPADL = 0x5, + VM_PKT_DATA_INBAND = 0x6, + VM_PKT_DATA_USING_XFER_PAGES = 0x7, + VM_PKT_DATA_USING_GPADL = 0x8, + VM_PKT_DATA_USING_GPA_DIRECT = 0x9, + VM_PKT_CANCEL_REQUEST = 0xa, + VM_PKT_COMP = 0xb, + VM_PKT_DATA_USING_ADDITIONAL_PKT = 0xc, + VM_PKT_ADDITIONAL_DATA = 0xd }; #define VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED 1 |