diff options
| author | Caleb Sander <csander@purestorage.com> | 2023-03-20 09:57:36 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-30 12:49:09 +0200 |
| commit | 869bb1932bc7c3a572c99a28a18b46a1f7c3c41a (patch) | |
| tree | b5a40a68b533acb8c2f3986690616871203bcaed /include | |
| parent | a338bd69e55b4bd984ad11e97d0b1da6271c3ba0 (diff) | |
| download | linux-869bb1932bc7c3a572c99a28a18b46a1f7c3c41a.tar.gz linux-869bb1932bc7c3a572c99a28a18b46a1f7c3c41a.tar.bz2 linux-869bb1932bc7c3a572c99a28a18b46a1f7c3c41a.zip | |
nvme-tcp: fix nvme_tcp_term_pdu to match spec
[ Upstream commit aa01c67de5926fdb276793180564f172c55fb0d7 ]
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>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/nvme-tcp.h | 5 |
1 files 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 @@ -115,8 +115,9 @@ struct nvme_tcp_icresp_pdu { struct nvme_tcp_term_pdu { struct nvme_tcp_hdr hdr; __le16 fes; - __le32 fei; - __u8 rsvd[8]; + __le16 feil; + __le16 feiu; + __u8 rsvd[10]; }; /** |
