All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: linux-nvme@lists.infradead.org
Cc: linux-block@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH nvme-cli v2 15/14] nvme: Add TCP transport
Date: Mon, 19 Nov 2018 19:00:17 -0800	[thread overview]
Message-ID: <20181120030019.31738-17-sagi@grimberg.me> (raw)
In-Reply-To: <20181120030019.31738-1-sagi@grimberg.me>

From: Sagi Grimberg <sagi@lightbitslabs.com>

Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
---
 fabrics.c    | 5 ++++-
 linux/nvme.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fabrics.c b/fabrics.c
index be6a18cd4787..b4fac97253ba 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -96,6 +96,7 @@ static const char *arg_str(const char * const *strings,
 static const char * const trtypes[] = {
 	[NVMF_TRTYPE_RDMA]	= "rdma",
 	[NVMF_TRTYPE_FC]	= "fibre-channel",
+	[NVMF_TRTYPE_TCP]	= "tcp",
 	[NVMF_TRTYPE_LOOP]	= "loop",
 };
 
@@ -703,11 +704,13 @@ retry:
 		/* we can safely ignore the rest of the entries */
 		break;
 	case NVMF_TRTYPE_RDMA:
+	case NVMF_TRTYPE_TCP:
 		switch (e->adrfam) {
 		case NVMF_ADDR_FAMILY_IP4:
 		case NVMF_ADDR_FAMILY_IP6:
 			/* FALLTHRU */
-			len = sprintf(p, ",transport=rdma");
+			len = sprintf(p, ",transport=%s",
+				e->trtype == NVMF_TRTYPE_RDMA ? "rdma" : "tcp");
 			if (len < 0)
 				return -EINVAL;
 			p += len;
diff --git a/linux/nvme.h b/linux/nvme.h
index a6a44b066267..7a600c791877 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -52,6 +52,7 @@ enum {
 enum {
 	NVMF_TRTYPE_RDMA	= 1,	/* RDMA */
 	NVMF_TRTYPE_FC		= 2,	/* Fibre Channel */
+	NVMF_TRTYPE_TCP		= 3,	/* TCP */
 	NVMF_TRTYPE_LOOP	= 254,	/* Reserved for host usage */
 	NVMF_TRTYPE_MAX,
 };
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH nvme-cli v2 15/14] nvme: Add TCP transport
Date: Mon, 19 Nov 2018 19:00:17 -0800	[thread overview]
Message-ID: <20181120030019.31738-17-sagi@grimberg.me> (raw)
In-Reply-To: <20181120030019.31738-1-sagi@grimberg.me>

From: Sagi Grimberg <sagi@lightbitslabs.com>

Signed-off-by: Sagi Grimberg <sagi at lightbitslabs.com>
---
 fabrics.c    | 5 ++++-
 linux/nvme.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fabrics.c b/fabrics.c
index be6a18cd4787..b4fac97253ba 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -96,6 +96,7 @@ static const char *arg_str(const char * const *strings,
 static const char * const trtypes[] = {
 	[NVMF_TRTYPE_RDMA]	= "rdma",
 	[NVMF_TRTYPE_FC]	= "fibre-channel",
+	[NVMF_TRTYPE_TCP]	= "tcp",
 	[NVMF_TRTYPE_LOOP]	= "loop",
 };
 
@@ -703,11 +704,13 @@ retry:
 		/* we can safely ignore the rest of the entries */
 		break;
 	case NVMF_TRTYPE_RDMA:
+	case NVMF_TRTYPE_TCP:
 		switch (e->adrfam) {
 		case NVMF_ADDR_FAMILY_IP4:
 		case NVMF_ADDR_FAMILY_IP6:
 			/* FALLTHRU */
-			len = sprintf(p, ",transport=rdma");
+			len = sprintf(p, ",transport=%s",
+				e->trtype == NVMF_TRTYPE_RDMA ? "rdma" : "tcp");
 			if (len < 0)
 				return -EINVAL;
 			p += len;
diff --git a/linux/nvme.h b/linux/nvme.h
index a6a44b066267..7a600c791877 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -52,6 +52,7 @@ enum {
 enum {
 	NVMF_TRTYPE_RDMA	= 1,	/* RDMA */
 	NVMF_TRTYPE_FC		= 2,	/* Fibre Channel */
+	NVMF_TRTYPE_TCP		= 3,	/* TCP */
 	NVMF_TRTYPE_LOOP	= 254,	/* Reserved for host usage */
 	NVMF_TRTYPE_MAX,
 };
-- 
2.17.1

  parent reply	other threads:[~2018-11-20  3:00 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  3:00 [PATCH v2 00/14] TCP transport binding for NVMe over Fabrics Sagi Grimberg
2018-11-20  3:00 ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 01/14] ath6kl: add ath6kl_ prefix to crypto_type Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 02/14] datagram: open-code copy_page_to_iter Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 03/14] iov_iter: pass void csum pointer to csum_and_copy_to_iter Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 04/14] datagram: consolidate datagram copy to iter helpers Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 04/14] net/datagram: " Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 05/14] iov_iter: introduce hash_and_copy_to_iter helper Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 06/14] datagram: introduce skb_copy_and_hash_datagram_iter helper Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 07/14] nvme-core: add work elements to struct nvme_ctrl Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:04   ` Christoph Hellwig
2018-11-21 13:04     ` Christoph Hellwig
2018-11-21 22:28     ` Sagi Grimberg
2018-11-21 22:28       ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 08/14] nvmet: Add install_queue callout Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:05   ` Christoph Hellwig
2018-11-21 13:05     ` Christoph Hellwig
2018-11-20  3:00 ` [PATCH v2 09/14] nvmet: allow configfs tcp trtype configuration Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:05   ` Christoph Hellwig
2018-11-21 13:05     ` Christoph Hellwig
2018-11-20  3:00 ` [PATCH v2 10/14] nvme-fabrics: allow user passing header digest Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:06   ` Christoph Hellwig
2018-11-21 13:06     ` Christoph Hellwig
2018-11-20  3:00 ` [PATCH v2 11/14] nvme-fabrics: allow user passing data digest Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:06   ` Christoph Hellwig
2018-11-21 13:06     ` Christoph Hellwig
2018-11-20  3:00 ` [PATCH v2 12/14] nvme-tcp: Add protocol header Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 13/14] nvmet-tcp: add NVMe over TCP target driver Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-21 13:07   ` Christoph Hellwig
2018-11-21 13:07     ` Christoph Hellwig
2018-11-21 22:29     ` Sagi Grimberg
2018-11-21 22:29       ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH v2 14/14] nvme-tcp: add NVMe over TCP host driver Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20 23:34   ` Narayan Ayalasomayajula
2018-11-20 23:34     ` Narayan Ayalasomayajula
2018-11-20 23:34     ` Narayan Ayalasomayajula
2018-11-21  0:10     ` Sagi Grimberg
2018-11-21  0:10       ` Sagi Grimberg
2018-11-21  0:10       ` Sagi Grimberg
2018-11-21  0:41   ` Ethan Weidman
2018-11-21  0:41     ` Ethan Weidman
2018-11-21  5:43     ` Sagi Grimberg
2018-11-21  5:43       ` Sagi Grimberg
2018-11-21  8:56   ` Christoph Hellwig
2018-11-21  8:56     ` Christoph Hellwig
2018-11-21 22:27     ` Sagi Grimberg
2018-11-21 22:27       ` Sagi Grimberg
2018-11-21 12:01   ` Mikhail Skorzhinskii
2018-11-21 12:01     ` Mikhail Skorzhinskii
2018-11-21 22:28     ` Sagi Grimberg
2018-11-21 22:28       ` Sagi Grimberg
2018-11-20  3:00 ` Sagi Grimberg [this message]
2018-11-20  3:00   ` [PATCH nvme-cli v2 15/14] nvme: Add TCP transport Sagi Grimberg
2018-11-20  9:36   ` Arend van Spriel
2018-11-20  9:36     ` Arend van Spriel
2018-11-20 22:56     ` Sagi Grimberg
2018-11-20 22:56       ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH nvme-cli v2 16/14] fabrics: add tcp port tsas decoding Sagi Grimberg
2018-11-20  3:00   ` Sagi Grimberg
2018-11-20  3:00 ` [PATCH nvme-cli v2 17/14] fabrics: add transport header and data digest Sagi Grimberg
2018-11-20  3:00   ` 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=20181120030019.31738-17-sagi@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=netdev@vger.kernel.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.