From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6D97C423C3; Fri, 13 Jan 2023 14:11:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F20242D53; Fri, 13 Jan 2023 14:11:19 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 4AC1E40E03 for ; Fri, 13 Jan 2023 14:11:18 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A233C5C007F; Fri, 13 Jan 2023 08:11:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 13 Jan 2023 08:11:17 -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=1673615477; x= 1673701877; bh=PWbuU+iECCZCfoFLdV5+OvSYBr3brPLnQcostqPOpxI=; b=o DGgThH2IZ+2SFKn/5b/6X/umh/cz6zuYRjyqxNunOl40YDeOVatT6nBKoGeoTD54 pMTragQ5MGNw4Kshwa0eduHieBAD1nc/2WQasdZzzuDyd3qmUQLWPaSl1O5JOUbk 4uuoDXJOvTuIECdLsDnoEp/Q5vBK7MRHq6cQgP1q4z1B0zZYOzzAY9GDlBv9G2LN AIezAkjO5R4xrW9j8oNpsYF2yt0M6K3Fm2ykcBwXpG07eC0IahjvMB+6CKwcuw5+ kxYGqwsmqp5DJj6VDOS7iSFD0M/+wYyzCuA8qHcGDyaV8jk9bcRobVOilQHN+E9M 9G2uDojvsjML7Q/NZ5pXw== 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=1673615477; x= 1673701877; bh=PWbuU+iECCZCfoFLdV5+OvSYBr3brPLnQcostqPOpxI=; b=j kXfR/r2/OfZSNaKmo0/I8fZA3hCJ9CCYGP/W6Gg6Yz0In5SMIpjbDrx8Q4oC89dG M75cQasFBwHAlqTdsmd3n9ydWA123XUig1JZPmYGs9ymOqPrEEfAsc7SFxgt2/kA uxS0LtpMhVUcx2ZO3mYABKwB48mQfHZWjXv2UOqLkPqKVJM/hAdXWt31w7700G87 GW9vFFH4GW3xpUaRaAhHJQqAPdRhJ8ywHVePz7YE9Ff9SGsx2j0Q0xzIJ/tfxUOw W/FobFSD6sYzOZ0bHwNf0xvUeSI58Ab2c4FlwUKSr2FAGw91EegwBKJPTi/gtpCB Xg5Ujt/NZnzeWOfEN3Hqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleekgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhephfefvdfhgeefkeeffeekvdffvdejkeeifeelgffhffelhfeigedt feehteetjeefnecuffhomhgrihhnpehgnhhurdhorhhgpdguphgukhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshes mhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 13 Jan 2023 08:11:15 -0500 (EST) From: Thomas Monjalon To: Konstantin Ananyev , Honnappa Nagarahalli , Amit Prakash Shukla Cc: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "david.marchand@redhat.com" , "bruce.richardson@intel.com" , "ferruh.yigit@amd.com" Subject: Re: [EXT] Re: [PATCH] ring: compilation fix with GCC-12 Date: Fri, 13 Jan 2023 14:11:13 +0100 Message-ID: <2906200.X9hSmTKtgW@thomas> In-Reply-To: References: <20220805090348.1947658-1-amitprakashs@marvell.com> <837071028.0ifERbkFSE@thomas> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 13/01/2023 13:39, Amit Prakash Shukla: > From: Thomas Monjalon > > 23/08/2022 11:38, Amit Prakash Shukla: > > > From: Konstantin Ananyev > > > > 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. > > > > > > > > > > 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. > > > > > > > > > > On Arm platforms, memcpy in the later versions has the best > > performance. > > > > > > > > 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(), > > > > which should boil down to ___rte_ring_dequeue_elems_64(). > > > > it should go to __rte_ring_dequeue_elems_128() at all. > > > > > > 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 > > > __rte_ring_dequeue_elems_128() shall not be in the path. Looks like m= ore > > of a gcc-12 bug.? > > > > > > > Another q - is this warning happens only on arm platforms? > > > > > > Warning is observed on x86 with build type as debug. > > > "meson --werror --buildtype=3Ddebug build" > >=20 > > I confirm the compilation issue on x86 with GCC 12 in a debug build. > >=20 > > We need to find a workaround. > > Is it reported to GCC already? > >=20 > I found an old gcc bug reporting similar issue. This bug seems to be re-o= pened recently in Dec-2022. Not sure if it is reopened specifically for gcc= =2D12. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89689 Please would you like to open a bug specific to GCC 12? > Kevin has push a work around for DPDK-21.11.3. > https://git.dpdk.org/dpdk-stable/commit/?h=3D21.11&id=3De1d728588dc73af9e= d60cc0074d51a7f24b2ba60 In the meantime we could use Kevin's workaround: #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >=3D 120000) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #pragma GCC diagnostic ignored "-Wstringop-overread" #endif Opinions?