From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CF925A04DB for ; Fri, 16 Oct 2020 08:04:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 129D41EA9A; Fri, 16 Oct 2020 08:04:09 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 176A71EA5E; Fri, 16 Oct 2020 08:04:03 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 86EF6113E; Thu, 15 Oct 2020 23:04:01 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 752873F66B; Thu, 15 Oct 2020 23:04:01 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, john.mcnamara@intel.com Cc: ruifeng.wang@arm.com, juraj.linkes@pantheon.tech, david.marchand@redhat.com, nd@arm.com, ian.betts@intel.com, stable@dpdk.org Date: Fri, 16 Oct 2020 01:03:49 -0500 Message-Id: <20201016060349.19940-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201016060349.19940-1-honnappa.nagarahalli@arm.com> References: <20201016060349.19940-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-stable] [PATCH 2/2] examples/performance-thread: fix undef behavior X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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@intel.com Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang --- 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; -- 2.17.1