Re: [PATCH v5 17/17] eal: add function attributes for allocation functions

2024-10-02 Thread David Marchand
On Tue, Oct 1, 2024 at 6:39 PM Stephen Hemminger wrote: > diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h > index eec0400dad..595cadd5b8 100644 > --- a/lib/eal/include/rte_common.h > +++ b/lib/eal/include/rte_common.h > @@ -228,6 +228,40 @@ typedef uint16_t unaligned_uint1

[PATCH v5 17/17] eal: add function attributes for allocation functions

2024-10-01 Thread Stephen Hemminger
The allocation functions take a alignment argument that can be useful to hint the compiler optimizer. This is supported by GCC and Clang but only useful with GCC because Clang gives warning if alignment is 0. Newer versions of GCC have a malloc attribute that can be used to find mismatches between