public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next 0/2] i40iw: patches for 4.16
@ 2017-12-08 20:34 Henry Orosco
       [not found] ` <1512765269-145929-1-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Henry Orosco @ 2017-12-08 20:34 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jgg-VPRAkNaXOzVWk0Htik3J/w, shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w,
	Henry Orosco

These patches are targeted for the 4.16 kernel.

Chien Tin Tung (1):
  i40iw: Use sqsize to initialize cqp_requests elements

Mustafa Ismail (1):
  i40iw: Reinitialize add_sd_cnt

 drivers/infiniband/hw/i40iw/i40iw_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
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] 6+ messages in thread

* [PATCH for-next 1/2] i40iw: Use sqsize to initialize cqp_requests elements
       [not found] ` <1512765269-145929-1-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-12-08 20:34   ` Henry Orosco
       [not found]     ` <1512765269-145929-2-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2017-12-08 20:34   ` [PATCH for-next 2/2] i40iw: Reinitialize add_sd_cnt Henry Orosco
  2017-12-08 23:33   ` [PATCH for-next 0/2] i40iw: patches for 4.16 Jason Gunthorpe
  2 siblings, 1 reply; 6+ messages in thread
From: Henry Orosco @ 2017-12-08 20:34 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jgg-VPRAkNaXOzVWk0Htik3J/w, shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w,
	Chien Tin Tung

From: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Use sqsize instead of I40IW_CQP_SW_SQSIZE_2048 to initialize
cqp_requests elements in the for-loop as sqsize is used
to allocate memory for cqp_requests.

Signed-off-by: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index e824296..1f9d9c7 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -607,7 +607,7 @@ static enum i40iw_status_code i40iw_create_cqp(struct i40iw_device *iwdev)
 	INIT_LIST_HEAD(&cqp->cqp_avail_reqs);
 	INIT_LIST_HEAD(&cqp->cqp_pending_reqs);
 	/* init the waitq of the cqp_requests and add them to the list */
-	for (i = 0; i < I40IW_CQP_SW_SQSIZE_2048; i++) {
+	for (i = 0; i < sqsize; i++) {
 		init_waitqueue_head(&cqp->cqp_requests[i].waitq);
 		list_add_tail(&cqp->cqp_requests[i].list, &cqp->cqp_avail_reqs);
 	}
-- 
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] 6+ messages in thread

* [PATCH for-next 2/2] i40iw: Reinitialize add_sd_cnt
       [not found] ` <1512765269-145929-1-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2017-12-08 20:34   ` [PATCH for-next 1/2] i40iw: Use sqsize to initialize cqp_requests elements Henry Orosco
@ 2017-12-08 20:34   ` Henry Orosco
  2017-12-08 23:33   ` [PATCH for-next 0/2] i40iw: patches for 4.16 Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Henry Orosco @ 2017-12-08 20:34 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jgg-VPRAkNaXOzVWk0Htik3J/w, shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w,
	Mustafa Ismail

From: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

add_sd_cnt in info structure passed to i40iw_create_hmc_obj_type
must be 0 and since it is modified during the call, it must be
reset in the loop. This avoids unnecessarily reprogramming the
SDs multiple times with the same values.

Signed-off-by: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 1f9d9c7..3aecf4c 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -483,6 +483,7 @@ static enum i40iw_status_code i40iw_create_hmc_objs(struct i40iw_device *iwdev,
 	for (i = 0; i < IW_HMC_OBJ_TYPE_NUM; i++) {
 		info.rsrc_type = iw_hmc_obj_types[i];
 		info.count = dev->hmc_info->hmc_obj[info.rsrc_type].cnt;
+		info.add_sd_cnt = 0;
 		status = i40iw_create_hmc_obj_type(dev, &info);
 		if (status) {
 			i40iw_pr_err("create obj type %d status = %d\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] 6+ messages in thread

* Re: [PATCH for-next 0/2] i40iw: patches for 4.16
       [not found] ` <1512765269-145929-1-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2017-12-08 20:34   ` [PATCH for-next 1/2] i40iw: Use sqsize to initialize cqp_requests elements Henry Orosco
  2017-12-08 20:34   ` [PATCH for-next 2/2] i40iw: Reinitialize add_sd_cnt Henry Orosco
@ 2017-12-08 23:33   ` Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2017-12-08 23:33 UTC (permalink / raw)
  To: Henry Orosco
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w

On Fri, Dec 08, 2017 at 02:34:27PM -0600, Henry Orosco wrote:
> These patches are targeted for the 4.16 kernel.

This is a terrible cover letter.

Jason
--
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] 6+ messages in thread

* Re: [for-next,1/2] i40iw: Use sqsize to initialize cqp_requests elements
       [not found]     ` <1512765269-145929-2-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-12-11 23:41       ` Jason Gunthorpe
       [not found]         ` <20171211234108.GH32020-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2017-12-11 23:41 UTC (permalink / raw)
  To: Henry Orosco
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w, Chien Tin Tung

On Fri, Dec 08, 2017 at 02:34:28PM -0600, Henry Orosco wrote:
> From: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> Use sqsize instead of I40IW_CQP_SW_SQSIZE_2048 to initialize
> cqp_requests elements in the for-loop as sqsize is used
> to allocate memory for cqp_requests.
> 
> Signed-off-by: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>  drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

There was a 3rd patch about the 'bool' change that now cross depends
with for-next and for-rc. I think you have to re-spin that one against
for-rc as there is another usage of 'accelerated' added there?

Jason
--
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] 6+ messages in thread

* Re: [for-next,1/2] i40iw: Use sqsize to initialize cqp_requests elements
       [not found]         ` <20171211234108.GH32020-uk2M96/98Pc@public.gmane.org>
@ 2017-12-12 22:12           ` Shiraz Saleem
  0 siblings, 0 replies; 6+ messages in thread
From: Shiraz Saleem @ 2017-12-12 22:12 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Orosco, Henry, dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Tung, Chien Tin

On Mon, Dec 11, 2017 at 04:41:08PM -0700, Jason Gunthorpe wrote:
> On Fri, Dec 08, 2017 at 02:34:28PM -0600, Henry Orosco wrote:
> > From: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > 
> > Use sqsize instead of I40IW_CQP_SW_SQSIZE_2048 to initialize
> > cqp_requests elements in the for-loop as sqsize is used
> > to allocate memory for cqp_requests.
> > 
> > Signed-off-by: Chien Tin Tung <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >  drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Applied to for-next, thanks
> 
> There was a 3rd patch about the 'bool' change that now cross depends
> with for-next and for-rc. I think you have to re-spin that one against
> for-rc as there is another usage of 'accelerated' added there?
> 

Hi Jason - I sent an updated ver. of this patch "i40iw: Change accelerated flag to bool"
against the for-rc branch.

Shiraz



--
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] 6+ messages in thread

end of thread, other threads:[~2017-12-12 22:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 20:34 [PATCH for-next 0/2] i40iw: patches for 4.16 Henry Orosco
     [not found] ` <1512765269-145929-1-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-12-08 20:34   ` [PATCH for-next 1/2] i40iw: Use sqsize to initialize cqp_requests elements Henry Orosco
     [not found]     ` <1512765269-145929-2-git-send-email-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-12-11 23:41       ` [for-next,1/2] " Jason Gunthorpe
     [not found]         ` <20171211234108.GH32020-uk2M96/98Pc@public.gmane.org>
2017-12-12 22:12           ` Shiraz Saleem
2017-12-08 20:34   ` [PATCH for-next 2/2] i40iw: Reinitialize add_sd_cnt Henry Orosco
2017-12-08 23:33   ` [PATCH for-next 0/2] i40iw: patches for 4.16 Jason Gunthorpe

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