linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: "George, Martin" <Martin.George@netapp.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] fabrics: ensure zero kato for non-persistent controllers
Date: Tue, 23 Feb 2021 06:06:57 +0000	[thread overview]
Message-ID: <BYAPR04MB4965AD8096D8F313B2BFF74C86809@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: cb89029d362a3cd61504012351f56731cec9c6fe.camel@netapp.com

On 2/22/21 21:47, George, Martin wrote:
> Ping?
>
> On Thu, 2021-02-18 at 15:24 +0530, Martin George wrote:
>> Along with ensuring a non-zero kato is passed to a
>> persistent discovery controller, also ensure a zero
>> kato is passed to a non-persistent discovery controller.
>>
>> Signed-off-by: Martin George <marting@netapp.com>
>> ---
>>  fabrics.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/fabrics.c b/fabrics.c
>> index 1880a5d..ed15e08 100644
>> --- a/fabrics.c
>> +++ b/fabrics.c
>> @@ -1399,6 +1399,8 @@ static int discover_from_conf_file(const char
>> *desc, char *argstr,
>>
>>                 if (cfg.persistent && !cfg.keep_alive_tmo)
>>                         cfg.keep_alive_tmo = NVMF_DEF_DISC_TMO;
>> +               else if (!cfg.persistent && (cfg.keep_alive_tmo > 0))
>> +                       cfg.keep_alive_tmo = 0;
>>
>>                 if (traddr_is_hostname(&cfg)) {
>>                         ret = hostname2traddr(&cfg);
>> @@ -1474,6 +1476,8 @@ int fabrics_discover(const char *desc, int
>> argc, char **argv, bool connect)
>>         } else {
>>                 if (cfg.persistent && !cfg.keep_alive_tmo)
>>                         cfg.keep_alive_tmo = NVMF_DEF_DISC_TMO;
>> +               else if (!cfg.persistent && (cfg.keep_alive_tmo > 0))
>> +                       cfg.keep_alive_tmo = 0;
>>
>>                 if (traddr_is_hostname(&cfg)) {
>>                         ret = hostname2traddr(&cfg);
Is that if else if ladder code is repeated ? if so can you please add a
helper ?
unless there is a reason for keeping the duplicate code.
Also can we remove () for (cfg.keep_alive_tmo > 0) condition ?
>> --
>> 2.30.0
>>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-02-23  6:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18  9:54 [PATCH] fabrics: ensure zero kato for non-persistent controllers Martin George
2021-02-23  5:41 ` George, Martin
2021-02-23  6:06   ` Chaitanya Kulkarni [this message]
2021-02-23  9:56     ` George, Martin

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=BYAPR04MB4965AD8096D8F313B2BFF74C86809@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=Martin.George@netapp.com \
    --cc=linux-nvme@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).