linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec
@ 2023-03-20 15:57 Caleb Sander
  2023-03-20 18:59 ` Sagi Grimberg
  2023-03-22  8:20 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Caleb Sander @ 2023-03-20 15:57 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
  Cc: Arnd Bergmann, linux-nvme, linux-m68k, Caleb Sander, Geert Uytterhoeven

The FEI field of C2HTermReq/H2CTermReq is 4 bytes but not 4-byte-aligned
in the NVMe/TCP specification (it is located at offset 10 in the PDU).
Split it into two 16-bit integers in struct nvme_tcp_term_pdu
so no padding is inserted. There should also be 10 reserved bytes after.
There are currently no users of this type.

Fixes: fc221d05447aa6db ("nvme-tcp: Add protocol header")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Caleb Sander <csander@purestorage.com>
---
 include/linux/nvme-tcp.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/nvme-tcp.h b/include/linux/nvme-tcp.h
index 75470159a194..57ebe1267f7f 100644
--- a/include/linux/nvme-tcp.h
+++ b/include/linux/nvme-tcp.h
@@ -113,12 +113,13 @@ struct nvme_tcp_icresp_pdu {
  * @fei:           fatal error information
  */
 struct nvme_tcp_term_pdu {
 	struct nvme_tcp_hdr	hdr;
 	__le16			fes;
-	__le32			fei;
-	__u8			rsvd[8];
+	__le16			feil;
+	__le16			feiu;
+	__u8			rsvd[10];
 };
 
 /**
  * struct nvme_tcp_cmd_pdu - nvme tcp command capsule pdu
  *
-- 
2.25.1


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

* Re: [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec
  2023-03-20 15:57 [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec Caleb Sander
@ 2023-03-20 18:59 ` Sagi Grimberg
  2023-03-22  8:20 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2023-03-20 18:59 UTC (permalink / raw)
  To: Caleb Sander, Keith Busch, Jens Axboe, Christoph Hellwig
  Cc: Arnd Bergmann, linux-nvme, linux-m68k, Geert Uytterhoeven

Thanks for fixing this,

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

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

* Re: [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec
  2023-03-20 15:57 [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec Caleb Sander
  2023-03-20 18:59 ` Sagi Grimberg
@ 2023-03-22  8:20 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2023-03-22  8:20 UTC (permalink / raw)
  To: Caleb Sander
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Arnd Bergmann, linux-nvme, linux-m68k, Geert Uytterhoeven

Thanks,

applied to nvme-6.3.

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

end of thread, other threads:[~2023-03-22  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 15:57 [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec Caleb Sander
2023-03-20 18:59 ` Sagi Grimberg
2023-03-22  8:20 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).