All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: raoxu <raoxu@uniontech.com>,
	axboe@kernel.dk, hch@lst.de, kbusch@kernel.org,
	linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH nvme-7.3 3/4] nvme-fabrics: add helpers for subsystem and host identity options
Date: Wed, 2 Sep 2026 12:42:41 +0200	[thread overview]
Message-ID: <20260902104241.GC8206@lst.de> (raw)
In-Reply-To: <e948f5e5-3e96-4467-a4dd-67316871cc7a@grimberg.me>

On Sun, Aug 23, 2026 at 01:11:56AM +0300, Sagi Grimberg wrote:
>
>
> On 21/08/2026 9:25, raoxu wrote:
>> From: Xu Rao <raoxu@uniontech.com>
>>
>> The nqn, hostnqn and hostid options also start with match_strdup(), but
>> unlike the direct string replacements handled by nvmf_parse_string_option()
>> they perform option-specific validation or conversion before parsing is
>> complete.
>
> Does this warrant that they get a special handler? I am not sure I see how 
> this helps.

That doesn't.  But the fact that nvmf_parse_options is more than 400
lines in the current upstream tree is.  For non-trivial parsers
using switch statements, the code flow tends to be a lot nice when
every case is split out into a helper and not in the containing function.



  reply	other threads:[~2026-09-02 10:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  6:21 [PATCH nvme-7.3 0/4] nvme-fabrics: localize string option parsing raoxu
2026-08-21  6:24 ` [PATCH nvme-7.3 1/4] nvme-fabrics: separate option tokenizer pointer raoxu
2026-09-02 10:35   ` Christoph Hellwig
2026-08-21  6:25 ` [PATCH nvme-7.3 2/4] nvme-fabrics: add helper for owned string options raoxu
2026-08-22 22:12   ` Sagi Grimberg
2026-09-02 10:40   ` Christoph Hellwig
2026-08-21  6:25 ` [PATCH nvme-7.3 3/4] nvme-fabrics: add helpers for subsystem and host identity options raoxu
2026-08-22 22:11   ` Sagi Grimberg
2026-09-02 10:42     ` Christoph Hellwig [this message]
2026-09-02 10:44   ` Christoph Hellwig
2026-08-21  6:25 ` [PATCH nvme-7.3 4/4] nvme-fabrics: add helper for DH-CHAP secret options raoxu
2026-08-22 22:12   ` Sagi Grimberg
2026-09-02 10:45   ` 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=20260902104241.GC8206@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=raoxu@uniontech.com \
    --cc=sagi@grimberg.me \
    /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.