From: Sagi Grimberg <sagi@lightbitslabs.com>
To: linux-nvme@lists.infradead.org
Cc: linux-block@vger.kernel.org, netdev@vger.kernel.org,
Christoph Hellwig <hch@lst.de>,
Keith Busch <keith.busch@intel.com>
Subject: [PATCH nvme-cli 13/11] fabrics: add tcp port tsas decoding
Date: Thu, 15 Nov 2018 09:16:25 -0800 [thread overview]
Message-ID: <20181115171626.9306-14-sagi@lightbitslabs.com> (raw)
In-Reply-To: <20181115171626.9306-1-sagi@lightbitslabs.com>
tcp tsas include sectype indication for unsecured/tls ports.
Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
---
fabrics.c | 14 ++++++++++++++
linux/nvme.h | 10 ++++++++++
2 files changed, 24 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index 6fd9dfaa5d79..774ea94dc0db 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -141,6 +141,16 @@ static inline const char *treq_str(__u8 treq)
return arg_str(treqs, ARRAY_SIZE(treqs), treq);
}
+static const char * const sectypes[] = {
+ [NVMF_TCP_SECTYPE_NONE] = "none",
+ [NVMF_TCP_SECTYPE_TLS] = "tls",
+};
+
+static inline const char *sectype_str(__u8 sectype)
+{
+ return arg_str(sectypes, ARRAY_SIZE(sectypes), sectype);
+}
+
static const char * const prtypes[] = {
[NVMF_RDMA_PRTYPE_NOT_SPECIFIED] = "not specified",
[NVMF_RDMA_PRTYPE_IB] = "infiniband",
@@ -450,6 +460,10 @@ static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec)
printf("rdma_pkey: 0x%04x\n",
e->tsas.rdma.pkey);
break;
+ case NVMF_TRTYPE_TCP:
+ printf("sectype: %s\n",
+ sectype_str(e->tsas.tcp.sectype));
+ break;
}
}
}
diff --git a/linux/nvme.h b/linux/nvme.h
index 7a600c791877..68000eb8c1dc 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -91,6 +91,13 @@ enum {
NVMF_RDMA_CMS_RDMA_CM = 1, /* Sockets based endpoint addressing */
};
+/* TCP port security type for Discovery Log Page entry TSAS
+ */
+enum {
+ NVMF_TCP_SECTYPE_NONE = 0, /* No Security */
+ NVMF_TCP_SECTYPE_TLS = 1, /* Transport Layer Security */
+};
+
#define NVME_AQ_DEPTH 32
#define NVME_NR_AEN_COMMANDS 1
#define NVME_AQ_BLK_MQ_DEPTH (NVME_AQ_DEPTH - NVME_NR_AEN_COMMANDS)
@@ -1184,6 +1191,9 @@ struct nvmf_disc_rsp_page_entry {
__u16 pkey;
__u8 resv10[246];
} rdma;
+ struct tcp {
+ __u8 sectype;
+ } tcp;
} tsas;
};
--
2.17.1
next prev parent reply other threads:[~2018-11-16 3:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 17:16 [PATCH 00/11] TCP transport binding for NVMe over Fabrics Sagi Grimberg
2018-11-15 17:16 ` [PATCH 01/11] ath6kl: add ath6kl_ prefix to crypto_type Sagi Grimberg
2018-11-15 17:16 ` [PATCH 02/11] iov_iter: introduce hash_and_copy iter helpers Sagi Grimberg
2018-11-15 17:16 ` [PATCH 03/11] datagram: introduce skb_copy_and_hash_datagram_iter helper Sagi Grimberg
2018-11-15 17:16 ` [PATCH 04/11] nvme-core: add work elements to struct nvme_ctrl Sagi Grimberg
2018-11-17 22:18 ` Max Gurtovoy
2018-11-15 17:16 ` [PATCH 05/11] nvmet: Add install_queue callout Sagi Grimberg
2018-11-17 22:36 ` Max Gurtovoy
2018-11-19 21:21 ` Sagi Grimberg
2018-11-15 17:16 ` [PATCH 06/11] nvmet: allow configfs tcp trtype configuration Sagi Grimberg
2018-11-17 22:38 ` Max Gurtovoy
2018-11-15 17:16 ` [PATCH 07/11] nvme-fabrics: allow user passing header digest Sagi Grimberg
2018-11-15 17:16 ` [PATCH 08/11] nvme-fabrics: allow user passing data digest Sagi Grimberg
2018-11-15 17:16 ` [PATCH 09/11] nvme-tcp: Add protocol header Sagi Grimberg
2018-11-15 17:16 ` [PATCH 10/11] nvmet-tcp: add NVMe over TCP target driver Sagi Grimberg
2018-11-17 20:15 ` David Miller
2018-11-17 22:48 ` Max Gurtovoy
2018-11-19 21:37 ` Sagi Grimberg
2018-11-19 21:26 ` Sagi Grimberg
2018-11-19 22:53 ` David Miller
2018-11-19 23:14 ` Sagi Grimberg
2018-11-19 23:18 ` David Miller
2018-11-19 23:24 ` Sagi Grimberg
2018-11-20 1:44 ` David Miller
2018-11-15 17:16 ` [PATCH 11/11] nvme-tcp: add NVMe over TCP host driver Sagi Grimberg
2018-11-15 17:16 ` [PATCH nvme-cli 12/11] nvme: Add TCP transport Sagi Grimberg
2018-11-15 17:16 ` Sagi Grimberg [this message]
2018-11-15 17:16 ` [PATCH nvme-cli 14/11] fabrics: add transport header and data digest 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=20181115171626.9306-14-sagi@lightbitslabs.com \
--to=sagi@lightbitslabs.com \
--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 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).