All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 0/3] libqedr: Three queue related fixes
@ 2017-02-16  5:56 Ram Amrani
       [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Ram Amrani @ 2017-02-16  5:56 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani

Ram Amrani (3):
  libqedr: Check queue mapping return value correctly
  libqedr: Remove redundant memset
  libqedr: Remove redundant RQ configuration

 qelr_chain.c | 5 +++--
 qelr_verbs.c | 2 --
 2 files changed, 3 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] 5+ messages in thread

* [PATCH rdma-core 1/3] libqedr: Check queue mapping return value correctly
       [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
@ 2017-02-16  5:56   ` Ram Amrani
  2017-02-16  5:56   ` [PATCH rdma-core 2/3] libqedr: Remove redundant memset Ram Amrani
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ram Amrani @ 2017-02-16  5:56 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani

When mapping CQ/RQ/SQ check the mmap return value.

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

diff --git a/providers/qedr/qelr_chain.c b/providers/qedr/qelr_chain.c
index edc72f4..d9ccc0b 100644
--- a/providers/qedr/qelr_chain.c
+++ b/providers/qedr/qelr_chain.c
@@ -76,7 +76,7 @@ int qelr_chain_alloc(struct qelr_chain *chain, int chain_size, int page_size,
 	addr = mmap(NULL, a_chain_size, PROT_READ | PROT_WRITE,
 			 MAP_PRIVATE | MAP_ANONYMOUS, QELR_ANON_FD,
 			 QELR_ANON_OFFSET);
-	if (chain->first_addr == MAP_FAILED)
+	if (addr == MAP_FAILED)
 		return errno;
 
 	ret = ibv_dontfork_range(addr, a_chain_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] 5+ messages in thread

* [PATCH rdma-core 2/3] libqedr: Remove redundant memset
       [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
  2017-02-16  5:56   ` [PATCH rdma-core 1/3] libqedr: Check queue mapping return value correctly Ram Amrani
@ 2017-02-16  5:56   ` Ram Amrani
  2017-02-16  5:56   ` [PATCH rdma-core 3/3] libqedr: Remove duplication of RQ configuration Ram Amrani
  2017-02-16  6:10   ` [PATCH rdma-core 0/3] libqedr: Three queue related fixes Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Ram Amrani @ 2017-02-16  5:56 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani

The memset was invoked with a size of zero. But anyway, zeroing of the
CQ/RQ/SQ is not required since mmap is used with MAP_ANONYNMOUS that
zeros the queue anyway.

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

diff --git a/providers/qedr/qelr_chain.c b/providers/qedr/qelr_chain.c
index d9ccc0b..26d0d0a 100644
--- a/providers/qedr/qelr_chain.c
+++ b/providers/qedr/qelr_chain.c
@@ -87,7 +87,6 @@ int qelr_chain_alloc(struct qelr_chain *chain, int chain_size, int page_size,
 
 	/* init chain */
 	memset(chain, 0, sizeof(*chain));
-	memset(chain->first_addr, 0, chain->size);
 	chain->first_addr = addr;
 	chain->size = a_chain_size;
 	chain->p_cons_elem = chain->first_addr;
@@ -97,6 +96,8 @@ int qelr_chain_alloc(struct qelr_chain *chain, int chain_size, int page_size,
 	chain->last_addr = (void *)
 			((uint8_t *)addr + (elem_size * (chain->n_elems -1)));
 
+	/* Note: since we are using MAP_ANONYMOUS the chain is zeroed for us */
+
 	return 0;
 }
 
-- 
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] 5+ messages in thread

* [PATCH rdma-core 3/3] libqedr: Remove duplication of RQ configuration
       [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
  2017-02-16  5:56   ` [PATCH rdma-core 1/3] libqedr: Check queue mapping return value correctly Ram Amrani
  2017-02-16  5:56   ` [PATCH rdma-core 2/3] libqedr: Remove redundant memset Ram Amrani
@ 2017-02-16  5:56   ` Ram Amrani
  2017-02-16  6:10   ` [PATCH rdma-core 0/3] libqedr: Three queue related fixes Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Ram Amrani @ 2017-02-16  5:56 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani

The max_wr and max_sges are configured twice in the same function.
Remove the redundant configuration.

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

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index 932115c..95cd429 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -366,8 +366,6 @@ static inline int qelr_create_qp_buffers_rq(struct qelr_devctx *cxt,
 	max_recv_wr = min_t(uint32_t, max_recv_wr, cxt->max_recv_wr);
 	max_recv_sges = max_recv_wr * cxt->sges_per_recv_wr;
 	max_recv_buf = max_recv_sges * QELR_RQE_ELEMENT_SIZE;
-	qp->rq.max_wr = max_recv_wr;
-	qp->rq.max_sges = RDMA_MAX_SGE_PER_RQ_WQE;
 
 	chain_size = max_recv_buf;
 	rc = qelr_chain_alloc(&qp->rq.chain, chain_size, cxt->kernel_page_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] 5+ messages in thread

* Re: [PATCH rdma-core 0/3] libqedr: Three queue related fixes
       [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-02-16  5:56   ` [PATCH rdma-core 3/3] libqedr: Remove duplication of RQ configuration Ram Amrani
@ 2017-02-16  6:10   ` Leon Romanovsky
  3 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2017-02-16  6:10 UTC (permalink / raw)
  To: Ram Amrani
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
	Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

On Thu, Feb 16, 2017 at 07:56:08AM +0200, Ram Amrani wrote:
> Ram Amrani (3):
>   libqedr: Check queue mapping return value correctly
>   libqedr: Remove redundant memset
>   libqedr: Remove redundant RQ configuration
>
>  qelr_chain.c | 5 +++--
>  qelr_verbs.c | 2 --
>  2 files changed, 3 insertions(+), 4 deletions(-)
>

Thanks, applied.

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

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

end of thread, other threads:[~2017-02-16  6:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16  5:56 [PATCH rdma-core 0/3] libqedr: Three queue related fixes Ram Amrani
     [not found] ` <1487224571-18627-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-02-16  5:56   ` [PATCH rdma-core 1/3] libqedr: Check queue mapping return value correctly Ram Amrani
2017-02-16  5:56   ` [PATCH rdma-core 2/3] libqedr: Remove redundant memset Ram Amrani
2017-02-16  5:56   ` [PATCH rdma-core 3/3] libqedr: Remove duplication of RQ configuration Ram Amrani
2017-02-16  6:10   ` [PATCH rdma-core 0/3] libqedr: Three queue related fixes Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.