]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
mcm,mpxyd: pack all proxy command structures
authorArlin Davis <arlin.r.davis@intel.com>
Thu, 25 Jul 2013 16:08:50 +0000 (09:08 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Thu, 25 Jul 2013 16:08:50 +0000 (09:08 -0700)
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dat/include/dat2/dat_mic_extensions.h

index 59c576673d3478e5c1d68692a9aae868f584c467..feed18f1484f712b354b99651d65b65ae8e119ea 100755 (executable)
@@ -167,7 +167,7 @@ typedef struct dat_mcm_addr
        uint16_t        port;
        uint8_t         sl;
        uint8_t         qp_type;
-} dat_mcm_addr_t;
+} __attribute__((packed)) dat_mcm_addr_t;
 
 /* MCM message, 208 bytes */
 typedef struct dat_mcm_msg
@@ -189,7 +189,7 @@ typedef struct dat_mcm_msg
        dat_mcm_addr_t          daddr2; /* QPr remote, MIC  or MCM on non-MIC node */
        uint8_t                 p_data[DAT_MCM_PDATA_SIZE];
 
-} dat_mcm_msg_t;
+} __attribute__((packed)) dat_mcm_msg_t;
 
 /***** MIC Indirect Exchange (MIX) protocol over SCIF ****/
 
@@ -308,7 +308,7 @@ typedef struct dat_mix_hdr
        uint8_t         status;         /* operation status */
        uint32_t        req_id;         /* operation id, multiple operations */
 
-} dat_mix_hdr_t;
+} __attribute__((packed)) dat_mix_hdr_t;
 
 /**** MIX device open  *****/
 typedef struct dat_mix_dev_attr
@@ -328,7 +328,7 @@ typedef struct dat_mix_dev_attr
        uint16_t        pkey;
        uint16_t        max_inline;
 
-} dat_mix_dev_attr_t;
+}  __attribute__((packed)) dat_mix_dev_attr_t;
 
 /***** MIX open, device address info returned */
 typedef struct dat_mix_open
@@ -339,7 +339,7 @@ typedef struct dat_mix_open
        dat_mix_dev_attr_t      dev_attr;
        dat_mcm_addr_t          dev_addr;
 
-} dat_mix_open_t;
+}  __attribute__((packed)) dat_mix_open_t;
 
 /***** MIX memory registration *****/
 typedef struct dat_mix_mr
@@ -360,7 +360,7 @@ typedef struct dat_mix_listen
        uint16_t                sid;
        uint16_t                backlog;
 
-} dat_mix_listen_t;
+}  __attribute__((packed)) dat_mix_listen_t;
 
 /***** MIX create QP, 52 bytes *****/
 typedef struct dat_mix_qp_attr
@@ -381,7 +381,7 @@ typedef struct dat_mix_qp_attr
        uint32_t        rcq_id;
        uint64_t        ctx;
 
-} dat_mix_qp_attr_t;
+}  __attribute__((packed)) dat_mix_qp_attr_t;
 
 /*
  * For initial prototyping write streams we don't have many
@@ -400,7 +400,7 @@ typedef struct dat_mix_qp
        uint32_t                wr_len; /* size */
        uint32_t                m_inline; /* mpxyd inline threshold for SCIF dma */
 
-} dat_mix_qp_t;
+}  __attribute__((packed)) dat_mix_qp_t;
 
 /***** MIX CQ operations, create, free, poll, event *****/
 /*
@@ -423,7 +423,7 @@ typedef struct dat_mix_cq
        uint32_t                src_qp;
        uint32_t                wc_flags;
 
-} dat_mix_cq_t;
+}  __attribute__((packed)) dat_mix_cq_t;
 
 typedef struct dat_mix_cm
 {
@@ -445,7 +445,7 @@ typedef struct dat_mix_cm_event
        uint32_t                qp_id;
        uint32_t                event;
 
-} dat_mix_cm_event_t;
+}  __attribute__((packed)) dat_mix_cm_event_t;
 
 typedef struct dat_mix_wc
 {
@@ -457,12 +457,12 @@ typedef struct dat_mix_wc
        uint32_t        imm_data;       /* in network byte order */
        uint32_t        qp_num;
        uint32_t        src_qp;
-       int             wc_flags;
+       uint32_t        wc_flags;
        uint16_t        pkey_index;
        uint16_t        slid;
        uint8_t         sl;
        uint8_t         dlid_path_bits;
-} dat_mix_wc_t;
+}  __attribute__((packed)) dat_mix_wc_t;
 
 typedef struct dat_mix_sge {
        uint64_t                addr;
@@ -472,11 +472,9 @@ typedef struct dat_mix_sge {
 
 typedef struct dat_mix_wr {
        uint64_t                wr_id;
-       struct dat_mix_send_wr  *next;
-       struct dat_mix_sge      *sg_list;
-       int                     num_sge;
+       uint32_t                num_sge;
        uint32_t                opcode;
-       int                     send_flags;
+       uint32_t                send_flags;
        uint32_t                imm_data;       /* in network byte order */
        union {
                struct {
@@ -495,7 +493,7 @@ typedef struct dat_mix_wr {
                        uint32_t        remote_qkey;
                } ud;
        } wr;
-} dat_mix_wr_t;
+}  __attribute__((packed)) dat_mix_wr_t;
 
 #define DAT_MIX_WC_MAX 4
 typedef struct dat_mix_dto_comp
@@ -506,7 +504,7 @@ typedef struct dat_mix_dto_comp
        uint32_t                wc_cnt;
        struct dat_mix_wc       wc[DAT_MIX_WC_MAX];
 
-} dat_mix_dto_comp_t;
+}  __attribute__((packed)) dat_mix_dto_comp_t;
 
 #define DAT_MIX_SGE_MAX 4
 typedef struct dat_mix_send
@@ -518,7 +516,7 @@ typedef struct dat_mix_send
        struct dat_mix_wr       wr;
        struct dat_mix_sge      sge[DAT_MIX_SGE_MAX];
 
-} dat_mix_send_t;
+}  __attribute__((packed)) dat_mix_send_t;
 
 
 #endif         /* _DAT_MIC_EXTENSIONS_H_ */