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 2D858A04E0; Wed, 27 Nov 2019 09:10:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4C4A5596; Wed, 27 Nov 2019 09:10:10 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20073.outbound.protection.outlook.com [40.107.2.73]) by dpdk.org (Postfix) with ESMTP id CD4DD235; Wed, 27 Nov 2019 09:10:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WoNSYTuctVm2be1OkPdaxiChQOIbJrxE7GA39nBm7sU=; b=oTxcwouK/EkNJ3s7Gt46hyJyMsi9rB7RbaxDXI77Beaz2k2wMDDKneItNt5WqA+3G9WUkVH+qNP+VQOmHvo/K/HrJiIZZsrPyTvGt/aDnx6chFuyiO7b7lJnHTyBEXhzBa0VnBWnVzKNHd1Q1hh5HeksUFJ9E8d7Ff6T1PEmxAc= Received: from VI1PR08CA0252.eurprd08.prod.outlook.com (2603:10a6:803:dc::25) by AM6PR08MB4913.eurprd08.prod.outlook.com (2603:10a6:20b:ce::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.17; Wed, 27 Nov 2019 08:10:07 +0000 Received: from AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by VI1PR08CA0252.outlook.office365.com (2603:10a6:803:dc::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Wed, 27 Nov 2019 08:10:07 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT019.mail.protection.outlook.com (10.152.16.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17 via Frontend Transport; Wed, 27 Nov 2019 08:10:07 +0000 Received: ("Tessian outbound f7868d7ede10:v33"); Wed, 27 Nov 2019 08:09:30 +0000 X-CR-MTA-TID: 64aa7808 Received: from 15cd2fedc654.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.5.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 77E842B5-A53A-4F0C-A742-F12B510D6923.1; Wed, 27 Nov 2019 08:09:25 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02lp2059.outbound.protection.outlook.com [104.47.5.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 15cd2fedc654.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Nov 2019 08:09:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aT0oUI7EuKfxmis0u0aMM2Q/33y7SVFzexYCHFkhMC8rWY3qTIJgKwxOrdLXmTzyVUixLsyr4Ym2gfdbfofnAoqIEki++lUG1SrQSiVoQm6Z9Ac0sI3KbfgY1jD2H3mOQ3B2f6jAl/7U9T0r7RT1SRYtwmO+Pw4BZYVa/Q/mSzFbxoKwwY38fe1LH/iLV07wzLi3t/4qpw/qtdYshD8syul5YSLLk5f1JMHaLowaCHH9BAwCWLm6D2igcxwvgR+yEF0qFQwmwoKLRYMYDyA6WZCIyw6EieTytRwPtzvH3Bbi6Y3LDnXO8YIBfBJp9UM0F3JbJWoS7lxFDME7TcWpPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WoNSYTuctVm2be1OkPdaxiChQOIbJrxE7GA39nBm7sU=; b=iy53IrTZKITOcVENq+Wr7x2zrvMuU5AufH0SGf1DP7FCQxGEg590msg3pBFQr8pAQ/XNhoeX06DpbQPwLkMiOBK6KIt8sTyquacaOQE8RleMR3O7dI0vCbcuwhDAGMQ3Ae5P7pMyGz15AC2vvpXRpJk0f0kuFPF48FbC0V7MnljyyZl3RE9voeWkpbf6uwYwK4vVEwLyh0B0bBiD1F7dr3NMUmWqeMUJAtRNQNToLHOvJb5AR9ZSfzEJRz0NkIMm7Sol24q80st96eN1cpzdDj5bZElRPmodw986JxNRW8xEkAdDFb/4bEmxT1piDuYcyd3C94GB/Te69J8gFwEtRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WoNSYTuctVm2be1OkPdaxiChQOIbJrxE7GA39nBm7sU=; b=oTxcwouK/EkNJ3s7Gt46hyJyMsi9rB7RbaxDXI77Beaz2k2wMDDKneItNt5WqA+3G9WUkVH+qNP+VQOmHvo/K/HrJiIZZsrPyTvGt/aDnx6chFuyiO7b7lJnHTyBEXhzBa0VnBWnVzKNHd1Q1hh5HeksUFJ9E8d7Ff6T1PEmxAc= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (10.255.27.75) by VE1PR08MB4880.eurprd08.prod.outlook.com (10.255.114.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.21; Wed, 27 Nov 2019 08:09:22 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::3d2a:e5be:952e:541a]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::3d2a:e5be:952e:541a%6]) with mapi id 15.20.2474.023; Wed, 27 Nov 2019 08:09:22 +0000 From: "Phil Yang (Arm Technology China)" To: "thomas@monjalon.net" CC: "dev@dpdk.org" , Bruce Richardson , "david.marchand@redhat.com" , "jerinj@marvell.com" , Honnappa Nagarahalli , "Gavin Hu (Arm Technology China)" , "Joyce Kong (Arm Technology China)" , nd , "stable@dpdk.org" , nd Thread-Topic: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Thread-Index: AQHVmH1n1zu49GwJzkuulAXqP/uuj6eG2hnQgAAyrgCAAAQxQIAWtGIAgAD1YfA= Date: Wed, 27 Nov 2019 08:09:22 +0000 Message-ID: References: <1573468461-25972-1-git-send-email-phil.yang@arm.com> <3677391.EzyCDiKdWj@xps> <5285313.iaM3IdUqkp@xps> In-Reply-To: <5285313.iaM3IdUqkp@xps> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 564cea84-5742-44d3-b38d-ed7c60734ed5.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8277b316-71f6-4e08-0f37-08d773113710 X-MS-TrafficTypeDiagnostic: VE1PR08MB4880:|VE1PR08MB4880:|AM6PR08MB4913: x-ms-exchange-purlcount: 1 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:229;OLM:229; x-forefront-prvs: 023495660C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(39860400002)(136003)(346002)(376002)(13464003)(199004)(189003)(6116002)(52536014)(7736002)(25786009)(14454004)(2501003)(74316002)(3846002)(305945005)(26005)(55236004)(966005)(102836004)(71200400001)(71190400001)(6916009)(11346002)(186003)(2906002)(7696005)(14444005)(6506007)(256004)(446003)(478600001)(76176011)(53546011)(54906003)(66946007)(5660300002)(76116006)(86362001)(33656002)(229853002)(5640700003)(66066001)(6436002)(316002)(6306002)(66476007)(64756008)(55016002)(66556008)(66446008)(9686003)(99286004)(1730700003)(2351001)(81156014)(4326008)(81166006)(8936002)(6246003)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4880; H:VE1PR08MB4640.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RDLQgK+AF2N3zjVCVak8TNxQbFIVclQwcdVvhQydQYHqNAGuaCVi2KBaVoju1rIP6Q4B2aM8rXaM7eXDdjnPHw6q1mGfAzeeRYMsigw8FoGBJfhBet5DMi9xCBMNjl2dDn5XX8Y2rPUTlE3xENf+XnHzlFRYUxruNb5vrdv+DUgC97aU1d/3u7t+m/oWvjo2uO0/Sk9Ejh7m3jEVOLAMYgq+Mm2rBQgDZPw5grfGqAtYICe8FAytn4WXMIxYN5X3Oh4G1SN6auKBCjVq+j+aI6EKPLpnRKVcZSvgtO4DkOHRrI+h8FT13wVOfzeRoIIQMaVdtZIKEeVPgjz7mmSmqPy5jQSbvviHbTvqHKbZutbbx8z9ldLfmCiDkgZs4A8HtzycLu51XFPp2O5oCvkAY58QQ9zItScQ6tI9bApsJiJ/7dheu9ZLYEJDwhLPO2rZgfRwp6fpqhcz/c/vdHq8QMKqIXYJiWil1Jy2cE3bbmM= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4880 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(136003)(376002)(396003)(13464003)(189003)(199004)(97756001)(14454004)(81156014)(33656002)(356004)(186003)(2501003)(46406003)(7696005)(2906002)(336012)(26005)(53546011)(102836004)(3846002)(76176011)(23726003)(6116002)(70206006)(11346002)(47776003)(6862004)(6246003)(70586007)(52536014)(450100002)(76130400001)(4326008)(6506007)(229853002)(66066001)(446003)(5660300002)(86362001)(9686003)(5640700003)(6306002)(55016002)(1730700003)(50466002)(22756006)(25786009)(74316002)(8746002)(8936002)(305945005)(7736002)(54906003)(316002)(8676002)(106002)(81166006)(14444005)(478600001)(99286004)(26826003)(966005)(36906005)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB4913; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: bebe89b0-f5e1-451c-eb5a-08d773111cad NoDisclaimer: True X-Forefront-PRVS: 023495660C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zeKm6c9lSRC5AWeAKbTeO0GooesBNeCP/HyCWVjm2Rue2/pLlnrVwneiKPfTHgfSatZUDVNd3qIiKLGPweiejRZDYMC1R3uE6CmbA2PETe0yuz6C/tGUzy0f71nUomRHsDWVh5vlSUMs9jzABLNVGFJOs+grrwBQVHYb4iQPhKq3QF1TAW3Lj8zBlY5yjCWUW5Y+r4OE9+AdtYamLEaM2/LRhF3O9FCvpd0aAAh9rRP4CNhYD6XVyytSbUUOD5VlcE5ksnWJCfs7tO9jOllE1iugasFte8dfYkZkZ/dk21C+rzDBE1bKRLIASZqj454o7EHGHFFyjFhcfiyAaCBEWkKpDrPm1+NrEgXcM0LfqsGWTOa9pl2+5pR0tUBFVB9LGIO6CE4XuNWggqzwpS9xgoxeqpmtlU2FHKWf8o6PQxFvFoypAS7Le9L0jENsXfA55OzqLknp9xJLGIiQi5/v995ZQ+P8OYyD6ejyCsMHd34= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2019 08:10:07.0831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8277b316-71f6-4e08-0f37-08d773113710 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4913 Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, November 27, 2019 1:02 AM > To: Phil Yang (Arm Technology China) > Cc: dev@dpdk.org; Bruce Richardson ; > david.marchand@redhat.com; jerinj@marvell.com; Honnappa Nagarahalli > ; Gavin Hu (Arm Technology China) > ; Joyce Kong (Arm Technology China) > ; nd ; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on arm= hf > architercture >=20 > 12/11/2019 07:40, Phil Yang (Arm Technology China): > > > -----Original Message----- > > > From: Thomas Monjalon > > > Sent: Tuesday, November 12, 2019 2:03 PM > > > To: Phil Yang (Arm Technology China) > > > Cc: Bruce Richardson ; dev@dpdk.org; > > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa > Nagarahalli > > > ; Gavin Hu (Arm Technology China) > > > ; Joyce Kong (Arm Technology China) > > > ; nd ; stable@dpdk.org > > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on > armhf > > > architercture > > > > > > 12/11/2019 06:25, Phil Yang (Arm Technology China): > > > > From: Bruce Richardson > > > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote: > > > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for t= he > armhf > > > > > > architecture doesn't support the flag '-Wno-address-of-packed- > > > member', > > > > > > so remove this flag for aarch32. > > > > > > > > > > > > Fixes: a385972c3675 ("mk: disable warning for packed member > pointer") > > > > > > Cc: stable@dpdk.org > > > > > > > > > > > > Signed-off-by: Phil Yang > > > > > > Reviewed-by: Gavin Hu > > > > > > Tested-by: Joyce Kong > > > > > > > > > > > > --- > > > > > > mk/toolchain/gcc/rte.vars.mk | 2 ++ > > > > > > 1 file changed, 2 insertions(+) > > > > > > > > > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk > > > b/mk/toolchain/gcc/rte.vars.mk > > > > > > index 9fc7041..ec0cbbf 100644 > > > > > > --- a/mk/toolchain/gcc/rte.vars.mk > > > > > > +++ b/mk/toolchain/gcc/rte.vars.mk > > > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS +=3D -Wno-format-truncation > > > > > > endif > > > > > > > > > > > > # disable packed member unalign warnings > > > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y) > > > > > > WERROR_FLAGS +=3D -Wno-address-of-packed-member > > > > > > +endif > > > > > > > > > > > You don't need to do this, as gcc will not complain about this un= known > > > flag > > > > > unless you have other issues in your code.[1] I think it's better= to > keep > > > the > > > > > code clean in this case, otherwise we'll have the code littered w= ith > > > > > conditionals for various flags. > > > > > > > > > > /Bruce > > > > > > > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html > > > > > "When an unrecognized warning option is requested (e.g., > > > > > -Wunknown-warning), GCC emits a diagnostic stating that the optio= n > is > > > not > > > > > recognized. However, if the -Wno- form is used, the behavior is > slightly > > > > > different: no diagnostic is produced for -Wno-unknown-warning > unless > > > other > > > > > diagnostics are being produced. This allows the use of new -Wno- > options > > > > > with old compilers, but if something goes wrong, the compiler war= ns > that > > > an > > > > > unrecognized option is present." > > > > > > > > Thanks, Bruce. > > > > > > > > There are thousands of warnings with alignment when compiling for > > > ARMv7 (ARMv7 supports unaligned memory access). > > > > Without this new flag, the build system works fine for ARMv7. So I= add > this > > > conditional for ARMv7 only. > > > > I agree with you we should clean up the code, but it needs a lot of > effort to > > > achieve that. > > > > This patch is going to make the ARMv7 target build successfully dur= ing > this > > > period. > > > > > > I would go the opposite direction. > > > I think we should remove all warnings disablement like "-Wno- > something", > > > and clean the code. > > > > Thanks, Thomas. > > > > I think it is a compiler issue rather than a code defect in this case, = as It > cannot recognize the '-Waddress-of-packed-member' flag. > > "arm-linux-gnueabihf-gcc: error: unrecognized command line option '- > Waddress-of-packed-member'" > > > > > > > > If you want to allow building ARMv7, you can just allow warnings as n= ot > > > errors. > > > So we will still see something is wrong but it won't prevent from bui= lding. > > > > Yes. We did this already, all the alignment issues are emitted as warni= ngs > on ARMv7. > > Please see these two commits: > > 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7") > > 6433c19105e8 ("mk: generalize strict alignment warning handling") >=20 > I don't know what to do with this patch. > I think it is not how it should work, > but you say your compiler has a real bug. Agree with you, however I haven't found a better solution for this issue ye= t. >=20 > Can you confirm which compiler is it? Please check the packet information dumped below, it is the latest version = in Ubuntu 18.04 LTS. $ sudo apt show gcc-arm-linux-gnueabihf Package: gcc-arm-linux-gnueabihf Version: 4:7.4.0-1ubuntu2.3 Priority: optional Section: devel Source: gcc-defaults (1.176ubuntu2.3) Origin: Ubuntu > Does it prevent to compile even with -Wno-error ? Yes, it does. I put one piece of the compiling log bellow. Please take a lo= ok. =20 $ make -j1 CROSS=3Darm-linux-gnueabihf- T=3Darm-armv7a-linuxapp-gcc RTE_DEV= EL_BUILD=3Dy ... /home/phil/aarch32_dpdk/dpdk/lib/librte_eal/linux/eal/eal_vfio.c:1178:7: wa= rning: cast increases required alignment of target type [-Wcast-align] p =3D (struct vfio_mp_param *)mp_rep->param; ^ /home/phil/aarch32_dpdk/dpdk/lib/librte_eal/linux/eal/eal_vfio.c: At top le= vel: cc1: error: unrecognized command line option '-Wno-address-of-packed-member= ' [-Werror] ... >=20 > Any other opinion? >=20