All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet: discovery controller to set ioccsz and iorcsz
@ 2017-02-17  1:43 James Smart
  2017-02-21 20:36 ` J Freyensee
  0 siblings, 1 reply; 3+ messages in thread
From: James Smart @ 2017-02-17  1:43 UTC (permalink / raw)



The discovery controller's Identify command handler never set these
fields leaving them zero. The host-side fc transport validates that
these values are appropriate and was killing the connection with the
controller as they were zero.

Change them to the minimal SQE and CQE size values.

-- james

Signed-off-by: James Smart <james.smart at broadcom.com>
---
 drivers/nvme/target/discovery.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index 12f39ee..6adb9e9 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -152,6 +152,11 @@ static void nvmet_execute_identify_disc_ctrl(struct nvmet_req *req)
 
 	strcpy(id->subnqn, ctrl->subsys->subsysnqn);
 
+	/* Max command capsule size is sqe */
+	id->ioccsz = cpu_to_le32(sizeof(struct nvme_command) / 16);
+	/* Max response capsule size is cqe */
+	id->iorcsz = cpu_to_le32(sizeof(struct nvme_completion) / 16);
+
 	status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));
 
 	kfree(id);
-- 
2.5.0

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

* [PATCH] nvmet: discovery controller to set ioccsz and iorcsz
  2017-02-17  1:43 [PATCH] nvmet: discovery controller to set ioccsz and iorcsz James Smart
@ 2017-02-21 20:36 ` J Freyensee
  2017-02-21 20:37   ` J Freyensee
  0 siblings, 1 reply; 3+ messages in thread
From: J Freyensee @ 2017-02-21 20:36 UTC (permalink / raw)


On Thu, 2017-02-16@17:43 -0800, James Smart wrote:
> The discovery controller's Identify command handler never set these
> fields leaving them zero. The host-side fc transport validates that
> these values are appropriate and was killing the connection with the
> controller as they were zero.
> 
> Change them to the minimal SQE and CQE size values.

Looks good to me.

Reviewed-by: Jay Freyensee <james_p_freyensee at linux.intel.com>

> 
> -- james
> 
> Signed-off-by: James Smart <james.smart at broadcom.com>
> ---
> ?drivers/nvme/target/discovery.c | 5 +++++
> ?1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/nvme/target/discovery.c
> b/drivers/nvme/target/discovery.c
> index 12f39ee..6adb9e9 100644
> --- a/drivers/nvme/target/discovery.c
> +++ b/drivers/nvme/target/discovery.c
> @@ -152,6 +152,11 @@ static void nvmet_execute_identify_disc_ctrl(struct
> nvmet_req *req)
> ?
> ?	strcpy(id->subnqn, ctrl->subsys->subsysnqn);
> ?
> +	/* Max command capsule size is sqe */
> +	id->ioccsz = cpu_to_le32(sizeof(struct nvme_command) / 16);
> +	/* Max response capsule size is cqe */
> +	id->iorcsz = cpu_to_le32(sizeof(struct nvme_completion) / 16);
> +
> ?	status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));
> ?
> ?	kfree(id);

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

* [PATCH] nvmet: discovery controller to set ioccsz and iorcsz
  2017-02-21 20:36 ` J Freyensee
@ 2017-02-21 20:37   ` J Freyensee
  0 siblings, 0 replies; 3+ messages in thread
From: J Freyensee @ 2017-02-21 20:37 UTC (permalink / raw)


On Tue, 2017-02-21@12:36 -0800, J Freyensee wrote:
> On Thu, 2017-02-16@17:43 -0800, James Smart wrote:

Nack this, I missed the next version thread :-/.

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

end of thread, other threads:[~2017-02-21 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17  1:43 [PATCH] nvmet: discovery controller to set ioccsz and iorcsz James Smart
2017-02-21 20:36 ` J Freyensee
2017-02-21 20:37   ` J Freyensee

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.