All of lore.kernel.org
 help / color / mirror / Atom feed
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 08/11] nvme-fabrics: allow user passing data digest
Date: Thu, 15 Nov 2018 09:16:20 -0800	[thread overview]
Message-ID: <20181115171626.9306-9-sagi@lightbitslabs.com> (raw)
In-Reply-To: <20181115171626.9306-1-sagi@lightbitslabs.com>

Data digest is a nvme-tcp specific feature, but nothing prevents other
transports reusing the concept so do not associate with tcp transport
solely.

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

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 9a8b57b3b2c1..97855a12364e 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -615,6 +615,7 @@ static const match_table_t opt_tokens = {
 	{ NVMF_OPT_DUP_CONNECT,		"duplicate_connect"	},
 	{ NVMF_OPT_DISABLE_SQFLOW,	"disable_sqflow"	},
 	{ NVMF_OPT_HDR_DIGEST,		"hdr_digest"		},
+	{ NVMF_OPT_DATA_DIGEST,		"data_digest"		},
 	{ NVMF_OPT_ERR,			NULL			}
 };
 
@@ -635,6 +636,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 	opts->kato = NVME_DEFAULT_KATO;
 	opts->duplicate_connect = false;
 	opts->hdr_digest = false;
+	opts->data_digest = false;
 
 	options = o = kstrdup(buf, GFP_KERNEL);
 	if (!options)
@@ -832,6 +834,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 		case NVMF_OPT_HDR_DIGEST:
 			opts->hdr_digest = true;
 			break;
+		case NVMF_OPT_DATA_DIGEST:
+			opts->data_digest = true;
+			break;
 		default:
 			pr_warn("unknown parameter or missing value '%s' in ctrl creation request\n",
 				p);
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index a6127f1a9e8e..524a02a67817 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -60,6 +60,7 @@ enum {
 	NVMF_OPT_DUP_CONNECT	= 1 << 13,
 	NVMF_OPT_DISABLE_SQFLOW = 1 << 14,
 	NVMF_OPT_HDR_DIGEST	= 1 << 15,
+	NVMF_OPT_DATA_DIGEST	= 1 << 16,
 };
 
 /**
@@ -105,6 +106,7 @@ struct nvmf_ctrl_options {
 	int			max_reconnects;
 	bool			disable_sqflow;
 	bool			hdr_digest;
+	bool			data_digest;
 };
 
 /*
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: sagi@lightbitslabs.com (Sagi Grimberg)
Subject: [PATCH 08/11] nvme-fabrics: allow user passing data digest
Date: Thu, 15 Nov 2018 09:16:20 -0800	[thread overview]
Message-ID: <20181115171626.9306-9-sagi@lightbitslabs.com> (raw)
In-Reply-To: <20181115171626.9306-1-sagi@lightbitslabs.com>

Data digest is a nvme-tcp specific feature, but nothing prevents other
transports reusing the concept so do not associate with tcp transport
solely.

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

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 9a8b57b3b2c1..97855a12364e 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -615,6 +615,7 @@ static const match_table_t opt_tokens = {
 	{ NVMF_OPT_DUP_CONNECT,		"duplicate_connect"	},
 	{ NVMF_OPT_DISABLE_SQFLOW,	"disable_sqflow"	},
 	{ NVMF_OPT_HDR_DIGEST,		"hdr_digest"		},
+	{ NVMF_OPT_DATA_DIGEST,		"data_digest"		},
 	{ NVMF_OPT_ERR,			NULL			}
 };
 
@@ -635,6 +636,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 	opts->kato = NVME_DEFAULT_KATO;
 	opts->duplicate_connect = false;
 	opts->hdr_digest = false;
+	opts->data_digest = false;
 
 	options = o = kstrdup(buf, GFP_KERNEL);
 	if (!options)
@@ -832,6 +834,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 		case NVMF_OPT_HDR_DIGEST:
 			opts->hdr_digest = true;
 			break;
+		case NVMF_OPT_DATA_DIGEST:
+			opts->data_digest = true;
+			break;
 		default:
 			pr_warn("unknown parameter or missing value '%s' in ctrl creation request\n",
 				p);
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index a6127f1a9e8e..524a02a67817 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -60,6 +60,7 @@ enum {
 	NVMF_OPT_DUP_CONNECT	= 1 << 13,
 	NVMF_OPT_DISABLE_SQFLOW = 1 << 14,
 	NVMF_OPT_HDR_DIGEST	= 1 << 15,
+	NVMF_OPT_DATA_DIGEST	= 1 << 16,
 };
 
 /**
@@ -105,6 +106,7 @@ struct nvmf_ctrl_options {
 	int			max_reconnects;
 	bool			disable_sqflow;
 	bool			hdr_digest;
+	bool			data_digest;
 };
 
 /*
-- 
2.17.1

  parent reply	other threads:[~2018-11-15 17:17 UTC|newest]

Thread overview: 56+ 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 ` Sagi Grimberg
2018-11-15 17:16 ` [PATCH 01/11] ath6kl: add ath6kl_ prefix to crypto_type Sagi Grimberg
2018-11-15 17:16   ` 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   ` 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   ` Sagi Grimberg
2018-11-15 17:16 ` [PATCH 04/11] nvme-core: add work elements to struct nvme_ctrl Sagi Grimberg
2018-11-15 17:16   ` Sagi Grimberg
2018-11-17 22:18   ` Max Gurtovoy
2018-11-17 22:18     ` Max Gurtovoy
2018-11-15 17:16 ` [PATCH 05/11] nvmet: Add install_queue callout Sagi Grimberg
2018-11-15 17:16   ` Sagi Grimberg
2018-11-17 22:36   ` Max Gurtovoy
2018-11-17 22:36     ` Max Gurtovoy
2018-11-19 21:21     ` Sagi Grimberg
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-15 17:16   ` Sagi Grimberg
2018-11-17 22:38   ` Max Gurtovoy
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   ` Sagi Grimberg
2018-11-15 17:16 ` Sagi Grimberg [this message]
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   ` Sagi Grimberg
2018-11-15 17:16 ` [PATCH 10/11] nvmet-tcp: add NVMe over TCP target driver Sagi Grimberg
2018-11-15 17:16   ` Sagi Grimberg
2018-11-17 20:15   ` David Miller
2018-11-17 20:15     ` David Miller
2018-11-17 22:48     ` Max Gurtovoy
2018-11-17 22:48       ` Max Gurtovoy
2018-11-19 21:37       ` Sagi Grimberg
2018-11-19 21:37         ` Sagi Grimberg
2018-11-19 21:26     ` Sagi Grimberg
2018-11-19 21:26       ` Sagi Grimberg
2018-11-19 22:53       ` David Miller
2018-11-19 22:53         ` David Miller
2018-11-19 23:14         ` Sagi Grimberg
2018-11-19 23:14           ` Sagi Grimberg
2018-11-19 23:18           ` David Miller
2018-11-19 23:18             ` David Miller
2018-11-19 23:24             ` Sagi Grimberg
2018-11-19 23:24               ` Sagi Grimberg
2018-11-20  1:44               ` David Miller
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   ` 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
2018-11-15 17:16 ` [PATCH nvme-cli 13/11] fabrics: add tcp port tsas decoding Sagi Grimberg
2018-11-15 17:16   ` Sagi Grimberg
2018-11-15 17:16 ` [PATCH nvme-cli 14/11] fabrics: add transport header and data digest Sagi Grimberg
2018-11-15 17:16   ` 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-9-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 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.