From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 43C02423BA;
	Thu, 12 Jan 2023 22:41:53 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E0AE742D36;
	Thu, 12 Jan 2023 22:41:52 +0100 (CET)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com
 [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 9F8A142D27
 for <dev@dpdk.org>; Thu, 12 Jan 2023 22:41:51 +0100 (CET)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id A7C2732001FC;
 Thu, 12 Jan 2023 16:41:48 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Thu, 12 Jan 2023 16:41:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm3; t=1673559708; x=
 1673646108; bh=v34rkEhSMjE7XzLhgxFGqND/NmnZRSzRmDXnwKnLYTY=; b=L
 g5ZXYbzSjD5zvLOh+vDRI3No3xU8cQ8XLkioZ4mkobttBJ1sIeyfAr/Vt0Dfg1Sp
 gKEs/fpoeNBTZQG8/PtLBO95pvtlJblc+tXx+Mzm/t6yhhweWSCqdVUK/ozTtNl/
 x1XrjOzLWj83I/8KyFCT7KCu4nMPgsKDSvC7UYFlnEJJ66dQ/FGsMLrw+t1FoD4p
 8nv2+I2da5vWS8NqLIAOnNPwa3Je90wlcNsZKsu4ckU2tquZGaNYRuG7C2sJMNLT
 0aiG/5+gMGg4vJM5m/NAkeswRq+5ZMGwk5K2Pk9+cWPp89iUE0pPixLKM6v53Nnc
 Lo+A85S2Wr++D/rGvWwwQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1673559708; x=
 1673646108; bh=v34rkEhSMjE7XzLhgxFGqND/NmnZRSzRmDXnwKnLYTY=; b=R
 CDBw6aF0YW2b+B+Eyvhc6o9NtbwG5UquML7yp1uUW1FWWB38TOvRiAIC3ZVPdfhd
 peL3f1D9VdYe446JhwgZucaH0PXj9rzsuzVMgwmPTORihm3/+38POIi3wdN7CPBn
 XdNDOCEoV7/PNETyvWCB3Tkm6/x0fnxuwfzW+O1hiWgQl0nImsOEWsnfgcoJ2GOg
 jxnUrs1tjcGYuMRHKKsS1ASe6JKgsDv0AXb33JEnEJRTd/o8MzMhfWsbdXIVBSst
 t00Fxr9+YT0unE/vajBrN9+eWGTIBM4Y7rHSmn2YnQy6yAJO2oC1X0T+J21ph3hp
 PpBLutGDpDUplCHYszo8w==
X-ME-Sender: <xms:m37AY29qIMlhdC66YpTmlS3jHV1jPaZDSbuJb9pG8kd2HwZmPBy-WQ>
 <xme:m37AY2snt2oo32gdoTLW6wqLQQs13va8OPnonq9UfDxpE2DNbSG5KUuw9-33SVKeV
 GDXHDYV5BURm_nneg>
X-ME-Received: <xmr:m37AY8BCahU8klDafcJ9Zbb-HN1BmeFFfW8W4-8kexvEHTmfBDEKcmkbMus6ACQk70dpEww8N_lMIqN-ej_v8SUBvg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeigdduheefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei
 uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:m37AY-dXGuSUB0z3FndoRo6m4xE7qyqf8-Db9RgtmS92UrmAytpbNQ>
 <xmx:m37AY7O7aGEcEzlrli9u7y3XUUa9eJfXWzCF0_eNwOugnlEd8s6tGw>
 <xmx:m37AY4lZJVYRmD1v34F1OiD8IHIgjZ_MqrOo-qrmdIfcEZxLGsXWNw>
 <xmx:nH7AY3BJydcQEfFN8dnFtg91tvoHGNJkWL8tnDk0G9jfvcw5m0imvw>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 12 Jan 2023 16:41:46 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
 Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
 Amit Prakash Shukla <amitprakashs@marvell.com>
Cc: dev@dpdk.org, Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
 david.marchand@redhat.com, bruce.richardson@intel.com, ferruh.yigit@amd.com
Subject: Re: [EXT] Re: [PATCH] ring: compilation fix with GCC-12
Date: Thu, 12 Jan 2023 22:41:45 +0100
Message-ID: <837071028.0ifERbkFSE@thomas>
In-Reply-To: <PH0PR18MB5167F3DCD49D1EFEBB8A6EA1C8709@PH0PR18MB5167.namprd18.prod.outlook.com>
References: <20220805090348.1947658-1-amitprakashs@marvell.com>
 <2dee8dd1-dde5-6ef1-14d7-083c1bd9ab54@yandex.ru>
 <PH0PR18MB5167F3DCD49D1EFEBB8A6EA1C8709@PH0PR18MB5167.namprd18.prod.outlook.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

23/08/2022 11:38, Amit Prakash Shukla:
> From: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
> > 06/08/2022 19:35, Honnappa Nagarahalli =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> > >> Replacing memcpy with rte_memcpy fixes the GCC-12 compilation issue.
> > >=20
> > > Any reason why this replacement fixes the problem?
> > > Do you have any performance numbers with this change?
> > >
> > >> Also it would be better to change to rte_memcpy as the function is
> > >> called in fastpath.
> > >=20
> > > On Arm platforms, memcpy in the later versions has the best performan=
ce.
> >=20
> > I agree with Honnappa, it is better to keep memcpy() here.
> > Actually what is strange - why it ends up in
> > __rte_ring_dequeue_elems_128() at all?
> > Inside rxa_intr_ring_dequeue() we clearly doing: rte_ring_dequeue(), wh=
ich
> > should boil down to ___rte_ring_dequeue_elems_64().
> > it should go to __rte_ring_dequeue_elems_128() at all.
>=20
> I agree. After having close look and doing few experiments,
> ideally it should not be going to __rte_ring_dequeue_elems_128().
> Sizeof(in call of rte_ring_enqueue_elem) gets evaluated at compile time
> which in this case it is evaluated to 8 bytes so=20
> __rte_ring_dequeue_elems_128() shall not be in the path. Looks like more =
of a gcc-12 bug.?
>=20
> > Another q - is this warning happens only on arm platforms?
>=20
> Warning is observed on x86 with build type as debug.
> "meson --werror --buildtype=3Ddebug build"

I confirm the compilation issue on x86 with GCC 12 in a debug build.

We need to find a workaround.
Is it reported to GCC already?