All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] nvme sends invalid command capsule over rdma transport for 5KiB write when target supports MSDBD > 1
@ 2021-05-24 17:19 Walker, Benjamin
  2021-05-26  9:12 ` Sagi Grimberg
  0 siblings, 1 reply; 9+ messages in thread
From: Walker, Benjamin @ 2021-05-24 17:19 UTC (permalink / raw)
  To: linux-nvme

This bug was found using the iozone tool.

- Linux kernel initiator, SPDK target, RDMA (RoCEv2) transport
- iozone is performing a 5KiB write to a 512 byte block size nvme device
- The SPDK target has reported that it supports 4KiB of in-capsule data, MSDBD of 16 (number of SGL descriptors), and ICDOFF of 0.
- The Linux kernel sends an NVMe-oF capsule with a command that claims to have 5KiB of data in the command, but actually only has a single SGL element describing 4KiB of data in-capsule.
- The SPDK target correctly fails this I/O

This fails on at least 5.11 but worked prior to 5.4. A git bisect shows that this commit is responsible: 38e1800275d3af607e4df92ff49dc2cf442586a4

I believe the key is the use of MSDBD > 1 and in-capsule data support. This seems to trick the initiator into thinking it can do 5KiB in one command with two SGL elements, but then the initiator goes down the in-capsule data path and can only describe 4KiB that way.

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

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

end of thread, other threads:[~2021-05-27 19:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 17:19 [bug report] nvme sends invalid command capsule over rdma transport for 5KiB write when target supports MSDBD > 1 Walker, Benjamin
2021-05-26  9:12 ` Sagi Grimberg
2021-05-26 14:10   ` Christoph Hellwig
2021-05-26 14:49     ` Max Gurtovoy
2021-05-26 16:00       ` Christoph Hellwig
2021-05-26 19:29         ` Walker, Benjamin
2021-05-26 21:57         ` Max Gurtovoy
2021-05-27 17:43           ` Walker, Benjamin
2021-05-27 17:48             ` Max Gurtovoy

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.