[PATCH v2 08/10] hash: fix unaligned access in predictable RSS

David Marchand david.marchand at redhat.com
Tue Jul 15 16:54:43 CEST 2025


On Tue, Jul 15, 2025 at 3:33 PM Konstantin Ananyev
<konstantin.ananyev at huawei.com> wrote:
> > > BTW, would our 'unaligned_uint32_t' type help here?
> >
> > Since most DPDK code rely on aligned types, using an unaligned type
> > can work if we have a function that serves as a conversion from
> > unaligned to aligned types.
> > In this code, since the next operation is a byte swap operation on
> > 32bits, I don't think we have many option but to memcpy().
>
> [] For clarity, I am talking about something like that:
> https://godbolt.org/z/vv6qzPMTz

I did not think just the cast would be enough, but it seems to work,
ok I'll respin.


-- 
David Marchand



More information about the dev mailing list