[dpdk-stable] [dpdk-dev] [PATCH 2/2] examples/performance-thread: fix undef behavior

Lukasz Wojciechowski l.wojciechow at partner.samsung.com
Wed Oct 21 00:46:31 CEST 2020


Looks good!

W dniu 16.10.2020 o 08:03, Honnappa Nagarahalli pisze:
> When the value of RTE_MAX_LCORE is small, it results in the
> following compilation error.
>
> ../examples/performance-thread/l3fwd-thread/main.c:2338:34: error:
> iteration 4 invokes undefined behavior
> [-Werror=aggressive-loop-optimizations]
>
> Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
> Cc: ian.betts at intel.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
     Tested-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
     Reviewed-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
> ---
>   examples/performance-thread/l3fwd-thread/main.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
> index 818e483d2..dc34d4893 100644
> --- a/examples/performance-thread/l3fwd-thread/main.c
> +++ b/examples/performance-thread/l3fwd-thread/main.c
> @@ -599,8 +599,8 @@ struct thread_rx_conf rx_thread[MAX_RX_THREAD];
>   struct thread_tx_conf {
>   	struct thread_conf conf;
>   
> -	uint16_t tx_queue_id[RTE_MAX_LCORE];
> -	struct mbuf_table tx_mbufs[RTE_MAX_LCORE];
> +	uint16_t tx_queue_id[RTE_MAX_ETHPORTS];
> +	struct mbuf_table tx_mbufs[RTE_MAX_ETHPORTS];
>   
>   	struct rte_ring *ring;
>   	struct lthread_cond **ready;

-- 
Lukasz Wojciechowski
Principal Software Engineer

Samsung R&D Institute Poland
Samsung Electronics
Office +48 22 377 88 25
l.wojciechow at partner.samsung.com



More information about the stable mailing list