Re: mbuf padding and alignment

2017-05-08 Thread Mike Belopuhov
On Mon, May 08, 2017 at 13:38 +0200, Mark Kettenis wrote: > So the reason mikeb@'s mbuf changes caused issues is that the way we > define struct mbuf is inherently fragile because it doesn't take > structure padding into account. Adding an int64_t member to struct > pkthdr changed the alignment fr

mbuf padding and alignment

2017-05-08 Thread Mark Kettenis
So the reason mikeb@'s mbuf changes caused issues is that the way we define struct mbuf is inherently fragile because it doesn't take structure padding into account. Adding an int64_t member to struct pkthdr changed the alignment from 4 bytes to 8 bytes on most 32-bit architectures (but not i386).