Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-tcp: check sgl supported by target
@ 2021-03-30 23:01 Max Gurtovoy
  2021-03-30 23:01 ` [PATCH 2/2] nvme-fc: " Max Gurtovoy
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Max Gurtovoy @ 2021-03-30 23:01 UTC (permalink / raw)
  To: linux-nvme, sagi, kbusch, hch, chaitanya.kulkarni, jsmart2021
  Cc: Max Gurtovoy

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/tcp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index a0f00cb8f9f3..e5fbb921165e 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1973,6 +1973,11 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
 		goto destroy_admin;
 	}
 
+	if (!(ctrl->sgls & ((1 << 0) | (1 << 1)))) {
+		dev_err(ctrl->device, "Mandatory sgls are not supported!\n");
+		goto destroy_admin;
+	}
+
 	if (opts->queue_size > ctrl->sqsize + 1)
 		dev_warn(ctrl->device,
 			"queue_size %zu > ctrl sqsize %u, clamping down\n",
-- 
2.25.4


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-02 16:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 23:01 [PATCH 1/2] nvme-tcp: check sgl supported by target Max Gurtovoy
2021-03-30 23:01 ` [PATCH 2/2] nvme-fc: " Max Gurtovoy
2021-03-30 23:42   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox