From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Henry Orosco <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] i40iw: Correct values for max_recv_sge, max_send_sge
Date: Thu, 10 Nov 2016 18:47:54 +0200 [thread overview]
Message-ID: <20161110164754.GF28957@leon.nu> (raw)
In-Reply-To: <20161110032639.7460-1-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2201 bytes --]
On Wed, Nov 09, 2016 at 09:26:39PM -0600, Henry Orosco wrote:
> When creating QPs, ensure init_attr->cap.max_recv_sge
> is clipped to MAX_FRAG_COUNT.
>
> Expose MAX_FRAG_COUNT for max_recv_sge and max_send_sge in
> i40iw_query_qp().
>
> Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Henry Orosco <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/infiniband/hw/i40iw/i40iw_verbs.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> index 6329c97..d06fe593 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> @@ -610,6 +610,9 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,
> if (init_attr->cap.max_send_sge > I40IW_MAX_WQ_FRAGMENT_COUNT)
> init_attr->cap.max_send_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
>
> + if (init_attr->cap.max_recv_sge > I40IW_MAX_WQ_FRAGMENT_COUNT)
> + init_attr->cap.max_recv_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
> +
Just personal preference,
init_attr->cap.max_recv_sge = min(init_attr->cap.max_recv_sge, I40IW_MAX_WQ_FRAGMENT_COUNT);
Looks good,
Reviewed-By: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> memset(&init_info, 0, sizeof(init_info));
>
> sq_size = init_attr->cap.max_send_wr;
> @@ -815,8 +818,9 @@ static int i40iw_query_qp(struct ib_qp *ibqp,
> attr->qp_access_flags = 0;
> attr->cap.max_send_wr = qp->qp_uk.sq_size;
> attr->cap.max_recv_wr = qp->qp_uk.rq_size;
> - attr->cap.max_recv_sge = 1;
> attr->cap.max_inline_data = I40IW_MAX_INLINE_DATA_SIZE;
> + attr->cap.max_send_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
> + attr->cap.max_recv_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
> init_attr->event_handler = iwqp->ibqp.event_handler;
> init_attr->qp_context = iwqp->ibqp.qp_context;
> init_attr->send_cq = iwqp->ibqp.send_cq;
> --
> 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: 819 bytes --]
prev parent reply other threads:[~2016-11-10 16:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 3:26 [PATCH] i40iw: Correct values for max_recv_sge, max_send_sge Henry Orosco
[not found] ` <20161110032639.7460-1-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-11-10 16:47 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161110164754.GF28957@leon.nu \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).