From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ECAB7A0524; Fri, 27 Nov 2020 11:28:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0E70C90E; Fri, 27 Nov 2020 11:28:43 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 273B4C90C for ; Fri, 27 Nov 2020 11:28:41 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id q137so711861iod.9 for ; Fri, 27 Nov 2020 02:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bhXXcKH0yRnA30LoIUPkDp4H+7BP+Tt9LUH42JDWVUY=; b=P7jlrDaHL6fU6WIBQG3iZ8TL7uPGwlKzD/Ud8ORYionq75XOyZF72+RYsWA5H0J+9U UjUx7R+xoWDfTWk+yIqhxPQ0H540ARjrSzu8/5vxADTviHZ6l9tD0emtbulmRF55Jfbh qhTre9erTKJmCprxLZSu9D9bDGe+GPaqP6onRM7pupX7v7Y75ayKFDZ9inuGZImLWQI4 CJJK2UBrXp2K27LLgafgVR7uifU/dyke3JMLpFiqGlEiakWzXnQbGiNnRG8QjYpar41P AKGhGkwvxrHQgq7g+LQlW0xLnggX0RO5A+4kiIsDVQ+6+T1N9eOIhXIktOHCpWcEmjpm 4ZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bhXXcKH0yRnA30LoIUPkDp4H+7BP+Tt9LUH42JDWVUY=; b=qhozJitg34c0jQNq3ZIS/jBol3JR5jPk1/+psrIiNPOBoOrCnaCzYdfKjzmse3Eigu 106BHokdnFl5Bk4XbwBbVIHc0xVQbfi8naWSbrucHx9CEZi96o4tjfekj4u7A3bNp9/F Q7xLOilylFL4MPM2jkoL9pq4KLDUL+ADWL9BCD+PIRYS7QRpql5g8gB/wmJmjphy9MxR XvR5+u1yCfEDQE5Dq2UsVtprJrJ+4wHQS1QoyJzim5M2qQNHbdbl0e5/pE5pRrkFL6Ob RcFkUj66hhlUwTpRAUrNHoqFNsW6jwBz8M59QAStLhs2Fx2L3X8+BukPxz8DeYkz3CGA Fusw== X-Gm-Message-State: AOAM533s2A9V9V/0UzCJdfB/GOHdQdgobB8CjYoPwvJoEtYNNpPW1F0A Auu3UbeikOLcj1xiDUyhmLZW75Q00/nYc8bPQ/w= X-Google-Smtp-Source: ABdhPJyjsTqbW8GrBYz25cFK52/1cCVePSPE7W6vESbqa4OAQNYlvYZXiV1PREvzIT0NFT5SVOHLqWsAoko6n/JKqYc= X-Received: by 2002:a02:ce2c:: with SMTP id v12mr7124659jar.60.1606472919225; Fri, 27 Nov 2020 02:28:39 -0800 (PST) MIME-Version: 1.0 References: <20201127080903.26817-1-ruifeng.wang@arm.com> <20201127080903.26817-2-ruifeng.wang@arm.com> In-Reply-To: From: Jerin Jacob Date: Fri, 27 Nov 2020 15:58:22 +0530 Message-ID: To: Ruifeng Wang Cc: David Marchand , Andrew Rybchenko , "jerinj@marvell.com" , Honnappa Nagarahalli , dev , nd , Feifei Wang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 27, 2020 at 3:35 PM Ruifeng Wang wrote: > > > -----Original Message----- > > From: David Marchand > > Sent: Friday, November 27, 2020 5:45 PM > > To: Jerin Jacob > > Cc: Ruifeng Wang ; Andrew Rybchenko > > ; jerinj@marvell.com; Honnappa > > Nagarahalli ; dev ; nd > > ; Feifei Wang > > Subject: Re: [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimiza= tion > > level 0 > > > > On Fri, Nov 27, 2020 at 10:34 AM Jerin Jacob wr= ote: > > > > > > On Fri, Nov 27, 2020 at 2:56 PM David Marchand > > > wrote: > > > > > > > > On Fri, Nov 27, 2020 at 9:51 AM Jerin Jacob > > wrote: > > > > > > > > > > On Fri, Nov 27, 2020 at 2:09 PM David Marchand > > > > > wrote: > > > > > > > > > > > > On Fri, Nov 27, 2020 at 9:10 AM Ruifeng Wang > > wrote: > > > > > > > > > > > > > > Gcc build with '-O0' on platforms with > > RTE_ARM_FEATURE_ATOMICS > > > > > > > set failed for: > > > > > > > ../lib/librte_efd/rte_efd.c > > > > > > > Assembler messages: > > > > > > > 3866: Error: selected processor does not support `crc32cb w0,= w0,w1' > > > > > > > 3890: Error: selected processor does not support `crc32ch w0,= w0,w1' > > > > > > > 3914: Error: selected processor does not support `crc32cw > > w0,w0,w1' > > > > > > > 3938: Error: selected processor does not support `crc32cx w0,= w0,x1' > > > > > > > > > > > > > > This was caused by an architecture specifier added for Clang. > > > > > > > Unlike Clang, Gcc considers each inline assembly block to be > > > > > > > dependent and therefor, the architecture specifier impacts > > > > > > > assemble of some blocks require certain extension support. > > > > > > > > > > > > I reproduced this error with -O0 for > > config/arm/arm64_octeontx2_linux_gcc. > > > > > > The patch looks simple enough and it only affects ARM builds. > > > > > > > > > > > > Jerin, > > > > > > Are you okay with this change for 20.11? > > > > > > Or should we wait 21.02? > > > > > > > > > > I could reproduce the issue with meson build -Dbuildtype=3Ddebug > > > > > --cross-file config/arm/arm64_octeontx2_linux_gcc > > > > > > > > > > This fix is OK. Request to merge for 20.11 > > > > > > > > > > Acked-by: Jerin Jacob > > > > > > > > Ruifeng, Andrew, > > > > > > > > I get a compilation error with this patch on sfc using gcc and > > > > config/arm/arm64_octeontx2_linux_gcc config + --buildtype=3Ddebug > > > > and/or > > > > -Dc_args=3D-O0 . > > > > > > > > aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture > > > > 8.2-2019.01 (arm-rel-8.28)) 8.2.1 20180802 > > > > > > > > FAILED: > > > > drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o > > > > aarch64-linux-gnu-gcc > > > > -Idrivers/common/sfc_efx/base/932d09a@@sfc_base@sta > > > > -Idrivers/common/sfc_efx/base > > > > -I../../dpdk/drivers/common/sfc_efx/base > > > > -Idrivers/common/sfc_efx -I../../dpdk/drivers/common/sfc_efx -I. > > > > -I../../dpdk/ -Iconfig -I../../dpdk/config -Ilib/librte_eal/include > > > > -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include > > > > -I../../dpdk/lib/librte_eal/linux/include > > > > -Ilib/librte_eal/arm/include -I../../dpdk/lib/librte_eal/arm/includ= e > > > > -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common > > > > -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs > > > > -I../../dpdk/lib/librte_kvargs > > > > -Ilib/librte_telemetry/../librte_metrics > > > > -I../../dpdk/lib/librte_telemetry/../librte_metrics > > > > -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry > > > > -fdiagnostics-color=3Dalways -pipe -D_FILE_OFFSET_BITS=3D64 -Wall > > > > -Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual > > > > -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security > > > > -Wmissing-declarations -Wmissing-prototypes -Wnested-externs > > > > -Wold-style-definition -Wpointer-arith -Wsign-compare > > > > -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned > > > > -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC > > > > -march=3Darmv8.2-a+crc+crypto+lse -DALLOW_EXPERIMENTAL_API > > > > -DALLOW_INTERNAL_API -Wno-format-truncation -Wdisabled- > > optimization > > > > -Waggregate-return -Wbad-function-cast -Wno-sign-compare > > > > -Wno-unused-parameter -Wno-unused-variable -Wno-empty-body > > > > -Wno-unused-but-set-variable -MD -MQ > > > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o' > > > > -MF > > > > > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o.d' > > > > -o > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o' > > > > -c ../../dpdk/drivers/common/sfc_efx/base/efx_crc32.c > > > > In file included from ../../dpdk/lib/librte_eal/arm/include/rte_ato= mic.h:9, > > > > from ../../dpdk/lib/librte_eal/include/generic/rte= _pause.h:19, > > > > from ../../dpdk/lib/librte_eal/arm/include/rte_pau= se_64.h:19, > > > > from ../../dpdk/lib/librte_eal/arm/include/rte_pau= se.h:13, > > > > from > > > > ../../dpdk/lib/librte_eal/include/generic/rte_spinlock.h:25, > > > > from ../../dpdk/lib/librte_eal/arm/include/rte_spi= nlock.h:17, > > > > from ../../dpdk/drivers/common/sfc_efx/efsys.h:15, > > > > from ../../dpdk/drivers/common/sfc_efx/base/efx.h:= 11, > > > > from ../../dpdk/drivers/common/sfc_efx/base/efx_cr= c32.c:7: > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function > > > > =E2=80=98__cas_128_relaxed=E2=80=99: > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20: error: > > > > function returns an aggregate [-Werror=3Daggregate-return] > > > > __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp") > > > > ^~~~~~~~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: i= n > > > > definition of macro =E2=80=98__ATOMIC128_CAS_OP=E2=80=99 > > > > cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t upda= ted) > > \ > > > > ^~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function > > > > =E2=80=98__cas_128_acquire=E2=80=99: > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:82:20: error: > > > > function returns an aggregate [-Werror=3Daggregate-return] > > > > __ATOMIC128_CAS_OP(__cas_128_acquire, "caspa") > > > > ^~~~~~~~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: i= n > > > > definition of macro =E2=80=98__ATOMIC128_CAS_OP=E2=80=99 > > > > cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t upda= ted) > > \ > > > > ^~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function > > > > =E2=80=98__cas_128_release=E2=80=99: > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:83:20: error: > > > > function returns an aggregate [-Werror=3Daggregate-return] > > > > __ATOMIC128_CAS_OP(__cas_128_release, "caspl") > > > > ^~~~~~~~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: i= n > > > > definition of macro =E2=80=98__ATOMIC128_CAS_OP=E2=80=99 > > > > cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t upda= ted) > > \ > > > > ^~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function > > > > =E2=80=98__cas_128_acq_rel=E2=80=99: > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:84:20: error: > > > > function returns an aggregate [-Werror=3Daggregate-return] > > > > __ATOMIC128_CAS_OP(__cas_128_acq_rel, "caspal") > > > > ^~~~~~~~~~~~~~~~~ > > > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: i= n > > > > definition of macro =E2=80=98__ATOMIC128_CAS_OP=E2=80=99 > > > > cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t upda= ted) > > \ > > > > ^~~~~~~~~~~ > > > > cc1: all warnings being treated as errors > > > > > > > > > > > > If I waive those warnings: > > > > - next to fail is net/igc (fixed by next patch so ok) > > > > - and then next to fail is net/sfc. > > > > > > Regarding the net/sfc build, Could try clean build.(I got the warning > > > first, after the clean build, it is OK) > > > > That's what I first thought too, then I noticed that test-meson-builds.= sh had > > switched back my build dir to debugoptimized. > > > > > > From scratch: > > > > The Meson build system > > Version: 0.52.0 > > Source dir: /home/dmarchan/dpdk > > Build dir: /home/dmarchan/builds/build-arm64-octeontx2 > > Build type: cross build > > Program cat found: YES (/usr/bin/cat) > > Project name: DPDK > > Project version: 20.11.0-rc5 > > Appending CFLAGS from environment: '-Werror' > > C compiler for the build machine: ccache gcc (gcc 9.3.1 "gcc (GCC) > > 9.3.1 20200408 (Red Hat 9.3.1-2)") > > C linker for the build machine: GNU ld.bfd 2.32-33 C compiler for the h= ost > > machine: aarch64-linux-gnu-gcc (gcc 8.2.1 "aarch64-linux-gnu-gcc (GNU > > Toolchain for the A-profile Architecture > > 8.2-2019.01 (arm-rel-8.28)) 8.2.1 20180802") C linker for the host mach= ine: > > GNU ld.bfd 8.2-2019 Build machine cpu family: x86_64 Build machine cpu: > > x86_64 Host machine cpu family: aarch64 Host machine cpu: armv8-a Targe= t > > machine cpu family: aarch64 Target machine cpu: armv8-a ... > > Option buildtype is: debug [default: release] Option default_library is= : shared > > [default: static] Found ninja-1.9.0 at /usr/bin/ninja > > ninja: Entering directory `/home/dmarchan/builds/build-arm64-octeontx2' > > [479/2558] Compiling C object > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_bootcfg.c.o'. > > FAILED: > > drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_bootcfg.c.o > > aarch64-linux-gnu-gcc > > -Idrivers/common/sfc_efx/base/932d09a@@sfc_base@sta > > -Idrivers/common/sfc_efx/base -I../../dpdk/drivers/common/sfc_efx/base > > -Idrivers/common/sfc_efx -I../../dpdk/drivers/common/sfc_efx -I. > > -I../../dpdk/ -Iconfig -I../../dpdk/config -Ilib/librte_eal/include - > > I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include - > > I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/arm/include - > > I../../dpdk/lib/librte_eal/arm/include -Ilib/librte_eal/common - > > I../../dpdk/lib/librte_eal/common -Ilib/librte_eal -I../../dpdk/lib/lib= rte_eal - > > Ilib/librte_kvargs -I../../dpdk/lib/librte_kvargs - > > Ilib/librte_telemetry/../librte_metrics > > -I../../dpdk/lib/librte_telemetry/../librte_metrics > > -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry -fdiagnostics- > > color=3Dalways -pipe -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Werr= or -g - > > include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat - > > Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing- > > prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith - > > Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed- > > not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC - > > march=3Darmv8.2-a+crc+crypto+lse -DALLOW_EXPERIMENTAL_API - > > DALLOW_INTERNAL_API -Wno-format-truncation -Wdisabled-optimization - > > Waggregate-return -Wbad-function-cast -Wno-sign-compare -Wno-unused- > > parameter -Wno-unused-variable -Wno-empty-body -Wno-unused-but-set- > > variable -MD -MQ > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_bootcfg.c.o' > > -MF > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_bootcfg.c.o. > > d' > > -o > > 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_bootcfg.c.o' > > -c ../../dpdk/drivers/common/sfc_efx/base/efx_bootcfg.c > > In file included from ../../dpdk/lib/librte_eal/arm/include/rte_atomic.= h:9, > > from ../../dpdk/lib/librte_eal/include/generic/rte_pau= se.h:19, > > from ../../dpdk/lib/librte_eal/arm/include/rte_pause_6= 4.h:19, > > from ../../dpdk/lib/librte_eal/arm/include/rte_pause.h= :13, > > from > > ../../dpdk/lib/librte_eal/include/generic/rte_spinlock.h:25, > > from ../../dpdk/lib/librte_eal/arm/include/rte_spinloc= k.h:17, > > from ../../dpdk/drivers/common/sfc_efx/efsys.h:15, > > from ../../dpdk/drivers/common/sfc_efx/base/efx.h:11, > > from ../../dpdk/drivers/common/sfc_efx/base/efx_bootcf= g.c:7: > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function > > =E2=80=98__cas_128_relaxed=E2=80=99: > > ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20: error: > > function returns an aggregate [-Werror=3Daggregate-return] > > __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp") ... > > I can see similar warning message (function returns an aggregate) when do= ing "-O0" build. > Since "-Werror=3Daggregate-return" is used, error will be reported. > This is because '__cas_128_xxx' return aggregated data type I think. > Inline the functions should resolve the issue. But it could cause registe= r corruption as discussed > when the code was added: > http://patches.dpdk.org/patch/55580/ > > No quick solution I can think of. Yes. We may need to return two separate uint64_t by taking as the pointer. It will be NOT a candidate for 20.11. In my setup: meson --buildtype=3Ddebug build --cross-file config/arm/arm64_octeontx2_lin= ux_gcc ninja -C build Shows the warnings for "warning: function returns an aggregate [-Waggregate-return]", Since warning not treated as the error it links. I think, for this release, The current[1] minor changes are OK as it improves the situation. http://patches.dpdk.org/project/dpdk/list/?submitter=3DRuifeng > > > > > > -- > > David Marchand >