From: eeb Date: Mon, 26 May 2003 15:01:39 +0000 (+0000) Subject: * Declared portals wire structs packed for ia64 compatibility X-Git-Tag: v1_7_100~1^91~228 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b7bae5d04bc287209020837660ba3e1f0760d975;p=fs%2Flustre-release.git * Declared portals wire structs packed for ia64 compatibility --- diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index bece0a30..47c0dd2 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -31,6 +31,8 @@ typedef struct lib_me_t lib_me_t; typedef struct lib_md_t lib_md_t; typedef struct lib_eq_t lib_eq_t; +#define WIRE_ATTR __attribute__((packed)) + /* The wire handle's interface cookie only matches one network interface in * one epoch (i.e. new cookie when the interface restarts or the node * reboots). The object cookie only matches one object on that interface @@ -38,7 +40,7 @@ typedef struct lib_eq_t lib_eq_t; typedef struct { __u64 wh_interface_cookie; __u64 wh_object_cookie; -} ptl_handle_wire_t; +} WIRE_ATTR ptl_handle_wire_t; /* byte-flip insensitive! */ #define PTL_WIRE_HANDLE_NONE \ @@ -63,7 +65,7 @@ typedef struct ptl_ack { ptl_handle_wire_t dst_wmd; ptl_match_bits_t match_bits; ptl_size_t length; /* common length (0 for acks) moving out RSN */ -} ptl_ack_t; +} WIRE_ATTR ptl_ack_t; typedef struct ptl_put { ptl_pt_index_t ptl_index; @@ -72,7 +74,7 @@ typedef struct ptl_put { ptl_size_t length; /* common length moving out RSN */ ptl_size_t offset; ptl_hdr_data_t hdr_data; -} ptl_put_t; +} WIRE_ATTR ptl_put_t; typedef struct ptl_get { ptl_pt_index_t ptl_index; @@ -82,7 +84,7 @@ typedef struct ptl_get { ptl_size_t src_offset; ptl_size_t return_offset; /* unused: going RSN */ ptl_size_t sink_length; -} ptl_get_t; +} WIRE_ATTR ptl_get_t; typedef struct ptl_reply { __u32 unused1; /* unused fields going RSN */ @@ -90,7 +92,7 @@ typedef struct ptl_reply { ptl_size_t dst_offset; /* unused: going RSN */ __u32 unused2; ptl_size_t length; /* common length moving out RSN */ -} ptl_reply_t; +} WIRE_ATTR ptl_reply_t; typedef struct { ptl_nid_t dest_nid; @@ -104,7 +106,7 @@ typedef struct { ptl_get_t get; ptl_reply_t reply; } msg; -} ptl_hdr_t; +} WIRE_ATTR ptl_hdr_t; /* All length fields in individual unions at same offset */ /* LASSERT for same in lib-move.c */ @@ -122,7 +124,7 @@ typedef struct { __u32 magic; /* PORTALS_PROTO_MAGIC */ __u16 version_major; /* increment on incompatible change */ __u16 version_minor; /* increment on compatible change */ -} ptl_magicversion_t; +} WIRE_ATTR ptl_magicversion_t; #define PORTALS_PROTO_MAGIC 0xeebc0ded diff --git a/lustre/portals/include/portals/lib-types.h b/lustre/portals/include/portals/lib-types.h index bece0a30..47c0dd2 100644 --- a/lustre/portals/include/portals/lib-types.h +++ b/lustre/portals/include/portals/lib-types.h @@ -31,6 +31,8 @@ typedef struct lib_me_t lib_me_t; typedef struct lib_md_t lib_md_t; typedef struct lib_eq_t lib_eq_t; +#define WIRE_ATTR __attribute__((packed)) + /* The wire handle's interface cookie only matches one network interface in * one epoch (i.e. new cookie when the interface restarts or the node * reboots). The object cookie only matches one object on that interface @@ -38,7 +40,7 @@ typedef struct lib_eq_t lib_eq_t; typedef struct { __u64 wh_interface_cookie; __u64 wh_object_cookie; -} ptl_handle_wire_t; +} WIRE_ATTR ptl_handle_wire_t; /* byte-flip insensitive! */ #define PTL_WIRE_HANDLE_NONE \ @@ -63,7 +65,7 @@ typedef struct ptl_ack { ptl_handle_wire_t dst_wmd; ptl_match_bits_t match_bits; ptl_size_t length; /* common length (0 for acks) moving out RSN */ -} ptl_ack_t; +} WIRE_ATTR ptl_ack_t; typedef struct ptl_put { ptl_pt_index_t ptl_index; @@ -72,7 +74,7 @@ typedef struct ptl_put { ptl_size_t length; /* common length moving out RSN */ ptl_size_t offset; ptl_hdr_data_t hdr_data; -} ptl_put_t; +} WIRE_ATTR ptl_put_t; typedef struct ptl_get { ptl_pt_index_t ptl_index; @@ -82,7 +84,7 @@ typedef struct ptl_get { ptl_size_t src_offset; ptl_size_t return_offset; /* unused: going RSN */ ptl_size_t sink_length; -} ptl_get_t; +} WIRE_ATTR ptl_get_t; typedef struct ptl_reply { __u32 unused1; /* unused fields going RSN */ @@ -90,7 +92,7 @@ typedef struct ptl_reply { ptl_size_t dst_offset; /* unused: going RSN */ __u32 unused2; ptl_size_t length; /* common length moving out RSN */ -} ptl_reply_t; +} WIRE_ATTR ptl_reply_t; typedef struct { ptl_nid_t dest_nid; @@ -104,7 +106,7 @@ typedef struct { ptl_get_t get; ptl_reply_t reply; } msg; -} ptl_hdr_t; +} WIRE_ATTR ptl_hdr_t; /* All length fields in individual unions at same offset */ /* LASSERT for same in lib-move.c */ @@ -122,7 +124,7 @@ typedef struct { __u32 magic; /* PORTALS_PROTO_MAGIC */ __u16 version_major; /* increment on incompatible change */ __u16 version_minor; /* increment on compatible change */ -} ptl_magicversion_t; +} WIRE_ATTR ptl_magicversion_t; #define PORTALS_PROTO_MAGIC 0xeebc0ded