Commits

Nathan Hjelm committed 01df0f6

fix errors/warning in openib BTL

Comments (0)

Files changed (4)

ompi/mca/btl/openib/btl_openib.c

     /* Setting opcode on a frag constructor isn't enough since prepare_src
      * may return send_frag instead of put_frag */
     frag->sr_desc.opcode = IBV_WR_RDMA_WRITE;
-    frag->sr_desc.send_flags = ib_send_flags(src_seg->seg_len, &(ep->qps[qp]));
+    frag->sr_desc.send_flags = ib_send_flags(src_seg->base.seg_len, &(ep->qps[qp]));
     if(ibv_post_send(ep->qps[qp].qp->lcl_qp, &frag->sr_desc, &bad_wr))
         return OMPI_ERROR;
 

ompi/mca/btl/openib/btl_openib_endpoint.h

         mca_btl_openib_send_frag_t *frag, const bool rdma)
 {
     mca_btl_openib_module_t *openib_btl = ep->endpoint_btl;
-    mca_btl_base_segment_t *seg = &to_base_frag(frag)->segment;
+    mca_btl_openib_segment_t *seg = &to_base_frag(frag)->segment;
     struct ibv_sge *sg = &to_com_frag(frag)->sg_entry;
     struct ibv_send_wr *sr_desc = &to_out_frag(frag)->sr_desc;
     struct ibv_send_wr *bad_wr;
     int qp = to_base_frag(frag)->base.order;
 
-    sg->length = seg->seg_len + sizeof(mca_btl_openib_header_t) +
+    sg->length = seg->base.seg_len + sizeof(mca_btl_openib_header_t) +
         (rdma ? sizeof(mca_btl_openib_footer_t) : 0) + frag->coalesced_length;
 
     sr_desc->send_flags = ib_send_flags(sg->length, &(ep->qps[qp]));

ompi/mca/btl/openib/btl_openib_frag.c

 {
     mca_btl_openib_frag_t *base_frag = to_base_frag(frag);
 
-    base_frag->base.des_src = &base_frag->segment;
+    base_frag->base.des_src = &base_frag->segment.base;
     base_frag->base.des_src_cnt = 1;
     base_frag->base.des_dst = NULL;
     base_frag->base.des_dst_cnt = 0;
 {
     mca_btl_openib_frag_t *base_frag = to_base_frag(frag);
 
-    base_frag->base.des_dst = &base_frag->segment;
+    base_frag->base.des_dst = &base_frag->segment.base;
     base_frag->base.des_dst_cnt = 1;
     base_frag->base.des_src = NULL;
     base_frag->base.des_src_cnt = 0;
 
     base_frag->type = MCA_BTL_OPENIB_FRAG_COALESCED;
 
-    base_frag->base.des_src = &base_frag->segment;
+    base_frag->base.des_src = &base_frag->segment.base;
     base_frag->base.des_src_cnt = 1;
     base_frag->base.des_dst = NULL;
     base_frag->base.des_dst_cnt = 0;

ompi/mca/btl/openib/connect/btl_openib_connect_base.c

 
     /* Copy the lkey where it needs to go */
     endpoint->endpoint_cts_frag.super.sg_entry.lkey =
-        endpoint->endpoint_cts_frag.super.super.segment.seg_key.key32[0] =
+        endpoint->endpoint_cts_frag.super.super.segment.key =
         endpoint->endpoint_cts_mr->lkey;
     endpoint->endpoint_cts_frag.super.sg_entry.length = length;