From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
"Nicholas A. Bellinger"
<nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>,
Parav Pandit
<pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Laurence Oberman
<loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/5] IB/core: Make rdma_rw_ctx_init() initialize all used fields
Date: Tue, 28 Jun 2016 15:04:48 +0200 [thread overview]
Message-ID: <a5ce1e23-e04e-029c-d698-5aa07e88bbaa@sandisk.com> (raw)
In-Reply-To: <20160628115105.GA28113-jcswGhMUV9g@public.gmane.org>
On 06/28/2016 01:51 PM, Christoph Hellwig wrote:
> On Tue, Jun 28, 2016 at 01:25:15PM +0200, Bart Van Assche wrote:
>> - if (i + 1 < ctx->nr_ops)
>> - rdma_wr->wr.next = &ctx->map.wrs[i + 1].wr;
>> + rdma_wr->wr.next = i + 1 < ctx->nr_ops ?
>> + &ctx->map.wrs[i + 1].wr : NULL;
>
> I think the rdma_rw_ctx_wrs should take care of this as well.
I agree that it is possible to let rdma_rw_ctx_wrs() initialize wr.next
of the last WR. But if we chose that approach then drivers that call
rdma_rw_ctx_init() but not rdma_rw_ctx_wrs(), e.g. ib_isert, can end up
with a last wr.next field that has not been initialized. Hence my
preference for performing that initialization in rdma_rw_init_mr_wrs()
and rdma_rw_init_map_wrs().
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
next prev parent reply other threads:[~2016-06-28 13:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 11:23 [PATCH 0/5] Make RDMA RW API SGE limit configurable Bart Van Assche
[not found] ` <419391ba-0c39-11ce-f249-84b428dc73d5-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 11:25 ` [PATCH 1/5] IB/core: Make rdma_rw_ctx_init() initialize all used fields Bart Van Assche
[not found] ` <91e53f7b-fdb6-bd66-ada6-982c641c2048-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 11:51 ` Christoph Hellwig
[not found] ` <20160628115105.GA28113-jcswGhMUV9g@public.gmane.org>
2016-06-28 13:04 ` Bart Van Assche [this message]
2016-06-28 11:26 ` [PATCH 2/5] IB/core: Add max_sge argument to rdma_rw_ctx_init() Bart Van Assche
[not found] ` <ce96b1f4-e9b9-31e2-f9d2-77e71f8bbcd1-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 11:52 ` Christoph Hellwig
[not found] ` <20160628115206.GB28113-jcswGhMUV9g@public.gmane.org>
2016-06-28 12:37 ` Bart Van Assche
[not found] ` <7fbd81ae-4b0d-4f8b-18ac-7efcf0dd4d61-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 15:42 ` Christoph Hellwig
[not found] ` <20160628154235.GA2843-jcswGhMUV9g@public.gmane.org>
2016-06-28 16:12 ` Bart Van Assche
2016-06-28 11:26 ` [PATCH 3/5] IB/isert: Limit the number of SG elements per work request Bart Van Assche
[not found] ` <885f39a6-9d75-9999-d582-e403f072bec1-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 14:28 ` Steve Wise
2016-06-28 14:58 ` Bart Van Assche
[not found] ` <74522811-15d7-41a2-d704-96083199454f-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 15:01 ` Steve Wise
2016-06-28 14:33 ` Steve Wise
2016-06-28 15:03 ` Bart Van Assche
[not found] ` <6e513522-6b06-d942-bddd-cc00f9a32f44-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 15:09 ` Steve Wise
2016-06-28 18:41 ` Bart Van Assche
[not found] ` <9e8c6a52-3bf9-6b3f-1f36-d77205cb3ee0-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 19:13 ` Steve Wise
2016-06-30 13:47 ` Bart Van Assche
2016-06-28 15:46 ` Christoph Hellwig
[not found] ` <20160628154618.GB2843-jcswGhMUV9g@public.gmane.org>
2016-06-28 16:11 ` Bart Van Assche
2016-06-28 11:28 ` [PATCH 4/5] IB/srpt: " Bart Van Assche
2016-06-28 11:29 ` [PATCH 5/5] IB/srpt: Simplify srpt_queue_response() Bart Van Assche
[not found] ` <8457ca4e-0359-687f-e078-76979adf54c3-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-28 11:52 ` Christoph Hellwig
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=a5ce1e23-e04e-029c-d698-5aa07e88bbaa@sandisk.com \
--to=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 \
/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