From: Caleb Sander <csander@purestorage.com>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-nvme@lists.infradead.org, linux-m68k@lists.linux-m68k.org,
Caleb Sander <csander@purestorage.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec
Date: Mon, 20 Mar 2023 09:57:36 -0600 [thread overview]
Message-ID: <20230320155736.1492682-1-csander@purestorage.com> (raw)
In-Reply-To: <linux-m68k@lists.linux-m68k.org>
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
next reply other threads:[~2023-03-20 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 15:57 Caleb Sander [this message]
2023-03-20 18:59 ` [PATCH] nvme-tcp: fix nvme_tcp_term_pdu to match spec Sagi Grimberg
2023-03-22 8:20 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230320155736.1492682-1-csander@purestorage.com \
--to=csander@purestorage.com \
--cc=arnd@arndb.de \
--cc=axboe@fb.com \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).