From: Sagi Grimberg <sagi@grimberg.me>
To: linux-nvme@lists.infradead.org
Cc: linux-block@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Keith Busch <keith.busch@intel.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v5 08/13] nvme-fabrics: allow user passing header digest
Date: Mon, 3 Dec 2018 17:52:12 -0800 [thread overview]
Message-ID: <20181204015217.16613-9-sagi@grimberg.me> (raw)
In-Reply-To: <20181204015217.16613-1-sagi@grimberg.me>
From: Sagi Grimberg <sagi@lightbitslabs.com>
Header digest is a nvme-tcp specific feature, but nothing prevents other
transports reusing the concept so do not associate with tcp transport
solely.
Reviewed-by: Christoph Hellwig <hch@lst.de>
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 10074ac7731b..4272f8a95db3 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -614,6 +614,7 @@ static const match_table_t opt_tokens = {
{ NVMF_OPT_HOST_ID, "hostid=%s" },
{ NVMF_OPT_DUP_CONNECT, "duplicate_connect" },
{ NVMF_OPT_DISABLE_SQFLOW, "disable_sqflow" },
+ { NVMF_OPT_HDR_DIGEST, "hdr_digest" },
{ NVMF_OPT_ERR, NULL }
};
@@ -633,6 +634,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->reconnect_delay = NVMF_DEF_RECONNECT_DELAY;
opts->kato = NVME_DEFAULT_KATO;
opts->duplicate_connect = false;
+ opts->hdr_digest = false;
options = o = kstrdup(buf, GFP_KERNEL);
if (!options)
@@ -827,6 +829,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
case NVMF_OPT_DISABLE_SQFLOW:
opts->disable_sqflow = true;
break;
+ case NVMF_OPT_HDR_DIGEST:
+ opts->hdr_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 ecd9a006a091..a6127f1a9e8e 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -59,6 +59,7 @@ enum {
NVMF_OPT_HOST_ID = 1 << 12,
NVMF_OPT_DUP_CONNECT = 1 << 13,
NVMF_OPT_DISABLE_SQFLOW = 1 << 14,
+ NVMF_OPT_HDR_DIGEST = 1 << 15,
};
/**
@@ -103,6 +104,7 @@ struct nvmf_ctrl_options {
struct nvmf_host *host;
int max_reconnects;
bool disable_sqflow;
+ bool hdr_digest;
};
/*
--
2.17.1
next prev parent reply other threads:[~2018-12-04 1:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 1:52 [PATCH v5 00/13] TCP transport binding for NVMe over Fabrics Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 01/13] ath6kl: add ath6kl_ prefix to crypto_type Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 02/13] datagram: open-code copy_page_to_iter Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 03/13] iov_iter: pass void csum pointer to csum_and_copy_to_iter Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 04/13] datagram: consolidate datagram copy to iter helpers Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 05/13] iov_iter: introduce hash_and_copy_to_iter helper Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 06/13] datagram: introduce skb_copy_and_hash_datagram_iter helper Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 07/13] nvmet: Add install_queue callout Sagi Grimberg
2018-12-04 1:52 ` Sagi Grimberg [this message]
2018-12-04 1:52 ` [PATCH v5 09/13] nvme-fabrics: allow user passing data digest Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 10/13] nvme-tcp: Add protocol header Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 11/13] nvmet-tcp: add NVMe over TCP target driver Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 12/13] nvmet: allow configfs tcp trtype configuration Sagi Grimberg
2018-12-04 1:52 ` [PATCH v5 13/13] nvme-tcp: add NVMe over TCP host driver Sagi Grimberg
2018-12-08 17:00 ` [PATCH v5 00/13] TCP transport binding for NVMe over Fabrics Christoph Hellwig
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=20181204015217.16613-9-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-kernel@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).