Revision: 2282
Author:
regra...@gmail.com
Date: Tue Oct 14 14:09:08 2014 UTC
Log: patch to fix iovec issues with IB as reported by ANL
https://code.google.com/p/portals4/source/detail?r=2282
Modified:
/trunk/src/ib/ptl_rdma.c
=======================================
--- /trunk/src/ib/ptl_rdma.c Wed Oct 2 21:26:45 2013 UTC
+++ /trunk/src/ib/ptl_rdma.c Tue Oct 14 14:09:08 2014 UTC
@@ -563,7 +563,7 @@
iov_off = buf->cur_loc_iov_off;
rem_sge = buf->transfer.rdma.cur_rem_sge;
- rem_off = buf->transfer.rdma.cur_rem_off;
+ rem_off = 0;
rem_size = le32_to_cpu(rem_sge->length);
rem_key = le32_to_cpu(rem_sge->lkey);
@@ -623,13 +623,6 @@
resid -= bytes;
rem_off += bytes;
- if (resid && rem_off >= rem_size) {
- rem_sge++;
- rem_size = le32_to_cpu(rem_sge->length);
- rem_key = le32_to_cpu(rem_sge->lkey);
- rem_off = 0;
- }
-
/* if we are finished or have reached the limit
* of the number of rdma's outstanding then
* request a completion notification */
@@ -651,6 +644,13 @@
PTL_FASTLOCK_UNLOCK(&buf->rdma.rdma_list_lock);
return err;
}
+
+ if (resid && rem_off >= rem_size) {
+ rem_sge++;
+ rem_size = le32_to_cpu(rem_sge->length);
+ rem_key = le32_to_cpu(rem_sge->lkey);
+ rem_off = 0;
+ }
if (comp)
break;