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 0D84CA0561 for ; Mon, 8 Mar 2021 13:08:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 000F622A377; Mon, 8 Mar 2021 13:08:19 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 0B4F44068A; Mon, 8 Mar 2021 13:08:17 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo3643712wmq.4; Mon, 08 Mar 2021 04:08:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=MQ6iUkwjRqu9XiOz4SoHARaOyaM+5yLEyJzvqzcdHf8=; b=b8bjBvIlunnS3QdxPpALBd/6ktD4jE7xpHqWr+Re8aP42JbLbmunmyglwVjIQkc+KQ Pn27ZDXPLiWIRSRxQ6SLZyrK/+CLrxKTXvm1qn5AyvvSE/4PqZ+eD2hfN2CWgGIPHXTz a1km9oFrzIDRIVbG5w8HWuJLjDowIHCEJmVf9aq+TbnXoLEHdE5RgA9r0uINzQ9oCCP2 IPzqpGGSTBGrxQts+gYbUmT7awxp/f7gNecBAXCBvARnIM2s2cN5oE2WtboeIx+q8rOF KbcO/2/yXZz5J07nZZkFzuDo3SAIX+DBwzLW0HKxluyI6n94pvB5jOWqJkujITSVoCRq txsQ== X-Gm-Message-State: AOAM532r3D4fYBtp7H/tQfSZqYDdTNnLnP945jnwuMPxEPn2EBkPECou JaIXBjR0sGGHRji0aREqDdc= X-Google-Smtp-Source: ABdhPJwo2vp+X56HNr0mCQ9lt4XObs7V6SUS8LU6feHgAx61qtN3FqPpwxXo5/kYuqmgf6EgWrTKBw== X-Received: by 2002:a1c:f614:: with SMTP id w20mr2580113wmc.70.1615205296663; Mon, 08 Mar 2021 04:08:16 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id f7sm16470572wmq.11.2021.03.08.04.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 04:08:15 -0800 (PST) Message-ID: <89901ac3ccda8c0212828e619f330fa357922809.camel@debian.org> From: Luca Boccassi To: Ruifeng Wang , "jerinj@marvell.com" , Juraj =?UTF-8?Q?Linke=C5=A1?= , "stable@dpdk.org" , "dev@dpdk.org" , "thomas@monjalon.net" , Ashwin Sekhar Thalakalath Kottilveetil , Andrew Pinski Cc: "david.marchand@redhat.com" , nd Date: Mon, 08 Mar 2021 12:08:14 +0000 In-Reply-To: References: <20210219105740.1567636-1-luca.boccassi@gmail.com> <953ce5333ed145a58f26e9eaea240c50@pantheon.tech> <1565f89657b62b8c8baa2a2c9524a0592f99fa3b.camel@debian.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.2 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 20.11] config/arm: replace native machine args X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, 2021-03-08 at 03:23 +0000, Ruifeng Wang wrote: > > -----Original Message----- > > From: Jerin Jacob Kollanukkaran > > Sent: Sunday, March 7, 2021 9:35 PM > > To: Ruifeng Wang ; Juraj Linke=C5=A1 > > ; Luca Boccassi ; > > stable@dpdk.org; dev@dpdk.org; thomas@monjalon.net; Ashwin Sekhar > > Thalakalath Kottilveetil ; Andrew Pinski > > > > Cc: david.marchand@redhat.com; nd ; nd > > Subject: RE: [PATCH 20.11] config/arm: replace native machine args > >=20 > >=20 > >=20 > > > -----Original Message----- > > > From: Ruifeng Wang > > > Sent: Monday, March 1, 2021 11:10 AM > > > To: Jerin Jacob Kollanukkaran ; Juraj Linke=C5=A1 > > > ; Luca Boccassi ; > > > stable@dpdk.org > > > Cc: david.marchand@redhat.com; nd ; nd > > > Subject: [EXT] RE: [PATCH 20.11] config/arm: replace native machine > > > args > > >=20 > > > External Email > > >=20 > > > ---------------------------------------------------------------------= - > > > > -----Original Message----- > > > > From: Jerin Jacob Kollanukkaran > > > > Sent: Thursday, February 25, 2021 8:15 PM > > > > To: Ruifeng Wang ; Juraj Linke=C5=A1 > > > > ; Luca Boccassi ; > > > > stable@dpdk.org > > > > Cc: david.marchand@redhat.com; nd > > > > Subject: RE: [PATCH 20.11] config/arm: replace native machine args > > > >=20 > > > > > -----Original Message----- > > > > > From: Ruifeng Wang > > > > > Sent: Saturday, February 20, 2021 9:13 AM > > > > > To: Juraj Linke=C5=A1 ; Luca Boccassi > > > > > ; stable@dpdk.org; Jerin Jacob Kollanukkaran > > > > > > > > > > Cc: david.marchand@redhat.com; nd > > > > > Subject: [EXT] RE: [PATCH 20.11] config/arm: replace native > > > > > machine args > > > > >=20 > > > > > External Email > > > > >=20 > > > > > -----------------------------------------------------------------= - > > > > > -- > > > > > -- > > > > > > -----Original Message----- > > > > > > From: Juraj Linke=C5=A1 > > > > > > Sent: Friday, February 19, 2021 8:10 PM > > > > > > To: Luca Boccassi ; stable@dpdk.org > > > > > > Cc: jerinj@marvell.com; Ruifeng Wang ; > > > > > > david.marchand@redhat.com > > > > > > Subject: RE: [PATCH 20.11] config/arm: replace native machine > > > > > > args > > > > > >=20 > > > > > >=20 > > > > > >=20 > > > > > > > -----Original Message----- > > > > > > > From: Luca Boccassi > > > > > > > Sent: Friday, February 19, 2021 12:33 PM > > > > > > > To: Juraj Linke=C5=A1 ; stable@dp= dk.org > > > > > > > Cc: jerinj@marvell.com; ruifeng.wang@arm.com; > > > > > > > david.marchand@redhat.com > > > > > > > Subject: Re: [PATCH 20.11] config/arm: replace native machine > > > > > > > args > > > > > > >=20 > > > > > > > On Fri, 2021-02-19 at 11:06 +0000, Juraj Linke=C5=A1 wrote: > > > > > > > > > -----Original Message----- > > > > > > > > > From: luca.boccassi@gmail.com > > > > > > > > > Sent: Friday, February 19, 2021 11:58 AM > > > > > > > > > To: stable@dpdk.org > > > > > > > > > Cc: Juraj Linke=C5=A1 ; > > > > > > > > > jerinj@marvell.com; ruifeng.wang@arm.com; > > > > > > > > > david.marchand@redhat.com > > > > > > > > > Subject: [PATCH 20.11] config/arm: replace native machine > > > > > > > > > args > > > > > > > > >=20 > > > > > > > > > From: Juraj Linke=C5=A1 > > > > > > > > >=20 > > > > > > > > > [ backported from upstream commit > > > > > > > > > 9186e5a07f35ae74a1f7fa2d89671b5f77eae407 ] > > > > > > > > >=20 > > > > > > > > > There are compiler issues when building with -mcpu=3Dnati= ve > > > > > > > > > with popular compilers, such as GCC-8.4: > > > > > > > > > In file included from ../lib/librte_eal/arm/include/rte_v= ect.h:11, > > > > > > > > > from ../lib/librte_net/net_crc_neon.c:10= : > > > > > > > > > ../lib/librte_net/net_crc_neon.c: In function > > =E2=80=98crcr32_folding_round=E2=80=99: > > > > > > > > > /usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094= :1: > > > > error: > > > > > > > > > inlining failed in call to always_inline =E2=80=98vmull_p= 64=E2=80=99: > > > > > > > > > target specific option mismatch > > > > > > > > > vmull_p64 (poly64_t a, poly64_t b) > > > > > > > > > ../lib/librte_net/net_crc_neon.c:50:20: note: called from= here > > > > > > > > > uint64x2_t tmp1 =3D vreinterpretq_u64_p128(vmull_p64( > > > > > > > > > vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0), > > > > > > > > > vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1))); > > > > > > > > >=20 > > > > > > > > > and clang: > > > > > > > > > gcc -E -dM -mcpu=3D"native" - < /dev/null | grep > > > > > > > > > __ARM_FEATURE_ATOMICS > > > > > > > > > clang-9 -E -dM -mcpu=3D"native" - < /dev/null | grep > > > > > > > > > __ARM_FEATURE_ATOMICS # no clang support > > > > > > > > >=20 > > > > > > > > > Fix this by always specifying the proper machine args and > > > > > > > > > never using the native flags. > > > > > > > > >=20 > > > > > > > > > Fixes: 78ac8eac7e8a ("config/arm: use native machine buil= d > > > > > > > > > arguments") > > > > > > > > >=20 > > > > > > > > > Signed-off-by: Juraj Linke=C5=A1 > > > > > > > > > Signed-off-by: Luca Boccassi > > > > > > > > > --- > > > > > > > > > This is a crude backport, but it fixes the build for arm6= 4. > > > > > > > > > It's a release blocker for 20.11.1, so I would appreciate > > > > > > > > > a quick > > > > review. > > > > > > > > > Thanks! > > > > > > > >=20 > > > > > > > > What does this fix? With or without the below change, the > > > > > > > > native machine > > > > > > > args are not used. The patch shoudn't actually change the > > > > > > > configuration of the build at all, so I'm a bit confused. > > > > > > >=20 > > > > > > > It fixes the build on some build workers with thunderx > > > > > > > hardware > > > > > > > - without this I get failures like: > > > > > > >=20 > > > > > > > arm_neon.h:26647:1: error: inlining failed in call to 'always= _inline' > > > > > > > 'vmull_p64': target specific option mismatch > > > > > > >=20 > > > > > >=20 > > > > > > I tried the patch and I'm seeing the same errors on a ThunderX > > > > > > server (with and without the patch). Is this actually the right= patch? > > > > > >=20 > > > > > > One of the four failures looks like this: > > > > > > In file included from ../lib/librte_eal/arm/include/rte_vect.h:= 11, > > > > > > from ../lib/librte_net/net_crc_neon.c:10: > > > > > > ../lib/librte_net/net_crc_neon.c: In function 'crcr32_folding_r= ound': > > > > > > /usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: er= ror: > > > > > > inlining failed in call to always_inline 'vmull_p64': target > > > > > > specific option mismatch > > > > > > vmull_p64 (poly64_t a, poly64_t b) ^~~~~~~~~ > > > > > > ../lib/librte_net/net_crc_neon.c:50:20: note: called from here > > > > > > uint64x2_t tmp1 =3D vreinterpretq_u64_p128(vmull_p64( > > > > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0), > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1))); > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > >=20 > > > > > > Ruifeng, any ideas on how to fix this? > > > > >=20 > > > > > Gcc build on ThunderX platform is broken. Issue can be seen in > > > > > some > > > > > CentOS-8 OBS builds. > > > > > https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > > > > > 3A__mails.dpdk.org_archives_dev_2020- > > > > >=20 > > 2DNovember_192909.html&d=3DDwIGaQ&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3D1 > > > > DG > > ob4H4rxz6H8uITozGOCa0s5f4wCNtTa4UUKvcsvI&m=3DmgzJ6z43dsDFwI6rdgKC > > > > Uj > > > > > 0GCMNjEKQAa7dfRZxvrdU&s=3DUWUJTFdGC2mD2x-rcuRnH1I7- > > > > > 1jKFC40Bh5hFanzu0A&e=3D > > > > > I tried tuning compiler flags used, but could not resolve the iss= ue. > > > > >=20 > > > > > Need help from Marvell to look at this. > > > > > Hi Jerin, do you have any thoughts on this? > > > >=20 > > > > Ruifeng, If you are able to reproduce this issue, Could you add "- > > > > march=3Darmv8.1-a+crc+crypto" In ThunderX config and check is this > > > > Fixing the issue? > > > >=20 > > > > [main] [dpdk.org] $ git diff > > > > diff --git a/config/arm/meson.build b/config/arm/meson.build index > > > > 00bc4610a..ef65b4bb6 100644 > > > > --- a/config/arm/meson.build > > > > +++ b/config/arm/meson.build > > > > @@ -96,15 +96,18 @@ implementer_cavium =3D { > > > > ], > > > > 'part_number_config': { > > > > '0xa1': { > > > > - 'machine_args': ['-mcpu=3Dthunderxt88'], > > > > + 'machine_args': ['-march=3Darmv8.1-a+crc+cr= ypto+lse', > > > > + '-mcpu=3Dthunderxt88'], > > > > 'flags': flags_part_number_thunderx > > > > }, > > > > '0xa2': { > > > > - 'machine_args': ['-mcpu=3Dthunderxt81'], > > > > + 'machine_args': ['-march=3Darmv8.1-a+crc+cr= ypto+lse', > > > > + '-mcpu=3Dthunderxt81'], > > > > 'flags': flags_part_number_thunderx > > > > }, > > > > '0xa3': { > > > > - 'machine_args': ['-mcpu=3Dthunderxt83'], > > > > + 'machine_args': ['-march=3Darmv8.1-a+crc+cr= ypto+lse', > > > > + '-mcpu=3Dthunderxt83'], > > > > 'flags': flags_part_number_thunderx > > > > }, > > > > '0xaf': { > > > >=20 > > >=20 > > > Hi Jerin, > > >=20 > > > The patch doesn't work. Build failed at link stage. > > > I used gcc 8.4 and tried build on thunderxt88. > >=20 > >=20 > > Hi Ruifeng, > >=20 > > I talked to compiler experts here in Marvell. It looks like compiler is= sue, As a > > workaround couple of these could try: > > 1) Reduce the external libraries linked to the application like mlx5 et= c >=20 > I tried building with lots of drivers disabled. Not yet able to get a suc= cessful build. >=20 > > 2) Add -mcmodel=3Dlarge flag will fix "relocation truncated to fit" iss= ue as > > testing purpose as we are not sure about the implication of this flag. >=20 > Looks like this flag is not supported by gcc 8.4 that I am using. >=20 > One thing we can do to overcome the build failure is to switch to default= / release build in OBS CI. > OBS CI is running native build, so it could hit this issue when CI job is= scheduled to thunderxt88 infrastructure. > I think we should change to do release build (-Dmachine=3Ddefault) which = is more suitable for generic CI verification. > As I checked, release build can pass on my thunderxt88 platform. >=20 > What do you think? Hi, I've done as suggested, and it seems to fare better, thank you. There is still a build error on CentOS 7, not sure if it is related though: [ 555s] ../drivers/event/octeontx2/otx2_tim_worker.c: In function 'otx2_ti= m_arm_tmo_tick_burst_mod': [ 555s] ../drivers/event/octeontx2/otx2_tim_worker.c:154:18: error: could = not split insn [ 555s] struct rte_event_timer **tim, \ [ 555s] ^ [ 555s] ../drivers/event/octeontx2/otx2_tim_evdev.h:208:1: note: in expans= ion of macro 'FP' [ 555s] FP(mod, 0, 0, 0, OTX2_TIM_BKT_MOD | OTX2_TIM_ENA_DFB) \ [ 555s] ^ [ 555s] ../drivers/event/octeontx2/otx2_tim_worker.c:161:1: note: in expan= sion of macro 'TIM_ARM_TMO_FASTPATH_MODES' [ 555s] TIM_ARM_TMO_FASTPATH_MODES [ 555s] ^ [ 555s] (insn 252 250 255 (parallel [ [ 555s] (set (reg:DI 1 x1 [orig:230 D.17092 ] [230]) [ 555s] (mem/v:DI (reg/f:DI 10 x10 [orig:229 D.17094 ] [22= 9]) [-1 S8 A64])) [ 555s] (set (mem/v:DI (reg/f:DI 10 x10 [orig:229 D.17094 ] [2= 29]) [-1 S8 A64]) [ 555s] (unspec_volatile:DI [ [ 555s] (plus:DI (mem/v:DI (reg/f:DI 10 x10 [orig:= 229 D.17094 ] [229]) [-1 S8 A64]) [ 555s] (const_int 1099511627776 [0x1000000000= 0])) [ 555s] (const_int 2 [0x2]) [ 555s] ] UNSPECV_ATOMIC_OP)) [ 555s] (clobber (reg:CC 66 cc)) [ 555s] (clobber (reg:DI 4 x4)) [ 555s] (clobber (reg:SI 3 x3)) [ 555s] ]) ../drivers/event/octeontx2/otx2_tim_worker.h:81 1832 {a= tomic_fetch_adddi} [ 555s] (expr_list:REG_UNUSED (reg:CC 66 cc) [ 555s] (expr_list:REG_UNUSED (reg:DI 4 x4) [ 555s] (expr_list:REG_UNUSED (reg:SI 3 x3) [ 555s] (nil))))) [ 555s] ../drivers/event/octeontx2/otx2_tim_worker.c:154:18: internal comp= iler error: in final_scan_insn, at final.c:2897 [ 555s] struct rte_event_timer **tim, \ [ 555s] ^ [ 555s] ../drivers/event/octeontx2/otx2_tim_evdev.h:208:1: note: in expans= ion of macro 'FP' [ 555s] FP(mod, 0, 0, 0, OTX2_TIM_BKT_MOD | OTX2_TIM_ENA_DFB) \ [ 555s] ^ [ 555s] ../drivers/event/octeontx2/otx2_tim_worker.c:161:1: note: in expan= sion of macro 'TIM_ARM_TMO_FASTPATH_MODES' [ 555s] TIM_ARM_TMO_FASTPATH_MODES [ 555s] ^ [ 555s] Please submit a full bug report, [ 555s] with preprocessed source if appropriate. [ 555s] See for instructions. [ 555s] {standard input}: Assembler messages: [ 555s] {standard input}: Error: open CFI at the end of file; missing .cfi= _endproc directive [ 555s] Preprocessed source stored into /tmp/ccpVQUdT.out file, please att= ach this to your bugreport. --=20 Kind regards, Luca Boccassi