diff options
author | Ganesh Goudar <ganeshgr@chelsio.com> | 2017-06-21 16:25:43 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-20 17:20:50 +0200 |
commit | 720336c42e41a917002fcae3aa14e30f5022bbb7 (patch) | |
tree | 727fa0c4c57aef84be2f41a757893dc9ed4e5c39 /drivers/infiniband/hw/cxgb4/qp.c | |
parent | IB/mlx4: Fix CM REQ retries in paravirt mode (diff) | |
download | linux-720336c42e41a917002fcae3aa14e30f5022bbb7.tar.xz linux-720336c42e41a917002fcae3aa14e30f5022bbb7.zip |
iw_cxgb4: don't use WR keys/addrs for 0 byte reads
Only use the read sge lkey/addr and the remote rkey/addr if the
length of the read is not zero. Otherwise the read response might
be treated as the RTR read response and not delivered to the
application. Or worse Terminator hardware will fail a 0B read
if the STAG is 0 even if the read length is 0.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index bfc77596acbe..cb7fc0d35d1d 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -569,7 +569,7 @@ static int build_rdma_read(union t4_wr *wqe, struct ib_send_wr *wr, u8 *len16) { if (wr->num_sge > 1) return -EINVAL; - if (wr->num_sge) { + if (wr->num_sge && wr->sg_list[0].length) { wqe->read.stag_src = cpu_to_be32(rdma_wr(wr)->rkey); wqe->read.to_src_hi = cpu_to_be32((u32)(rdma_wr(wr)->remote_addr >> 32)); |