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 D5CB6A0547; Wed, 19 May 2021 14:35:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3A8A40041; Wed, 19 May 2021 14:35:01 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id CBCD44003F for ; Wed, 19 May 2021 14:35:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621427700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AjeS71PourcSG5Dh1EanIhQxIH3kFv6wEJq/BcCtl+I=; b=GGt0SRBt0IDJaUor81z8y56dXe6hZ/6eGsh9VapT9dou7cnwhKWbLPo00FNVJoAoJA7TIt ktF4UJQtNIjbyg+XdZYSOZt9bXB1a/9UJmMQmbHMqh45TNhRh5040MVdtwxADJHd40G6Ac D7Nx8EG5SK4ulyK+Ipvl54a+38BEwEk= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-582-bjHWm3sPPiKh2kZCClinNw-1; Wed, 19 May 2021 08:34:57 -0400 X-MC-Unique: bjHWm3sPPiKh2kZCClinNw-1 Received: by mail-vk1-f200.google.com with SMTP id j188-20020a1febc50000b02901fadc53568dso1591440vkh.9 for ; Wed, 19 May 2021 05:34:57 -0700 (PDT) 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=AjeS71PourcSG5Dh1EanIhQxIH3kFv6wEJq/BcCtl+I=; b=t8a14gbdab253+U6PKK6DqDk9ky6lqQxgNVrhnnyZoq2a0SqVxn7K+5F79KZQr30+6 UoKElPykjvobmNX9GHeHddziKsU7tqAahn02Gy3vPMSdjZ+snNIW/iTgwHSUmR+l2bmL 7EUS4z+4QgV8S+Ex+N8Nymg9/SRDn+LPjwEVAKW5/yDoPuRw/3/okxnApEEwGkt5W+G7 UUTeP45mPSigCoMoB44f8HFderoVZ63NL0GRreVnqmRtmQ6LD5peGLVlh5S8ohM4n/5x dJc4LB58DgSv8hfnamIzH05RqaLH+3EN1gATCC3ay7/L/xOo0hOHgo0dDKKY9jX+G2hW grpg== X-Gm-Message-State: AOAM5332mgR1JCWtKh4qnzyazMvVyJA3qYX3UfH0YgNRWOgTlU81aGVa PsiKvO4hr7KzHuOQgMDoegQHtQnbLRgWnilio2+eOdFX9cSIzzjzlnaH4t/lHDuaOLdVXftKmyk +6o9jTaxiydMuQ7dmS7A= X-Received: by 2002:a67:c810:: with SMTP id u16mr5149596vsk.10.1621427697118; Wed, 19 May 2021 05:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL+7gz67tBoj3PuZotsl/V2gspmxCnGaVvfL5uDQ8zLAfLnftnecYZXLdIluHMfiO+JSV62eX1ATG3B/HOgYo= X-Received: by 2002:a67:c810:: with SMTP id u16mr5149555vsk.10.1621427696839; Wed, 19 May 2021 05:34:56 -0700 (PDT) MIME-Version: 1.0 References: <1621424821-53240-1-git-send-email-fengchengwen@huawei.com> <1621425281-2413-1-git-send-email-fengchengwen@huawei.com> In-Reply-To: <1621425281-2413-1-git-send-email-fengchengwen@huawei.com> From: David Marchand Date: Wed, 19 May 2021 14:34:45 +0200 Message-ID: To: Chengwen Feng , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" Cc: Thomas Monjalon , "Yigit, Ferruh" , dev , Jerin Jacob Kollanukkaran , Jerin Jacob , Jan Viktorin , Bruce Richardson , =?UTF-8?Q?Juraj_Linke=C5=A1?= , nd Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] net/hns3: fix compile error with gcc8.3 and thunderx2 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 Sender: "dev" On Wed, May 19, 2021 at 1:57 PM Chengwen Feng wro= te: > > Compile error with gcc8.3 and crossfile arm64_thunderx2_linux_gcc: > ../drivers/net/hns3/hns3_rxtx_vec_sve.c > cc1: error: switch =E2=80=98-mcpu=3Darmv8.1-a=E2=80=99 conflicts = with > =E2=80=98-march=3Darmv8.2-a=E2=80=99 switch [-Werror] > ../drivers/net/hns3/hns3_rxtx_vec_sve.c:5:10: fatal error: > arm_sve.h: No such file or directory > 5 | #include > > The root cause is that gcc8.3 supports SVE, but it doesn't support > compile ACLE[1] SVE code, and the hns3_rxtx_vec_sve.c was written > by ACLE SVE code. Quite confusing. What is the difference between the two? > > This patch also filters out '-march=3D' '-mcpu' '-mtune' when compile > with hns3_rxtx_vec_sve.c. > > [1] ACLE: Arm C Language Extensions, user should include > when writing ACLE SVE code. > > Fixes: 203fbaf8813d ("net/hns3: refactor SVE code compile method") > > Signed-off-by: Chengwen Feng > --- > v2: > * fix check tool error > --- > drivers/net/hns3/meson.build | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build > index 8563d70..5f9af9b 100644 > --- a/drivers/net/hns3/meson.build > +++ b/drivers/net/hns3/meson.build > @@ -39,16 +39,22 @@ if arch_subdir =3D=3D 'arm' and dpdk_conf.get('RTE_AR= CH_64') > # compile SVE when: > # a. support SVE in minimum instruction set baseline > # b. it's not minimum instruction set, but compiler support > - if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) !=3D '' > + if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) !=3D '' an= d cc.check_header('arm_sve.h') The rte_vect.h arm header unconditionally includes arm_sve.h if __ARM_FEATURE_SVE is defined [1]. So it is surprising to see such a check being added. 1: https://git.dpdk.org/dpdk/tree/lib/eal/arm/include/rte_vect.h#n12 --=20 David Marchand