diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-07-06 10:21:36 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-20 11:20:50 -0400 |
commit | e6e52aec494900912fedd7b595b8827ba70a670d (patch) | |
tree | 8efe6cb362d38cf717cd79ad583653e917997cde /drivers/infiniband | |
parent | 1217197142d1681a8b8aaa88cdf4b245b76974cd (diff) | |
download | linux-stable-e6e52aec494900912fedd7b595b8827ba70a670d.tar.gz linux-stable-e6e52aec494900912fedd7b595b8827ba70a670d.tar.bz2 linux-stable-e6e52aec494900912fedd7b595b8827ba70a670d.zip |
RDMA/iser: don't send an rkey if all data is written as immadiate-data
We might get some bogus error completions in case the target will
remotely invalidate the rkey and the HCA will need to retransmit
from this buffer.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 12ed62ce9ff7..2a07692007bd 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -137,8 +137,10 @@ iser_prepare_write_cmd(struct iscsi_task *task, if (unsol_sz < edtl) { hdr->flags |= ISER_WSV; - hdr->write_stag = cpu_to_be32(mem_reg->rkey); - hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz); + if (buf_out->data_len > imm_sz) { + hdr->write_stag = cpu_to_be32(mem_reg->rkey); + hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz); + } iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X " "VA:%#llX + unsol:%d\n", |