[PATCH v2] reorder: improve buffer structure layout
Thomas Monjalon
thomas at monjalon.net
Thu Jun 1 17:19:50 CEST 2023
17/04/2023 11:12, Volodymyr Fialko:
> Rearrange the reorder buffer structure to prevent padding to extra one
> cache line.
>
> Current layout:
> struct rte_reorder_buffer {
> char name[RTE_REORDER_NAMESIZE];
> uint32_t min_seqn;
> unsigned int memsize;
> // -> padding to cache align (cir_buffer is also cache aligned)
> struct cir_buffer ready_buf;
> struct cir_buffer order_buf;
> int is_initialized;
> // -> padding to cache align, eat whole line
> };
>
> New layout:
> struct rte_reorder_buffer {
> char name[RTE_REORDER_NAMESIZE];
> uint32_t min_seqn;
> unsigned int memsize;
> bool is_initialized;
> // -> padding to cache align (cir_buffer is also cache aligned)
> struct cir_buffer ready_buf;
> struct cir_buffer order_buf;
> // -> no padding
> };
>
> Signed-off-by: Volodymyr Fialko <vfialko at marvell.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Applied, thanks.
More information about the dev
mailing list