All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@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 v4 2/5] IB/core, RDMA RW API: Do not exceed QP SGE send limit
Date: Wed, 27 Jul 2016 19:23:20 +0300	[thread overview]
Message-ID: <20160727162319.GK4628@leon.nu> (raw)
In-Reply-To: <8604bcdc-3ab4-28df-0eff-b1c0b6865c71-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

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

On Wed, Jul 27, 2016 at 08:24:32AM -0700, Bart Van Assche wrote:
> On 07/27/2016 05:42 AM, Leon Romanovsky wrote:
> >On Thu, Jul 21, 2016 at 01:03:30PM -0700, Bart Van Assche wrote:
> >> static inline u32 rdma_rw_fr_page_list_len(struct ib_device *dev)
> >> {
> >> 	/* arbitrary limit to avoid allocating gigantic resources */
> >>@@ -186,7 +179,8 @@ static int rdma_rw_init_map_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
> >> 		u64 remote_addr, u32 rkey, enum dma_data_direction dir)
> >> {
> >> 	struct ib_device *dev = qp->pd->device;
> >>-	u32 max_sge = rdma_rw_max_sge(dev, dir);
> >>+	u32 max_sge = dir == DMA_TO_DEVICE ? qp->max_write_sge :
> >>+		      qp->max_read_sge;
> >
> >Bart,
> >I'm sure that I missed something.
> >
> >Can "dir" be DMA_BIDIRECTIONAL?
> >If yes, mxa_sge will be min(max_write_sge, max_read_sge).
> 
> Hello Leon,
> 
> The RDMA R/W API is intended for target drivers. None of the upstream target
> drivers (ib_isert, ib_srpt, nvmet) that use the RDMA R/W API support bidi
> commands today. And even if such support would be added, these target
> drivers should perform RDMA READs and WRITEs in two phases. So I do not
> expect that "dir" will ever be equal to DMA_BIDIRECTIONAL in the above code.
> 
> Bart.

Thanks Bart.

> --
> 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: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-27 16:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 20:02 [PATCH v4 0/5] Reduce RDMA RW API SGE limit Bart Van Assche
     [not found] ` <75fc8647-16a6-5a89-400f-f5f418a8d6eb-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-21 20:03   ` [PATCH v4 1/5] IB/core: Make rdma_rw_ctx_init() initialize all used fields Bart Van Assche
2016-07-21 20:03   ` [PATCH v4 2/5] IB/core, RDMA RW API: Do not exceed QP SGE send limit Bart Van Assche
     [not found]     ` <c71ece34-36e2-86da-5032-2fc946ff0073-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-27 12:42       ` Leon Romanovsky
     [not found]         ` <20160727124217.GJ4628-2ukJVAZIZ/Y@public.gmane.org>
2016-07-27 15:24           ` Bart Van Assche
     [not found]             ` <8604bcdc-3ab4-28df-0eff-b1c0b6865c71-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-07-27 16:23               ` Leon Romanovsky [this message]
2016-08-01 10:56       ` Christoph Hellwig
2016-07-21 20:03   ` [PATCH v4 3/5] IB/srpt: Limit the number of SG elements per work request Bart Van Assche
     [not found]     ` <446e3039-ec25-89d8-2583-5e60dd2bfc88-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-08-01 10:57       ` Christoph Hellwig
2016-07-21 20:04   ` [PATCH v4 4/5] IB/srpt: Simplify srpt_queue_response() Bart Van Assche
2016-07-21 20:04   ` [PATCH v4 5/5] IB/isert: Remove an unused member variable Bart Van Assche
2016-08-02 16:05   ` [PATCH v4 0/5] Reduce RDMA RW API SGE limit Doug Ledford

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=20160727162319.GK4628@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hch-jcswGhMUV9g@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.