On Wed, Oct 2, 2024 at 8:39 PM Stephen Hemminger
<step...@networkplumber.org> wrote:
>
> Recent versions of GCC have some additional function attributes that can
> help with DPDK performance and stability.
>
> The alloc_align attribute tells the compiler what the alignment
> of the allocation will be, and the optimizer can use this to produce
> better code (especially memcpy and structure copies).
>
> The malloc attribute tells compiler that object is not overlapping
> and potentially aliasing. It also as an additional variant in GCC 11
> or later that allows for detecting all sorts of common errors like
> calling free() on memory allocated with rte_malloc().
>
> In order to use the malloc attribute the free function prototype
> needs to be moved before the allocator/create function prototype
> so that the malloc attribute can refer to it.
>
> This uncovered at least 16 pre-existing bugs in DPDK, these
> should go to stable.  This patch set is structured with:
>   - fix any new warnings that were discovered
>   - add macros for enable the macros
>   - enable the attributes

It seems v7 lost the last patch that was introducing and using the
annotations in rte_malloc.
Was there an issue with this patch, or is it just a series submission issue?


-- 
David Marchand

Reply via email to