Re: [PATCH net-next v4 04/15] mctp: Add sockaddr_mctp to uapi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eugene,

Thanks for taking a look at these!

+typedef __u8                   mctp_eid_t;
+
+struct mctp_addr {
+       mctp_eid_t              s_addr;
+};
+
 struct sockaddr_mctp {
+       unsigned short int      smctp_family;

This gap makes the size of struct sockaddr_mctp 2 bytes less at least
on m68k, are you fine with that?

Yep, that's OK from the protocol implementation side; this layout better
matches the "hierarchy" of the MCTP addressing. If we go for optimal
packing, the order of the members makes somewhat less sense. We could
add padding members, but I'm not sure that's worth it...

I noticed a few other protocol implementations doing similar things, so
assume it isn't an issue - it's all arch-specific ABI anyway, right?

+       int                     smctp_network;
+       struct mctp_addr        smctp_addr;
+       __u8                    smctp_type;
+       __u8                    smctp_tag;
 };

Cheers,


Jeremy





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux