aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-05-18 11:32:38 -0400
committerRoland Dreier <roland@purestorage.com>2014-05-27 14:52:54 -0400
commit8524867b9c3d11e38de084f47e2128f43e74610a (patch)
treeaf2c26d8bd1ad3e9cdc1ca2728231374d970d51f
parentd6d211db37e75de2ddc3a4f979038c40df7cc79c (diff)
mlx5_core: Fix signature handover operation for interleaved buffers
When the data and protection are interleaved in the memory domain, no need to expand the mkey total length. At the moment no Linux user works (iSER initiator & target) in interleaved mode. This may change in the future as for SCSI pass-through devices there is no real point in target performing de-interleaving and re-interleaving of the protection data in the PT stage. Regardless, signature verbs support this mode. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index dc930ed21eca..74ee4a474e68 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2275,7 +2275,10 @@ static int set_sig_umr_wr(struct ib_send_wr *wr, struct mlx5_ib_qp *qp,
2275 2275
2276 /* length of the protected region, data + protection */ 2276 /* length of the protected region, data + protection */
2277 region_len = wr->sg_list->length; 2277 region_len = wr->sg_list->length;
2278 if (wr->wr.sig_handover.prot) 2278 if (wr->wr.sig_handover.prot &&
2279 (wr->wr.sig_handover.prot->lkey != wr->sg_list->lkey ||
2280 wr->wr.sig_handover.prot->addr != wr->sg_list->addr ||
2281 wr->wr.sig_handover.prot->length != wr->sg_list->length))
2279 region_len += wr->wr.sig_handover.prot->length; 2282 region_len += wr->wr.sig_handover.prot->length;
2280 2283
2281 /** 2284 /**