Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Belanger, Martin" <Martin.Belanger@dell.com>,
	Martin Belanger <nitram_67@hotmail.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	"axboe@fb.com" <axboe@fb.com>, "hch@lst.de" <hch@lst.de>,
	"sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH 1/1] Add 'Transport Interface' (triface) option. This can be used to specify the IP interface to use for the connection. The driver uses that to set SO_BINDTODEVICE on the socket before connecting.
Date: Tue, 4 May 2021 15:25:41 +0200
Message-ID: <cc8805b2-63eb-93ac-6505-66305a73cb3c@suse.de> (raw)
In-Reply-To: <SJ0PR19MB454486D08CA07BCE274966E6F25B9@SJ0PR19MB4544.namprd19.prod.outlook.com>

On 5/3/21 6:59 PM, Belanger, Martin wrote:
> Hi Hannes,
> 
> I just noticed there were in-line comments. to answer you questions:
> 

This is the recommended style when working with linux patches; please do 
not top-post.

> Q1) Why not simply 'host_iface' ? 'triface' is a bit awkward.
> A1) I used TRIFACE to keep consistency with all other transport options: traddr, trsvcid, host_traddr.
> I will rename to host_iface at your suggestion.
> 
> Q2) Is this valid for all transports? I guess it would only work for 'tcp', and maybe 'rdma' if one
> would be running ROCE. Shouldn't we error out on other transports like 'fc' or 'loop'?
> A2) This is only for TCP, and we do check that this option is only allowed for TCP by specifying it
> in the "allowed_opts" as follows (see file tcp.c):
> 
> static struct nvmf_transport_ops nvme_tcp_transport = {
>          .name           = "tcp",
>          .module         = THIS_MODULE,
>          .required_opts  = NVMF_OPT_TRADDR,
>          .allowed_opts   = NVMF_OPT_TRSVCID | NVMF_OPT_RECONNECT_DELAY |
>                            NVMF_OPT_HOST_TRADDR | NVMF_OPT_CTRL_LOSS_TMO |
>                            NVMF_OPT_HDR_DIGEST | NVMF_OPT_DATA_DIGEST |
>                            NVMF_OPT_NR_WRITE_QUEUES | NVMF_OPT_NR_POLL_QUEUES |
>                            NVMF_OPT_TOS | NVMF_OPT_HOST_TRIFACE,
>          .create_ctrl    = nvme_tcp_create_ctrl,
> };
>
Right, okay.

> Q3) Normally the options are just parts of the 'address' string; why didn't
> you use that approach here?
> A3) I don't understand what you mean?
> 
The 'address' string contains all transport arguments (without the 
transport type), concatenated by a ','.
So the 'host_iface' value should just be added to the address string 
itself, and not added as separate argument to the sysfs printf() call.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

  reply index

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210415192848.962891-1-nitram_67@hotmail.com>
2021-04-15 19:28 ` Martin Belanger
2021-05-01 11:34   ` Hannes Reinecke
2021-05-03 16:59     ` Belanger, Martin
2021-05-04 13:25       ` Hannes Reinecke [this message]
2021-05-04 19:56   ` Sagi Grimberg
2021-05-05  8:47     ` Hannes Reinecke
2021-05-05 14:31       ` Belanger, Martin
2021-05-05 18:33         ` James Smart
2021-05-05 20:32         ` Sagi Grimberg
2021-05-06 18:27           ` Michael Christie
2021-05-06  6:05         ` Hannes Reinecke
2021-05-06  7:00           ` Hannes Reinecke
2021-05-06 15:46             ` Belanger, Martin
2021-05-07 18:20               ` Sagi Grimberg
2021-05-10 13:49                 ` Belanger, Martin
2021-05-10 18:13                   ` Sagi Grimberg
2021-05-10 19:18                     ` Belanger, Martin
2021-05-11  0:28                       ` Sagi Grimberg
2021-05-11 13:41                         ` Belanger, Martin
2021-05-11 17:13                           ` Sagi Grimberg
2021-05-12  6:09                             ` Hannes Reinecke
2021-05-12 12:12                               ` Belanger, Martin
2021-05-12 22:12                                 ` Sagi Grimberg

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=cc8805b2-63eb-93ac-6505-66305a73cb3c@suse.de \
    --to=hare@suse.de \
    --cc=Martin.Belanger@dell.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nitram_67@hotmail.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

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git