From: Bart Van Assche <Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org>
To: "nmoreychaisemartin-IBi9RG/b67k@public.gmane.org"
<nmoreychaisemartin-IBi9RG/b67k@public.gmane.org>,
"dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org"
<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: [RFC rdma-core] srp_daemon: handle SM lid change
Date: Fri, 8 Dec 2017 16:41:06 +0000 [thread overview]
Message-ID: <1512751264.26126.1.camel@wdc.com> (raw)
In-Reply-To: <dce98958-a6e2-b289-2a58-609d1914affb-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1099 bytes --]
On Fri, 2017-12-08 at 08:56 -0500, Dennis Dalessandro wrote:
> On 12/8/2017 8:33 AM, Hal Rosenstock wrote:
> > > int create_ah(struct ud_resources *ud_res)
> > > @@ -641,7 +649,7 @@ static int register_to_trap(struct sync_resources *sync_res,
> > > pthread_mutex_unlock(res->mad_buffer_mutex);
> > > } while (rc == 2); // while old response.
> > >
> > > - } while (rc == 0 && ++counter < 3);
> > > + } while (rc == 0 && ++counter < 5);
> > >
> > > if (counter==3) {
> >
> > This should be changed from 3 to 5 also. Change both to some define ?
>
> Yes please change these to a #define with a some what descriptive name.
> That would make the code much better to read.
It would be even better to change the loop such that it counts down instead
of up. Then the if-statement after the loop can test whether the counter has
reached zero and the constant that represents the number of iterations will
only occur once.
Bart.N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±Ù{ayº\x1dÊÚë,j\a¢f£¢·h»öì\x17/oSc¾Ú³9uÀ¦æåÈ&jw¨®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~m
next prev parent reply other threads:[~2017-12-08 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 11:08 [BUG] SRP daemon and SM migration Nicolas Morey-Chaisemartin
[not found] ` <bd47faf6-eae0-d520-42ce-eb3d6bce4376-l3A5Bk7waGM@public.gmane.org>
2017-12-04 13:50 ` Hal Rosenstock
[not found] ` <1978d0ad-909f-ed8b-5b54-e8c465d3641f-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-12-08 9:36 ` [RFC rdma-core] srp_daemon: handle SM lid change Nicolas Morey-Chaisemartin
[not found] ` <82bd1d9a-7e6a-324e-1e00-43fcf130faf0-IBi9RG/b67k@public.gmane.org>
2017-12-08 13:33 ` Hal Rosenstock
[not found] ` <82dc0912-3ac3-9548-2c3b-703c6e1c9c95-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-12-08 13:56 ` Dennis Dalessandro
[not found] ` <dce98958-a6e2-b289-2a58-609d1914affb-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-12-08 16:41 ` Bart Van Assche [this message]
2017-12-08 17:35 ` Nicolas Morey-Chaisemartin
2017-12-11 14:46 ` [RFC rdma-core 2/2] srp_daemon: fix CQ handling Nicolas Morey-Chaisemartin
[not found] ` <f35bfdad-9027-d2be-9706-b5a0edd9a778-IBi9RG/b67k@public.gmane.org>
2017-12-11 16:30 ` Bart Van Assche
[not found] ` <1513009807.2747.11.camel-Sjgp3cTcYWE@public.gmane.org>
2017-12-11 16:38 ` Nicolas Morey-Chaisemartin
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=1512751264.26126.1.camel@wdc.com \
--to=bart.vanassche-sjgp3ctcywe@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nmoreychaisemartin-IBi9RG/b67k@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