On Wed, Jan 06, 2010 at 08:46:35PM +0100, Samir Bellabes (sam@xxxxxxxxx) wrote: > Patrick McHardy <kaber@xxxxxxxxx> writes: > > >> +struct snet_event { > >> + enum snet_syscall syscall; > >> + u8 protocol; > >> +} __attribute__ ((packed)); > > > > Does this really need to be packed? You're using it in a > > struct snet_event_entry, which is padded anyways. > > I think that that members needs to be aligned, because this struct is > used for the jhash() computation. > when testing on x86_64, I discovered that jhash value wasn't the same, > for a same struct snet_event. Then I thougth about misaligned data, and > possible 'hole' between syscall and protocol. Without padding it will eat additional bytes after 'protocol' field, since enum is 32-bit long. > anyway, I patched the code to use jhash_2words() or jhash_1word(). > here is a patch, which apply on top of initial serie What's the purpose of hashing verdict_id? -- Evgeniy Polyakov -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html