From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
Steve Wise
<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
Parav Pandit
<pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Laurence Oberman
<loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Nicholas A. Bellinger"
<nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v3 2/5] IB/core, RDMA RW API: Do not exceed QP SGE send limit
Date: Thu, 21 Jul 2016 09:59:05 +0200 [thread overview]
Message-ID: <20160721075905.GC20121@lst.de> (raw)
In-Reply-To: <03e7f98e-d810-2299-9f3e-2c697d2699fb-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
On Tue, Jul 19, 2016 at 09:22:03AM -0700, Bart Van Assche wrote:
> For IB and RoCE, the SGE limit for a queue pair is typically lower
> than what is defined by the HCA limits. For iWARP, the RDMA READ SGE
> limit is defined by dev->attrs.max_sge_rd. Modify rdma_rw_max_sge()
> accordingly.
It's not just iWarp - Melannox IB HCAs also have a lower RDMA READ than
WRITE limit.
> -static inline u32 rdma_rw_max_sge(struct ib_device *dev,
> +static inline u32 rdma_rw_max_sge(struct ib_device *dev, struct ib_qp *qp,
> enum dma_data_direction dir)
> {
> + return dir == DMA_TO_DEVICE ? qp->max_send_sge :
> + min_t(u32, qp->max_send_sge, dev->attrs.max_sge_rd);
> }
I'm a bit worried about this implicit and barely documented assumption
that we'll always have a lower RDMA READ than WRITE / SEND limit.
Can we fine tune the patch to add max_write_sge and max_read_sge
to struct ib_qp instead? That also makes clear they apply to RDMA READ
and WRITE only. Please also add a comment to ib_verbs.h to document
the exact semantics of this field(s) while you're at it, e.g. that
they only apply to users of the RDMA R/W API.
--
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
next prev parent reply other threads:[~2016-07-21 7:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 16:20 [PATCH v3 0/5] Reduce RDMA RW API SGE limit Bart Van Assche
[not found] ` <8fb358c3-3504-02ca-fcb8-1624f28be1b0-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-19 16:21 ` [PATCH v3 1/5] IB/core: Make rdma_rw_ctx_init() initialize all used fields Bart Van Assche
[not found] ` <859aaa24-9031-0a8f-26ec-b45ad6ac68d2-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-21 7:56 ` Christoph Hellwig
2016-07-19 16:22 ` [PATCH v3 2/5] IB/core, RDMA RW API: Do not exceed QP SGE send limit Bart Van Assche
[not found] ` <03e7f98e-d810-2299-9f3e-2c697d2699fb-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-21 7:59 ` Christoph Hellwig [this message]
2016-07-19 16:22 ` [PATCH v3 3/5] IB/srpt: Limit the number of SG elements per work request Bart Van Assche
[not found] ` <2599c210-c86e-b292-15e4-2bc042ad1453-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-21 8:00 ` Christoph Hellwig
2016-07-19 16:23 ` [PATCH v3 4/5] IB/srpt: Simplify srpt_queue_response() Bart Van Assche
2016-07-19 16:23 ` [PATCH v3 5/5] IB/isert: Remove an unused member variable Bart Van Assche
[not found] ` <13d1c6cf-4cee-d943-2864-1a0e52dc8ad4-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-21 7:59 ` Christoph Hellwig
2016-07-19 17:14 ` [PATCH v3 0/5] Reduce RDMA RW API SGE limit Laurence Oberman
[not found] ` <1465736110.5730453.1468948485702.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-19 17:20 ` Steve Wise
2016-07-20 14:43 ` Laurence Oberman
[not found] ` <93123318.5861700.1469025833903.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-20 15:07 ` Bart Van Assche
[not found] ` <8b8d2e22-4fb9-466f-5321-0745748bd793-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-20 15:19 ` Laurence Oberman
[not found] ` <88756403.5866837.1469027976552.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-20 15:56 ` Laurence Oberman
[not found] ` <018601d1e1e1$dbd18e50$9374aaf0$@opengridcomputing.com>
2016-07-19 19:44 ` Steve Wise
2016-07-20 15:38 ` Sagi Grimberg
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=20160721075905.GC20121@lst.de \
--to=hch-jcswghmuv9g@public.gmane.org \
--cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org \
--cc=pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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 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.