From 3f59c159179ec3104a82bed5192966fa7d8b10da Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 16 Apr 2014 07:30:34 +0000 Subject: [PATCH] ib_srpt: Disable RDMA access by the initiator With the SRP protocol all RDMA operations are initiated by the target. Since no RDMA operations are initiated by the initiator, do not grant the initiator permission to submit RDMA reads or writes to the target. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5423 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 1545f1c0d..c6f5bc275 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1121,8 +1121,6 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp) return -ENOMEM; attr->qp_state = IB_QPS_INIT; - attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | - IB_ACCESS_REMOTE_WRITE; attr->port_num = ch->sport->port; attr->pkey_index = ch->pkey_index; @@ -1156,6 +1154,7 @@ static int srpt_ch_qp_rtr(struct srpt_rdma_ch *ch, struct ib_qp *qp) if (ret) goto out; + attr->qp_access_flags = 0; attr->max_dest_rd_atomic = 4; ret = ib_modify_qp(qp, attr, attr_mask); @@ -1189,6 +1188,7 @@ static int srpt_ch_qp_rts(struct srpt_rdma_ch *ch, struct ib_qp *qp) if (ret) goto out; + attr->qp_access_flags = 0; attr->max_rd_atomic = 4; /*