Whamcloud - gitweb
* "proper" fix for 5890: fixed the misplaced vibnal wire struct
[fs/lustre-release.git] / lnet / klnds / viblnd / viblnd_wire.h
index cd1ba5f..3cb8d1f 100644 (file)
@@ -8,13 +8,13 @@ typedef struct kib_connparams
         __u32             ibcp_queue_depth;
         __u32             ibcp_max_msg_size;
         __u32             ibcp_max_frags;
-} kib_connparams_t __attribute__((packed));
+} WIRE_ATTR kib_connparams_t;
 
 typedef struct
 {
         ptl_hdr_t         ibim_hdr;             /* portals header */
         char              ibim_payload[0];      /* piggy-backed payload */
-} kib_immediate_msg_t __attribute__((packed));
+} WIRE_ATTR kib_immediate_msg_t;
 
 /* YEUCH! the __u64 address is split into 2 __u32 fields to ensure proper
  * packing.  Otherwise we can't fit enough frags into an IBNAL message (<=
@@ -24,14 +24,14 @@ typedef struct
         __u32             rf_nob;               /* # of bytes */
         __u32             rf_addr_lo;           /* lo 4 bytes of vaddr */
         __u32             rf_addr_hi;           /* hi 4 bytes of vaddr */
-} kib_rdma_frag_t __attribute__((packed));
+} WIRE_ATTR kib_rdma_frag_t;
 
 typedef struct
 {
         __u32             rd_key;               /* local/remote key */
         __u32             rd_nfrag;             /* # fragments */
         kib_rdma_frag_t   rd_frags[0];          /* buffer frags */
-} kib_rdma_desc_t __attribute__((packed));
+} WIRE_ATTR kib_rdma_desc_t;
 
 /* CAVEAT EMPTOR!  We don't actually put ibprm_rd on the wire; it's just there
  * to remember the source buffers while we wait for the PUT_ACK */
@@ -40,28 +40,27 @@ typedef struct
 {
         ptl_hdr_t         ibprm_hdr;            /* portals header */
         __u64             ibprm_cookie;         /* opaque completion cookie */
-} kib_putreq_msg_t __attribute__((packed));
+} WIRE_ATTR kib_putreq_msg_t;
 
 typedef struct
 {
         __u64             ibpam_src_cookie;     /* reflected completion cookie */
         __u64             ibpam_dst_cookie;     /* opaque completion cookie */
         kib_rdma_desc_t   ibpam_rd;             /* sender's sink buffer */
-} kib_putack_msg_t __attribute__((packed));
+} WIRE_ATTR kib_putack_msg_t;
 
 typedef struct
 {
         ptl_hdr_t         ibgm_hdr;             /* portals header */
         __u64             ibgm_cookie;          /* opaque completion cookie */
         kib_rdma_desc_t   ibgm_rd;              /* rdma descriptor */
-} kib_get_msg_t __attribute__((packed));
+} WIRE_ATTR kib_get_msg_t;
 
 typedef struct
 {
         __u64             ibcm_cookie;          /* opaque completion cookie */
         __s32             ibcm_status;          /* < 0 failure: >= 0 length */
-       __u32             ibcm_pad;             /* pad to 8 byte boundary */
-} kib_completion_msg_t __attribute__((packed));
+} WIRE_ATTR kib_completion_msg_t;
 
 typedef struct
 {
@@ -86,11 +85,11 @@ typedef struct
                 kib_putack_msg_t      putack;
                 kib_get_msg_t         get;
                 kib_completion_msg_t  completion;
-        } ibm_u __attribute__((packed));
-} kib_msg_t __attribute__((packed));
+        } WIRE_ATTR ibm_u;
+} WIRE_ATTR kib_msg_t;
 
 #define IBNAL_MSG_MAGIC       0x0be91b91        /* unique magic */
-#define IBNAL_MSG_VERSION              5        /* current protocol version */
+#define IBNAL_MSG_VERSION              6        /* current protocol version */
 
 #define IBNAL_MSG_CONNREQ           0xc0        /* connection request */
 #define IBNAL_MSG_CONNACK           0xc1        /* connection acknowledge */