On 12/10/18 10:59 PM, David Miller wrote: > From: David Ahern <dsah...@gmail.com> > Date: Mon, 10 Dec 2018 19:47:33 -0700 > >> On 12/7/18 4:45 PM, David Miller wrote: >>> >>> Right, neigh->ha[] should probably be kept 8-byte aligned. >>> >> >> From what I can see ha is only used with memcpy, and neighbour struct is >> annotated with __randomize_layout. Are you saying that ha should be >> marked with __aligned(8)? > > People who care about performance probably don't build with randomization > enabled, do they? > > Even though it uses memcpy() it will be faster if it is 8 byte aligned > and we can probably explicitly take advantage of that alignment even > more if we add the marking as you suggest perhaps. > > Given all of this, what is your opinion? >
Arguably my take is ethernet centric. I do not see how 8-byte alignment matters when copying 6 bytes. In my response to Eric I showed ha is still 4-byte aligned and does not straddle cachelines. Those seem the more relevant to me.