Skip to content

Commit aa01c67

Browse files
calebsanderChristoph Hellwig
authored andcommitted
nvme-tcp: fix nvme_tcp_term_pdu to match spec
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: fc221d0 ("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>
1 parent def84ab commit aa01c67

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/linux/nvme-tcp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ struct nvme_tcp_icresp_pdu {
115115
struct nvme_tcp_term_pdu {
116116
struct nvme_tcp_hdr hdr;
117117
__le16 fes;
118-
__le32 fei;
119-
__u8 rsvd[8];
118+
__le16 feil;
119+
__le16 feiu;
120+
__u8 rsvd[10];
120121
};
121122

122123
/**

0 commit comments

Comments
 (0)