From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: <linux-nvme@lists.infradead.org>, <sagi@grimberg.me>,
<kbusch@kernel.org>, <hch@lst.de>, <chaitanya.kulkarni@wdc.com>,
<jsmart2021@gmail.com>
Cc: Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: [PATCH 2/2] nvme-fc: check sgl supported by target
Date: Tue, 30 Mar 2021 23:01:20 +0000 [thread overview]
Message-ID: <20210330230120.268671-2-mgurtovoy@nvidia.com> (raw)
In-Reply-To: <20210330230120.268671-1-mgurtovoy@nvidia.com>
SGLs support is mandatory for NVMe/tcp, make sure that the target is
aligned to the specification.
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
drivers/nvme/host/fc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 6ffa8de2a0d7..03032d9b0573 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3100,6 +3100,11 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
}
/* FC-NVME supports normal SGL Data Block Descriptors */
+ if (!(ctrl->ctrl.sgls & ((1 << 0) | (1 << 1)))) {
+ dev_err(ctrl->ctrl.device,
+ "Mandatory sgls are not supported!\n");
+ goto out_disconnect_admin_queue;
+ }
if (opts->queue_size > ctrl->ctrl.maxcmd) {
/* warn if maxcmd is lower than queue_size */
--
2.25.4
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-03-30 23:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 23:01 [PATCH 1/2] nvme-tcp: check sgl supported by target Max Gurtovoy
2021-03-30 23:01 ` Max Gurtovoy [this message]
2021-03-30 23:42 ` [PATCH 2/2] nvme-fc: " Chaitanya Kulkarni
2021-03-31 9:28 ` Max Gurtovoy
2021-03-30 23:39 ` [PATCH 1/2] nvme-tcp: " Chaitanya Kulkarni
2021-03-31 0:29 ` Keith Busch
2021-03-31 1:12 ` Chaitanya Kulkarni
2021-03-31 9:37 ` Max Gurtovoy
2021-04-02 16:49 ` 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=20210330230120.268671-2-mgurtovoy@nvidia.com \
--to=mgurtovoy@nvidia.com \
--cc=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=jsmart2021@gmail.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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
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