public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Sagi Grimberg <sagig-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Subject: Re: [PATCH 2/3] IB/mlx4: Fix max_wqe capacity report for query device
Date: Wed, 6 Jun 2012 20:26:29 +0300	[thread overview]
Message-ID: <201206062026.29878.jackm@dev.mellanox.co.il> (raw)
In-Reply-To: <CAL1RGDVG5o8j1sFQY6HFsfS6YNnbujRD9vQx06gJ_iCyMtjC7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wednesday 06 June 2012 20:05, Roland Dreier wrote:
> >        /* Sanity check RQ size before proceeding */
> > -       if (cap->max_recv_wr  > dev->dev->caps.max_wqes  ||
> > -           cap->max_recv_sge > dev->dev->caps.max_rq_sg)
> > +       if (cap->max_recv_wr > dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE ||
> > +           cap->max_recv_sge >
> > +               min(dev->dev->caps.max_sq_sg, dev->dev->caps.max_rq_sg))
> 
> Why do we need to check max_recv_sge against caps.max_sq_sg as well as
> caps.max_rq_sg?
> 
Because the HCA provides separate sizes for max_recv_sge and max_send_sge, but
the IB spec only allows for a single max_sg_entries value.

We therefore enforce the lower limit of the 2.

-Jack
--
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

  parent reply	other threads:[~2012-06-06 17:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 13:08 [PATCH for-3.5 0/3] mlx4 fixes Or Gerlitz
     [not found] ` <1337864889-20886-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-05-24 13:08   ` [PATCH 1/3] IB/mlx4: Fix EQ deallocation under legacy mode Or Gerlitz
     [not found]     ` <1337864889-20886-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-06-04  6:02       ` Roland Dreier
2012-05-24 13:08   ` [PATCH 2/3] IB/mlx4: Fix max_wqe capacity report for query device Or Gerlitz
     [not found]     ` <1337864889-20886-3-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-05-24 15:42       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A8237346A23DD0-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-05-25  3:04           ` Or Gerlitz
     [not found]             ` <CAJZOPZLvNHXkY9zakzVJqxYo1n=RYyRdpL6fVpchvo2GcmRLZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-28  4:14               ` Or Gerlitz
     [not found]                 ` <4FC2FB9C.1070306-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-05-29 23:25                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A8237346A24AAB-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-05-31  2:53                       ` Or Gerlitz
2012-06-06 17:05       ` Roland Dreier
     [not found]         ` <CAL1RGDVG5o8j1sFQY6HFsfS6YNnbujRD9vQx06gJ_iCyMtjC7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-06 17:26           ` Jack Morgenstein [this message]
2012-06-06 17:29           ` Jack Morgenstein
2012-05-24 13:08   ` [PATCH 3/3] net/mlx4_core: Fix setting VL_cap in mlx4_SET_PORT wrapper flow Or Gerlitz
     [not found]     ` <1337864889-20886-4-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-06-04  6:05       ` Roland Dreier
     [not found]         ` <CAL1RGDUCOQvaFUwqd_6n1wYWKeAUjqsG7N=e=fhVw-w1wnbQPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-04  7:03           ` Or Gerlitz

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=201206062026.29878.jackm@dev.mellanox.co.il \
    --to=jackm-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sagig-VPRAkNaXOzVS1MOuV/RT9w@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