All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] Revert "nvme: verify MNAN value if ANA is enabled"
Date: Fri, 11 Jun 2021 11:08:19 +0200	[thread overview]
Message-ID: <20210611090819.d2ths7e4swfuj2s6@beryllium.lan> (raw)
In-Reply-To: <BYAPR04MB4965781915C1D4AFF2830E9586359@BYAPR04MB4965.namprd04.prod.outlook.com>

Hi Chaitanay,

On Thu, Jun 10, 2021 at 08:32:56PM +0000, Chaitanya Kulkarni wrote:
> Let us look into the host side issue first then we can move to target side.

Sure

> Consider a scenario where ANA enabled subsys with 0 namespaces on the target
> side. When host issues connect command to such a controller ctrl->mnan
> should be 0 and ctrl->nn should be 0 which should be valid.
> 
> With original check in the code :-
> 
> if (!ctrl->max_namespaces ||
>     ctrl->max_namespaces > le32_to_cpu(id->nn))

In the scenario you describe this is obvious wrong. I suspect we can't
decide if there are namespaces on the target side enabled or not at this
point. Maybe later in the discovery path we could check max_namespace
again. But I don't know if this is the trouble worth.

So yes I agree with your proposed change. In the end it's not important
anyway.

Thanks,
Daniel

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

  reply	other threads:[~2021-06-11  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  2:45 [PATCH] Revert "nvme: verify MNAN value if ANA is enabled" Chaitanya Kulkarni
2021-06-10  2:55 ` Chaitanya Kulkarni
2021-06-10  7:45   ` Daniel Wagner
2021-06-10 11:51     ` Daniel Wagner
2021-06-10 20:32     ` Chaitanya Kulkarni
2021-06-11  9:08       ` Daniel Wagner [this message]
2021-06-10 21:01     ` Chaitanya Kulkarni
2021-06-11  9:17       ` Daniel Wagner
2021-06-12 19:18         ` Chaitanya Kulkarni
2021-06-13 20:06         ` Chaitanya Kulkarni

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=20210611090819.d2ths7e4swfuj2s6@beryllium.lan \
    --to=dwagner@suse.de \
    --cc=Chaitanya.Kulkarni@wdc.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 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.