From: Honnappa Nagarahalli Date: Fri, 16 Oct 2020 06:03:49 +0000 (-0500) Subject: examples/performance-thread: fix build with low core count X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4e3b2d4c76e6249e44b92ffa7c62c031eb23af81;p=dpdk.git 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 --- 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;