DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
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,
Subject: [dpdk-dev] [PATCH 2/2] examples/performance-thread: fix undef behavior
Date: Fri, 16 Oct 2020 01:03:49 -0500	[thread overview]
Message-ID: <20201016060349.19940-2-honnappa.nagarahalli@arm.com> (raw)
In-Reply-To: <20201016060349.19940-1-honnappa.nagarahalli@arm.com>

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

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: ian.betts@intel.com
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.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;

  reply	other threads:[~2020-10-16  6:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201016060420eucas1p12f301a94eb4b4d19a9ced5c5cbd59c77@eucas1p1.samsung.com>
2020-10-16  6:03 ` [dpdk-dev] [PATCH 1/2] test/rcu: fix array subscript is above array bounds Honnappa Nagarahalli
2020-10-16  6:03   ` Honnappa Nagarahalli [this message]
2020-10-20 22:46     ` [dpdk-dev] [PATCH 2/2] examples/performance-thread: fix undef behavior Lukasz Wojciechowski
2020-10-30 14:26     ` David Marchand
2020-10-20  0:06   ` [dpdk-dev] [PATCH 1/2] test/rcu: fix array subscript is above array bounds Lukasz Wojciechowski
2020-10-20 16:26     ` Honnappa Nagarahalli
2020-10-20 20:59       ` Lukasz Wojciechowski
2020-10-30 14:44   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201016060349.19940-2-honnappa.nagarahalli@arm.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ian.betts@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=juraj.linkes@pantheon.tech \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).