On Mon, Sep 30, 2024 at 11:28 AM Robin Jarry <rja...@redhat.com> wrote: > > In some cases, the node context data is used to store two pointers > because the data is larger than the reserved 16 bytes. Having to define > intermediate structures just to be able to cast is tedious. And without > intermediate structures, casting to opaque pointers is hard without > violating strict aliasing rules. > > Add an unnamed union to allow storing opaque pointers in the node > context. Unfortunately, aligning an unnamed union that contains an array > produces inconsistent results between C and C++. To preserve ABI/API > compatibility in both C and C++, move all fast-path area fields into an > unnamed struct which is itself cache aligned. Use __rte_cache_aligned to > preserve existing alignment on architectures where cache lines are 128 > bytes. > > Add a static assert to ensure that the fast path area does not grow > beyond a 64 bytes cache line. > > Signed-off-by: Robin Jarry <rja...@redhat.com> > Acked-by: Kiran Kumar Kokkilagadda <kirankum...@marvell.com>
Applied, thanks. -- David Marchand