Have krping use IB_ACCESS_LOCAL_WRITE because it's required for remote

write or remote atomic operations.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
This commit is contained in:
np 2016-01-05 01:58:30 +00:00
parent 8a0a03500d
commit 5f81d0ce4c

View File

@ -640,6 +640,7 @@ static int krping_setup_buffers(struct krping_cb *cb)
buf.size = cb->size;
iovbase = cb->rdma_dma_addr;
cb->rdma_mr = ib_reg_phys_mr(cb->pd, &buf, 1,
IB_ACCESS_LOCAL_WRITE|
IB_ACCESS_REMOTE_READ|
IB_ACCESS_REMOTE_WRITE,
&iovbase);
@ -675,8 +676,10 @@ static int krping_setup_buffers(struct krping_cb *cb)
if (cb->mem == MR || cb->mem == MW) {
unsigned flags = IB_ACCESS_REMOTE_READ;
if (cb->wlat || cb->rlat || cb->bw)
flags |= IB_ACCESS_REMOTE_WRITE;
if (cb->wlat || cb->rlat || cb->bw) {
flags |= IB_ACCESS_LOCAL_WRITE |
IB_ACCESS_REMOTE_WRITE;
}
buf.addr = cb->start_dma_addr;
buf.size = cb->size;