On Tue, Mar 23, 2021 at 05:25:43PM +0000, Rimmer, Todd wrote: > In studying all the related fields, in most cases if we shuffled > everything for maximum packing, the structures would still end up > being about the same size and this would all be for non-performance > path ABIs. It is not about size, it is about uABI compatability. Do not place packing holes in uABI structures as it is *very complicated* to guarentee those work across all the combinations of user/kernel we have to support. Every uABI structure should have explicit padding, it should be organized to minimize padding, and "easy on the programmer" is not a top concern. You must ensure that all compilers generate the same structure byte layout. On x86 this means a classic i386 compiler, a AMD64 x32 ABI, and the normal AMD64 compiler. > It should be noted, there are existing examples with small gaps or > reserved fields in the existing kernel and RDMA stack. A few > examples in ib_user_verbs.h include: Past mistakes do not excuse future errors. Most of those are not uABI structs. Jason