git: 1d425ef3414c - main - nvmf: Add explicit alignment for struct nvmf_fabric_cmd

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 06 May 2024 22:19:50 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=1d425ef3414cdb0362c982f1820e659f2deb81a3

commit 1d425ef3414cdb0362c982f1820e659f2deb81a3
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-06 22:17:43 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-06 22:19:39 +0000

    nvmf: Add explicit alignment for struct nvmf_fabric_cmd
    
    This avoids -Wcast-align warnings from clang when upcasting from
    struct nvmf_fabric_cmd to struct nvmf_fabric_prop_set_cmd.
    
    Reported by:    bapt
    Sponsored by:   Chelsio Communications
---
 sys/dev/nvmf/nvmf_proto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/nvmf/nvmf_proto.h b/sys/dev/nvmf/nvmf_proto.h
index 66e68ff384b0..f67c34acbf95 100644
--- a/sys/dev/nvmf/nvmf_proto.h
+++ b/sys/dev/nvmf/nvmf_proto.h
@@ -172,7 +172,7 @@ struct nvmf_fabric_cmd {
 	uint16_t	cid;
 	uint8_t		fctype;
 	uint8_t		reserved2[59];
-};
+} __aligned(8);
 
 struct nvmf_fabric_auth_recv_cmd {
 	uint8_t		opcode;