On Sat, Feb 17, 2024 at 03:22:12PM +0100, Laurent Vivier wrote: > On 2/16/24 19:24, Stefano Brivio wrote: > > On Fri, 16 Feb 2024 19:05:39 +0100 > > Laurent Vivier wrote: > > > > ... > > > I think I will send the v3 of my series without fixing that because I don't have enough > > > time this week. I will address the problem later. > > No problem! I will also try to spend a moment and see if there's some > > reasonable solution I can suggest. Thanks, > > > I can imagine 4 solutions: > > * to use inline functions (could it helps the compiler to manage the alignment problem?) > * to use C macros > * to use these new functions only with vhost-user as we know pointers will be aligned. > * to include structure we want to address in a generic wrapperstructure that will > unalign it as it is done with the current structure. I think some of my earlier comments suggested passing some values, rather than reading them from the iph - this would take us closer to the "feed" style of csum calculation that we already use for siphash. As a side effect, I think that will sidestep at least some of these problems. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson