nvmet: discovery controller to set ioccsz and iorcsz
Subsystems (2)
PATCH v2 1/1 nvmet: discovery controller to set ioccsz and iorcsz
Revised the patch: add transport capsule inline size into ioccsz value
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.
Set the controller ioccsz and iorcsz values
-- james
--- drivers/nvme/target/discovery.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/nvme/target/discovery.c +6 -0
@@ -152,6 +152,12 @@ static void nvmet_execute_identify_disc_ctrl(struct nvmet_req *req)strcpy (id->subnqn, ctrl->subsys->subsysnqn); +/* Max command capsule size is sqe + single page of in-capsule data */ + id->ioccsz =cpu_to_le32 ((sizeof (struct nvme_command ) + + ctrl->ops->sqe_inline_size) /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);
Signature · 1 line
2.5.0
PATCH v2 1/1 nvmet: discovery controller to set ioccsz and iorcsz
Quoted 9 lines · James Smart
Revised the patch: add transport capsule inline size into ioccsz value
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.
Set the controller ioccsz and iorcsz values
Discovery controllers do not support I/O commands, so these settings don't make any sense there. They are also not included in the fields that Idenitfy Controller should report for Discovery controllers (Figure 33 in Fabrics 1.0)
PATCH v2 1/1 nvmet: discovery controller to set ioccsz and iorcsz
Quoted 10 lines · Christoph Hellwig
Quoted 9 lines · James Smart
Revised the patch: add transport capsule inline size into ioccsz value
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.
Quoted 6 lines
Quoted 1 line
Set the controller ioccsz and iorcsz values
Discovery controllers do not support I/O commands, so these settings don't make any sense there.??They are also not included in the fields that Idenitfy Controller should report for Discovery controllers (Figure 33 in Fabrics 1.0)
I didn't think it hurt making sure these two fields contain the minimum required values, per Fabrics spec, as values of 0 are invalid (Figure 28). ?But I also see your point.
Jay
Quoted 5 lines
_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme