public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 0/4] libqedr: multiple bug fixes
@ 2016-12-11 14:18 Ram Amrani
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Ram Amrani @ 2016-12-11 14:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA, Ram Amrani

This set of patches fixes multiple bugs in qedr's user library libqedr.

Ram Amrani (4):
  libqedr: ignore inline flag in read verbs
  libqedr: clear the flags field in the responder WC
  libqedr: fix configuration of the EDPM extension header
  libqedr: lower the verbosity of the destroy CQ failure message

 providers/qedr/qelr_verbs.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH rdma-core 1/4] libqedr: ignore inline flag in read verbs
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
@ 2016-12-11 14:18   ` Ram Amrani
  2016-12-11 14:18   ` [PATCH rdma-core 2/4] libqedr: clear the flags field in the WC Ram Amrani
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Ram Amrani @ 2016-12-11 14:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA, Ram Amrani, Ram Amrani

In the current implementation a read verb with IBV_SEND_INLINE may be
illegally configured.
In this fix we ignore the inline bit in the case of a read verb.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 providers/qedr/qelr_verbs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index d2b34ee..fae823c 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -1027,7 +1027,9 @@ static uint32_t qelr_prepare_sq_rdma_data(struct qelr_qp *qp,
 	rwqe2->r_key = htole32(wr->wr.rdma.rkey);
 	TYPEPTR_ADDR_SET(rwqe2, remote_va, wr->wr.rdma.remote_addr);
 
-	if (wr->send_flags & IBV_SEND_INLINE) {
+	if (wr->send_flags & IBV_SEND_INLINE &&
+	    (wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM ||
+	     wr->opcode == IBV_WR_RDMA_WRITE)) {
 		uint8_t flags = 0;
 
 		SET_FIELD2(flags, RDMA_SQ_RDMA_WQE_1ST_INLINE_FLG, 1);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH rdma-core 2/4] libqedr: clear the flags field in the WC
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
  2016-12-11 14:18   ` [PATCH rdma-core 1/4] libqedr: ignore inline flag in read verbs Ram Amrani
@ 2016-12-11 14:18   ` Ram Amrani
  2016-12-11 14:18   ` [PATCH rdma-core 3/4] libqedr: fix EDPM configuration Ram Amrani
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Ram Amrani @ 2016-12-11 14:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA, Ram Amrani, Ram Amrani

Since the responder's WC is not zeroed we clear the flags field to avoid
random flags.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 providers/qedr/qelr_verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index fae823c..80e4263 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -1676,6 +1676,7 @@ static void __process_resp_one(struct qelr_qp *qp, struct qelr_cq *cq,
 	uint8_t flags;
 
 	wc->opcode = IBV_WC_RECV;
+	wc->wc_flags = 0;
 
 	FP_DP_VERBOSE(cxt->dbg_fp, QELR_MSG_CQ, "\n");
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH rdma-core 3/4] libqedr: fix EDPM configuration
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
  2016-12-11 14:18   ` [PATCH rdma-core 1/4] libqedr: ignore inline flag in read verbs Ram Amrani
  2016-12-11 14:18   ` [PATCH rdma-core 2/4] libqedr: clear the flags field in the WC Ram Amrani
@ 2016-12-11 14:18   ` Ram Amrani
  2016-12-11 14:18   ` [PATCH rdma-core 4/4] libqedr: lower the verbosity of the destroy CQ failure message Ram Amrani
  2016-12-11 14:50   ` [PATCH rdma-core 0/4] libqedr: multiple bug fixes Leon Romanovsky
  4 siblings, 0 replies; 7+ messages in thread
From: Ram Amrani @ 2016-12-11 14:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA, Ram Amrani, Ram Amrani

The DMA length should be configured to the Enhanced Direct Packet Mode
extension header only in write and write with immediate commands.

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 providers/qedr/qelr_verbs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index 80e4263..bdcf132 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -989,7 +989,10 @@ static uint32_t qelr_prepare_sq_inline_data(struct qelr_qp *qp,
 
 	if (qp->edpm.is_edpm) {
 		qp->edpm.dpm_payload_size += data_size;
-		qp->edpm.rdma_ext->dma_length = htonl(data_size);
+
+		if (wr->opcode == IBV_WR_RDMA_WRITE ||
+		    wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM)
+			qp->edpm.rdma_ext->dma_length = htonl(data_size);
 	}
 
 	return data_size;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH rdma-core 4/4] libqedr: lower the verbosity of the destroy CQ failure message
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-12-11 14:18   ` [PATCH rdma-core 3/4] libqedr: fix EDPM configuration Ram Amrani
@ 2016-12-11 14:18   ` Ram Amrani
  2016-12-11 14:50   ` [PATCH rdma-core 0/4] libqedr: multiple bug fixes Leon Romanovsky
  4 siblings, 0 replies; 7+ messages in thread
From: Ram Amrani @ 2016-12-11 14:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA, Ram Amrani, Ram Amrani

Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
 providers/qedr/qelr_verbs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index bdcf132..415efc0 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -293,8 +293,9 @@ int qelr_destroy_cq(struct ibv_cq *ibv_cq)
 
 	rc = ibv_cmd_destroy_cq(ibv_cq);
 	if (rc) {
-		DP_ERR(cxt->dbg_fp,
-		       "destroy cq: failed to destroy %p, got %d.\n", cq, rc);
+		DP_VERBOSE(cxt->dbg_fp, QELR_MSG_CQ,
+		           "destroy cq: failed to destroy %p, got %d.\n", cq,
+			   rc);
 		return rc;
 	}
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH rdma-core 0/4] libqedr: multiple bug fixes
       [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
                     ` (3 preceding siblings ...)
  2016-12-11 14:18   ` [PATCH rdma-core 4/4] libqedr: lower the verbosity of the destroy CQ failure message Ram Amrani
@ 2016-12-11 14:50   ` Leon Romanovsky
       [not found]     ` <20161211145031.GD20460-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  4 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2016-12-11 14:50 UTC (permalink / raw)
  To: Ram Amrani
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

On Sun, Dec 11, 2016 at 04:18:07PM +0200, Ram Amrani wrote:
> This set of patches fixes multiple bugs in qedr's user library libqedr.
>
> Ram Amrani (4):
>   libqedr: ignore inline flag in read verbs
>   libqedr: clear the flags field in the responder WC
>   libqedr: fix configuration of the EDPM extension header
>   libqedr: lower the verbosity of the destroy CQ failure message
>
>  providers/qedr/qelr_verbs.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)

Thanks, applied.

>
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH rdma-core 0/4] libqedr: multiple bug fixes
       [not found]     ` <20161211145031.GD20460-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2016-12-11 16:02       ` Amrani, Ram
  0 siblings, 0 replies; 7+ messages in thread
From: Amrani, Ram @ 2016-12-11 16:02 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Elior, Ariel,
	Kalderon, Michal

> 
> Thanks, applied.
> 

That was fast. Thanks!


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-11 16:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-11 14:18 [PATCH rdma-core 0/4] libqedr: multiple bug fixes Ram Amrani
     [not found] ` <1481465891-14789-1-git-send-email-Ram.Amrani-74tsMCuadCbQT0dZR+AlfA@public.gmane.org>
2016-12-11 14:18   ` [PATCH rdma-core 1/4] libqedr: ignore inline flag in read verbs Ram Amrani
2016-12-11 14:18   ` [PATCH rdma-core 2/4] libqedr: clear the flags field in the WC Ram Amrani
2016-12-11 14:18   ` [PATCH rdma-core 3/4] libqedr: fix EDPM configuration Ram Amrani
2016-12-11 14:18   ` [PATCH rdma-core 4/4] libqedr: lower the verbosity of the destroy CQ failure message Ram Amrani
2016-12-11 14:50   ` [PATCH rdma-core 0/4] libqedr: multiple bug fixes Leon Romanovsky
     [not found]     ` <20161211145031.GD20460-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-11 16:02       ` Amrani, Ram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox