DPDK patches and discussions
 help / color / mirror / Atom feed
From: Joyce Kong <Joyce.Kong@arm.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "jerinj@marvell.com" <jerinj@marvell.com>,
	Ruifeng Wang <Ruifeng.Wang@arm.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	dev <dev@dpdk.org>, nd <nd@arm.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] eal/arm: fix gcc build for 128-bit atomic compare exchange
Date: Thu, 21 Jan 2021 09:36:15 +0000
Message-ID: <HE1PR0801MB16418A28CC490BBB84F1309D92A10@HE1PR0801MB1641.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8yxf=XHrb+cohS5p9nLwpcKUV3+AS2t9opoezeYx6oDYQ@mail.gmail.com>

>-----Original Message-----
>From: David Marchand <david.marchand@redhat.com>
>Sent: Friday, January 15, 2021 11:56 PM
>To: Joyce Kong <Joyce.Kong@arm.com>
>Cc: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Honnappa
>Nagarahalli <Honnappa.Nagarahalli@arm.com>; dev <dev@dpdk.org>; nd
><nd@arm.com>; dpdk stable <stable@dpdk.org>
>Subject: Re: [PATCH v1] eal/arm: fix gcc build for 128-bit atomic compare
>On Fri, Jan 15, 2021 at 10:58 AM Joyce Kong <joyce.kong@arm.com> wrote:
>> Compiling with "meson build -Dbuildtype=debug --cross-file
>> config/arm/arm64_thunderx2_linux_gcc" shows the warnings "function
>> returns an aggregate [-Waggregate-return]":
>> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function
>> ‘__cas_128_relaxed’:
>> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20:
>> error: function returns an aggregate [-Werror=aggregate-return]
>> __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
>>                     ^~~~~~~~~~~~~~~~~
>> Fix the compiling issue by defining __ATOMIC128_CAS_OP as a void
>> function and passing the address pointer into it.
>> Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange")
>> Cc: stable@dpdk.org
>> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
>From my tests, the trigger is when switching to debug.
>The thunderx2 target builds fine for me with debugoptimized.
>I can reproduce the issue too with octeontx2.
>What is the common point?
>David Marchand

The issue was reported on octeontx2 and discussed in the patch https://patchwork.dpdk.org/patch/84613/, I reproduced the issue on thunderx2.
And this may be because '__cas_128_xxx' returns aggregated data type I think. Returning two separate uint64_t by taking as the pointer may be a solution.

  reply	other threads:[~2021-01-21  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  9:58 Joyce Kong
2021-01-15 15:55 ` David Marchand
2021-01-21  9:36   ` Joyce Kong [this message]
2021-01-27  3:36 ` Ruifeng Wang
2021-01-27  9:56   ` Jerin Jacob
2021-01-27 10:22 ` 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=HE1PR0801MB16418A28CC490BBB84F1309D92A10@HE1PR0801MB1641.eurprd08.prod.outlook.com \
    --to=joyce.kong@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=stable@dpdk.org \


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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

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