From: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Vu Pham <vuhuong-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Roi Dayan <roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Oren Duer <oren-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-3.11 7/7] IB/iser: Introduce fast memory registration model (FRWR)
Date: Sun, 28 Jul 2013 12:26:23 +0300 [thread overview]
Message-ID: <51F4E3BF.1050204@mellanox.com> (raw)
In-Reply-To: <51F4D305.7090700-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On 7/28/2013 11:15 AM, Or Gerlitz wrote:
> On 26/07/2013 20:15, Vu Pham wrote:
>> Hello Or/Sagi,
>>
>> Just a minor
>>> /**
>>> + * iser_create_frwr_pool - Creates pool of fast_reg descriptors
>>> + * for fast registration work requests.
>>> + * returns 0 on success, or errno code on failure
>>> + */
>>> +int iser_create_frwr_pool(struct iser_conn *ib_conn, unsigned
>>> cmds_max)
>>> +{
>>> + struct iser_device *device = ib_conn->device;
>>> + struct fast_reg_descriptor *desc;
>>> + int i, ret;
>>> +
>>> + INIT_LIST_HEAD(&ib_conn->fastreg.frwr.pool);
>>> + ib_conn->fastreg.frwr.pool_size = 0;
>>> + for (i = 0; i < cmds_max; i++) {
>>> + desc = kmalloc(sizeof(*desc), GFP_KERNEL);
>>> + if (!desc) {
>>> + iser_err("Failed to allocate a new fast_reg
>>> descriptor\n");
>>> + ret = -ENOMEM;
>>> + goto err;
>>> + }
>>> +
>>> + desc->data_frpl =
>>> ib_alloc_fast_reg_page_list(device->ib_device,
>>> + ISCSI_ISER_SG_TABLESIZE + 1);
>>> + if (IS_ERR(desc->data_frpl)) {
>> ret = PTR_ERR(desc->data_frpl);
>>> + iser_err("Failed to allocate ib_fast_reg_page_list
>>> err=%ld\n",
>>> + PTR_ERR(desc->data_frpl));
>> using ret
>>> + goto err;
>>> + }
>>> +
>>> + desc->data_mr = ib_alloc_fast_reg_mr(device->pd,
>>> + ISCSI_ISER_SG_TABLESIZE + 1);
>>> + if (IS_ERR(desc->data_mr)) {
>> ret = PTR_ERR(desc->data_mr);
>>> + iser_err("Failed to allocate ib_fast_reg_mr err=%ld\n",
>>> + PTR_ERR(desc->data_mr));
>> using ret
>>> + ib_free_fast_reg_page_list(desc->data_frpl);
>>> + goto err;
>>> + }
>>> + desc->valid = true;
>>> + list_add_tail(&desc->list, &ib_conn->fastreg.frwr.pool);
>>> + ib_conn->fastreg.frwr.pool_size++;
>>> + }
>>> +
>>> + return 0;
>>> +err:
>>> + iser_free_frwr_pool(ib_conn);
>>> + return ret;
>>> +}
>>
>
>
> Nice catch!
>
> I see that Roland hasn't yet picked this series so I will re-submit it
> with fixes to the issues you have found here.
>
> Or.
>
Nice catch indeed, thanks Vu.
-Sagi
--
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
prev parent reply other threads:[~2013-07-28 9:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 13:25 [PATCH for-3.11 0/7] Add Fast-Reg support to the iser initiator driver Or Gerlitz
[not found] ` <1374153931-7313-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-18 13:25 ` [PATCH for-3.11 1/7] IB/iser: Use proper debug level value for info prints Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 2/7] IB/iser: Restructure allocation/deallocation of connection resources Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 3/7] IB/iser: Accept session->cmds_max from user space Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 4/7] IB/iser: Generalize rdma memory registration Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 5/7] IB/iser: Handle unaligned SG in separate function Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 6/7] IB/iser: Place the fmr pool into a union in iser's IB conn struct Or Gerlitz
2013-07-18 13:25 ` [PATCH for-3.11 7/7] IB/iser: Introduce fast memory registration model (FRWR) Or Gerlitz
[not found] ` <1374153931-7313-8-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-22 11:46 ` Bart Van Assche
[not found] ` <51ED1B8E.7070703-HInyCGIudOg@public.gmane.org>
2013-07-22 13:11 ` Sagi Grimberg
[not found] ` <51ED2F97.2080400-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-23 11:58 ` Bart Van Assche
[not found] ` <51EE6FFE.8040802-HInyCGIudOg@public.gmane.org>
2013-07-23 14:21 ` Or Gerlitz
[not found] ` <CAJZOPZ+1TLQ-vwsZG8dgxhP332CQeDNOWfzGRdTbwRxLRhL95w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-23 14:47 ` Bart Van Assche
[not found] ` <51EE9773.9050003-HInyCGIudOg@public.gmane.org>
2013-07-24 16:47 ` Or Gerlitz
[not found] ` <51F000CB.3050808@mellanox.com>
[not found] ` <51F000CB.3050808-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-26 9:27 ` Bart Van Assche
2013-07-23 14:33 ` Sagi Grimberg
2013-07-22 14:37 ` Or Gerlitz
2013-07-26 17:15 ` Vu Pham
[not found] ` <51F2AEB6.6090000-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-28 8:15 ` Or Gerlitz
[not found] ` <51F4D305.7090700-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-07-28 9:26 ` Sagi Grimberg [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=51F4E3BF.1050204@mellanox.com \
--to=sagig-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=oren-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vuhuong-VPRAkNaXOzVWk0Htik3J/w@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