linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: Daniel Wagner <dwagner@suse.de>, linux-nvme@lists.infradead.org
Subject: Re: [RFC v1 0/3] Unifying fabrics drivers
Date: Fri, 3 Mar 2023 15:13:53 -0800	[thread overview]
Message-ID: <e70f3b0c-5049-0bbe-fb13-41efc0425e0f@gmail.com> (raw)
In-Reply-To: <20230301082737.10021-1-dwagner@suse.de>

On 3/1/2023 12:27 AM, Daniel Wagner wrote:
> The two fabrics rdma and tcp share a lot of common code. This here is my attempt
> to consolidate the common code.
> 
> I've picked just one function (setup admin queue) for this RFC to get a feeling
> and feedback if this is a valid approach or if people hate it. I've left out fc
> for the time being because it differs too much two the other two drivers.
> 
> I've tested quickly tcp, rdma is only compile tested.
> 
> Daniel Wagner (3):
>    nvme-rdma: stream line queue functions arguments
>    nvme-rdma: factor rdma specific queue init code out
>    nvme-fabrics: move configure admin queue code to fabrics.c
> 
>   drivers/nvme/host/fabrics.c |  52 ++++++++++++++
>   drivers/nvme/host/fabrics.h |  12 ++++
>   drivers/nvme/host/nvme.h    |   3 +
>   drivers/nvme/host/rdma.c    | 132 +++++++++++++++++++-----------------
>   drivers/nvme/host/tcp.c     |  94 ++++++++-----------------
>   5 files changed, 165 insertions(+), 128 deletions(-)
> 

Initial reaction:
The resulting nvmf_configure_admin_queue() routine does look nice. 
However, I'm not sure the callback chain is all that easier to follow.

I guess I'm most disappointed that more of the logic isn't actually 
being commonized.

Examples:
alloc_queue():
   At least pass queue_size as an arg. I assume we should to match up
   with the fabric connect routine.
init_queue():
   I'd like to see setting of ctrl.max_segments/hw_sectors in the common
   code. Unfortunately, likely needs to be a fops call. At least it
   makes sure its done at the same point in controller creation.
start_queue():
   can't common code do the nvmf_connect_admin_queue() call ?
      If its too tied to the LIVE bit - then perhaps the queue LIVE
      bits should actually be getting set by the common code after
      the successful start_queue - or has routines transport can call
      from start/stop to set/clear it.
   If LIVE bit can be dealt with - this whole block in rdma/tcp moves to
   common code.

Also I'd really like to get rid of the "new" argument everywhere. It 
should just be a state flag set on the common ctrl.

I guess not bad, but not helping much (yet).

-- james



  parent reply	other threads:[~2023-03-03 23:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  8:27 [RFC v1 0/3] Unifying fabrics drivers Daniel Wagner
2023-03-01  8:27 ` [RFC v1 1/3] nvme-rdma: stream line queue functions arguments Daniel Wagner
2023-03-01  8:27 ` [RFC v1 2/3] nvme-rdma: factor rdma specific queue init code out Daniel Wagner
2023-03-01  8:27 ` [RFC v1 3/3] nvme-fabrics: move configure admin queue code to fabrics.c Daniel Wagner
2023-03-02  3:02 ` [RFC v1 0/3] Unifying fabrics drivers Chaitanya Kulkarni
2023-03-02  8:15   ` Daniel Wagner
2023-03-03 23:13 ` James Smart [this message]
2023-03-07 12:41   ` Daniel Wagner
2023-03-07 23:55     ` Chaitanya Kulkarni
2023-03-08  8:33       ` Daniel Wagner
2023-03-07  9:26 ` Sagi Grimberg
2023-03-07 12:28   ` Daniel Wagner
2023-03-07 12:34     ` Sagi Grimberg
2023-03-07 22:09       ` James Smart
2023-03-07 22:09     ` James Smart
2023-03-08 11:38       ` Sagi Grimberg
2023-03-08 15:13         ` James Smart

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=e70f3b0c-5049-0bbe-fb13-41efc0425e0f@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=dwagner@suse.de \
    --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).