|SUCCESS| stack: rightsize cache guard

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon May 4 13:50:55 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163554

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-05-04

commit 20260504071539.252926-1-mb at smartsharesystems.com
Author: Morten Brorup <mb at smartsharesystems.com>
Subject: [PATCH] stack: rightsize cache guard

This patch updates the stack library to use the configurable
RTE_CACHE_GUARD_LINES instead of a hardcoded value of 2 cache lines for
padding to avoid false sharing.

> diff --git a/lib/stack/rte_stack_lf.c b/lib/stack/rte_stack_lf.c
> index 0adcc263e4..db951f6d1b 100644
> --- a/lib/stack/rte_stack_lf.c
> +++ b/lib/stack/rte_stack_lf.c
> @@ -25,7 +25,7 @@ rte_stack_lf_get_memsize(unsigned int count)
>  	/* Add padding to avoid false sharing conflicts caused by
>  	 * next-line hardware prefetchers.
>  	 */
> -	sz += 2 * RTE_CACHE_LINE_SIZE;
> +	sz += RTE_CACHE_GUARD_LINES * RTE_CACHE_LINE_SIZE;

Does RTE_CACHE_GUARD_LINES have a guaranteed minimum value? If this macro
could be 0, does this change break the original intent of ensuring at least
some guard space?

[ ... ]


More information about the test-report mailing list