From 4e3b2d4c76e6249e44b92ffa7c62c031eb23af81 Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Fri, 16 Oct 2020 01:03:49 -0500 Subject: [PATCH] examples/performance-thread: fix build with low core count 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: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Tested-by: Lukasz Wojciechowski Reviewed-by: Lukasz Wojciechowski Reviewed-by: David Marchand --- 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 e96076f290..7bf61db6be 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; -- 2.20.1