patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: dev <dev@dpdk.org>, "Mcnamara, John" <john.mcnamara@intel.com>,
	 "Ruifeng Wang (Arm Technology China)" <ruifeng.wang@arm.com>,
	Juraj Linkeš <juraj.linkes@pantheon.tech>,  nd <nd@arm.com>,
	ian.betts@intel.com, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH 2/2] examples/performance-thread: fix undef behavior
Date: Fri, 30 Oct 2020 15:26:27 +0100
Message-ID: <CAJFAV8xuHNv4sRBwGRj+haXz+xv-+nrm0w6rCy8rMwwqL9hZ7Q@mail.gmail.com> (raw)
In-Reply-To: <20201016060349.19940-2-honnappa.nagarahalli@arm.com>

On Fri, Oct 16, 2020 at 8:04 AM Honnappa Nagarahalli
<honnappa.nagarahalli@arm.com> wrote:
>
> 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]

Lucky to catch this incorrect array size because of a change in
RTE_MAX_LCORE :-).

>
> 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;
> --
> 2.17.1
>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


  parent reply	other threads:[~2020-10-30 14:26 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-stable] [PATCH 1/2] test/rcu: fix array subscript is above array bounds Honnappa Nagarahalli
2020-10-16  6:03   ` [dpdk-stable] [PATCH 2/2] examples/performance-thread: fix undef behavior Honnappa Nagarahalli
2020-10-20 22:46     ` [dpdk-stable] [dpdk-dev] " Lukasz Wojciechowski
2020-10-30 14:26     ` David Marchand [this message]
2020-10-20  0:06   ` [dpdk-stable] [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   ` [dpdk-stable] " 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=CAJFAV8xuHNv4sRBwGRj+haXz+xv-+nrm0w6rCy8rMwwqL9hZ7Q@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --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 \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git