From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9502A1B130 for ; Wed, 10 Apr 2019 16:22:52 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3AEL14u026257; Wed, 10 Apr 2019 07:22:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=eyPAvKZqKTl8vPyROgwIgcxQNj9UZN/u5CkHV/rTFTM=; b=vbMLQxyiaWcbQOCAUqHSnKOFODArU+ZciMHdY7TsiqEnmgn66vKqBN6admg0Qoj7sax9 wbZejNndE3WnO+aRh+/2gvYbuu1hlg/D8YGbJ7Z8MdvErPu3lYfGqeNjnivkkC7U1kbN B/me3NRj/yI9MFyz0TcKWjaFFAmHaXE1y59XOabtlJasWJA60IqYV6RScmLmo2cYNwaW xfvVvPS/+77DGcLrSUbxGYOX9G8Zvi+0+SErCQMy2s1W7Ueaxu2D0I3M8L5XAPgqjoN7 dk3x7ug4buOSZS4G/QAutHcN6XaokdIwN2GPr2bigMaHWVu8iKLH2T1lSDxCejAdahtg Xw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2rsggqrfn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 10 Apr 2019 07:22:51 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 10 Apr 2019 07:22:51 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (104.47.42.59) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 10 Apr 2019 07:22:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eyPAvKZqKTl8vPyROgwIgcxQNj9UZN/u5CkHV/rTFTM=; b=Qo1HsCA4pi093FM/DqQ6U7yjyJqVZwHDAriFD7yihvmeka1O4jzuDnfdPCiwTYKTOqDeHklBHUpMG5dQlzm1Rg2rrF8y6UrT/TgGANaghD4hf0cFhFtlcq88yRp1ogX45ghl97SSbcuMT2QnZh5v9gbTbXuV+0HKJmGc513PidI= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB2054.namprd18.prod.outlook.com (10.171.255.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.13; Wed, 10 Apr 2019 14:22:46 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d%3]) with mapi id 15.20.1792.016; Wed, 10 Apr 2019 14:22:46 +0000 From: Pavan Nikhilesh Bhagavatula To: Yongseok Koh , "jerinjacobk@gmail.com" CC: Thomas Monjalon , dev , "Jerin Jacob Kollanukkaran" Thread-Topic: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags Thread-Index: AQHU70NHk2YaL9AxlEORJOmhN71AvaY1cMuw Date: Wed, 10 Apr 2019 14:22:46 +0000 Message-ID: References: <20190318164949.2357-1-jerinj@marvell.com> <20190406142737.20091-1-jerinj@marvell.com> <20190406142737.20091-2-jerinj@marvell.com> <54C87541-6DC7-4CAF-850B-8F7A4BF1C9BD@mellanox.com> <122A13B7-4883-4719-A682-AE3C40DDAA96@mellanox.com> In-Reply-To: <122A13B7-4883-4719-A682-AE3C40DDAA96@mellanox.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.167.234.147] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c470ad1e-e923-4fca-66aa-08d6bdc00103 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:CY4PR1801MB2054; x-ms-traffictypediagnostic: CY4PR1801MB2054: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(346002)(136003)(39860400002)(199004)(13464003)(51914003)(189003)(6116002)(8936002)(2501003)(14454004)(81156014)(81166006)(110136005)(6436002)(54906003)(97736004)(55016002)(99286004)(93886005)(71190400001)(78486014)(53936002)(107886003)(71200400001)(105586002)(229853002)(9686003)(316002)(33656002)(6246003)(256004)(26005)(74316002)(5660300002)(186003)(53546011)(102836004)(4326008)(486006)(52536014)(6506007)(68736007)(3846002)(7736002)(106356001)(478600001)(446003)(25786009)(2906002)(11346002)(305945005)(7696005)(66066001)(86362001)(76176011)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2054; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: QTSg2S2EKRNA8apdDfqzK/2RbzyIvm2HFPs7iQJCPFhXylCgzqrSzpzW1RVZ/+8/kmkORUKUZqe61XiVrLm4iHi3CcIp/+4Cpsj1GBN/RpykJ8WWBnhDYTV9BjlNbuayoUD5wT2oj/3OFPlhae+/ELgmwos7BIsq5YRE8e9HiW22sfT4AIv/87eZpf0iLyUJAf/oQTTQq8Z5ouuR4dgSLPy5tXslE/3u9VCSVuDSgZa2o2ztcrhwzI4YymY8Cb+8ET70vICgMQhnn4GiZxo1ndSavck7i6igN6SWNmqcobceiH2/75qQvBCDw7PXgupdDwbwFRUgr+i2AZFyaTo5oSjkn+7sNJ2Vpei19HcUKPG62JY75WEv9nqFKyew87h6maSDsnzXxO179ObTttoN8x+oM1jSftEkwh2A7sLCTKw= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c470ad1e-e923-4fca-66aa-08d6bdc00103 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 14:22:46.6533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2054 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-10_06:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags 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: , X-List-Received-Date: Wed, 10 Apr 2019 14:22:53 -0000 >-----Original Message----- >From: Yongseok Koh >Sent: Wednesday, April 10, 2019 7:45 AM >To: jerinjacobk@gmail.com; Pavan Nikhilesh Bhagavatula > >Cc: Thomas Monjalon ; dev ; Jerin >Jacob Kollanukkaran >Subject: [EXT] Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support >machine specific flags > >External Email > >---------------------------------------------------------------------- > >> On Apr 9, 2019, at 5:40 PM, Yongseok Koh wrote: >> >>> >>> On Apr 6, 2019, at 7:27 AM, jerinjacobk@gmail.com wrote: >>> >>> From: Pavan Nikhilesh >>> >>> Currently, RTE_* flags are set based on the implementer ID but there >>> might be some micro arch specific differences from the same vendor >>> eg. CACHE_LINESIZE. Add support to set micro arch specific flags. >>> >>> Signed-off-by: Pavan Nikhilesh >>> Signed-off-by: Jerin Jacob >>> --- >>> config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- >>> 1 file changed, 32 insertions(+), 5 deletions(-) >>> >>> diff --git a/config/arm/meson.build b/config/arm/meson.build index >>> 170a4981a..8de3f3e3a 100644 >>> --- a/config/arm/meson.build >>> +++ b/config/arm/meson.build >>> @@ -52,12 +52,10 @@ flags_generic =3D [ >>> ['RTE_USE_C11_MEM_MODEL', true], >>> ['RTE_CACHE_LINE_SIZE', 128]] >>> flags_cavium =3D [ >>> - ['RTE_MACHINE', '"thunderx"'], >>> ['RTE_CACHE_LINE_SIZE', 128], >>> ['RTE_MAX_NUMA_NODES', 2], >>> ['RTE_MAX_LCORE', 96], >>> - ['RTE_MAX_VFIO_GROUPS', 128], >>> - ['RTE_USE_C11_MEM_MODEL', false]] >>> + ['RTE_MAX_VFIO_GROUPS', 128]] >>> flags_dpaa =3D [ >>> ['RTE_MACHINE', '"dpaa"'], >>> ['RTE_USE_C11_MEM_MODEL', true], >>> @@ -71,6 +69,27 @@ flags_dpaa2 =3D [ >>> ['RTE_MAX_NUMA_NODES', 1], >>> ['RTE_MAX_LCORE', 16], >>> ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] >>> +flags_default_extra =3D [] >>> +flags_thunderx_extra =3D [ >>> + ['RTE_MACHINE', '"thunderx"'], >>> + ['RTE_USE_C11_MEM_MODEL', false]] >>> + >>> +machine_args_generic =3D [ >>> + ['default', ['-march=3Darmv8-a+crc+crypto']], >>> + ['native', ['-march=3Dnative']], >>> + ['0xd03', ['-mcpu=3Dcortex-a53']], >>> + ['0xd04', ['-mcpu=3Dcortex-a35']], >>> + ['0xd07', ['-mcpu=3Dcortex-a57']], >>> + ['0xd08', ['-mcpu=3Dcortex-a72']], >>> + ['0xd09', ['-mcpu=3Dcortex-a73']], >>> + ['0xd0a', ['-mcpu=3Dcortex-a75']]] >>> + >>> +machine_args_cavium =3D [ >>> + ['default', ['-march=3Darmv8-a+crc+crypto','-mcpu=3Dthunderx']], >>> + ['native', ['-march=3Dnative']], >>> + ['0xa1', ['-mcpu=3Dthunderxt88'], flags_thunderx_extra], >>> + ['0xa2', ['-mcpu=3Dthunderxt81'], flags_thunderx_extra], >>> + ['0xa3', ['-mcpu=3Dthunderxt83'], flags_thunderx_extra]] >> >> Looks like there's a mistake in rebasing it? Seems so will send out v8. >> You should've removed machine_args_generic and machine_args_cavium in >> the beginning of this file. >> >> Other than that, it looks good to me. >> >> BTW, thanks for the patch. I raised this issue before and I was >> supposed to make the change but you have taken it. >> >> Yongseok >> >>> ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page >>> G7-5321) impl_generic =3D ['Generic armv8', flags_generic, >>> machine_args_generic] @@ -157,8 +176,16 @@ else >>> endif >>> foreach marg: machine[2] >>> if marg[0] =3D=3D impl_pn >>> - foreach f: marg[1] >>> - machine_args +=3D f >>> + foreach flag: marg[1] >>> + if cc.has_argument(flag) >>> + machine_args +=3D flag >>> + endif >>> + endforeach >>> + # Apply any extra machine specific flags. >>> + foreach flag: marg.get(2, flags_default_extra) >>> + if flag.length() > 0 >>> + dpdk_conf.set(flag[0], flag[1]) >>> + endif > >And setting the extra flags doesn't work well with gcc < 7 because of the >following, Extra flags aren't set in this case as the third variable in the list is m= issing when 'native' or 'default' is selected generic=3D=20 ['default', ['-march=3Darmv8-a+crc+crypto']], ['native', ['-march=3Dnative']] cavium=3D ['default', ['-march=3Darmv8-a+crc+crypto','-mcpu=3Dthunderx']], ['native', ['-march=3Dnative']] And marg.get falls back to flags_default_extra =3D []. > > # Primary part number based mcpu flags are supported > # for gcc versions > 7 > if cc.version().version_compare( > '<7.0') or cmd_output.length() =3D=3D 0 > if not meson.is_cross_build() and arm_force_native_march = =3D=3D true > impl_pn =3D 'native' > else > impl_pn =3D 'default' > endif > endif > >Thanks, >Yongseok > >>> endforeach >>> endif >>> endforeach >>> -- >>> 2.21.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id DCB1BA0096 for ; Wed, 10 Apr 2019 16:22:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0ED741B13A; Wed, 10 Apr 2019 16:22:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9502A1B130 for ; Wed, 10 Apr 2019 16:22:52 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3AEL14u026257; Wed, 10 Apr 2019 07:22:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=eyPAvKZqKTl8vPyROgwIgcxQNj9UZN/u5CkHV/rTFTM=; b=vbMLQxyiaWcbQOCAUqHSnKOFODArU+ZciMHdY7TsiqEnmgn66vKqBN6admg0Qoj7sax9 wbZejNndE3WnO+aRh+/2gvYbuu1hlg/D8YGbJ7Z8MdvErPu3lYfGqeNjnivkkC7U1kbN B/me3NRj/yI9MFyz0TcKWjaFFAmHaXE1y59XOabtlJasWJA60IqYV6RScmLmo2cYNwaW xfvVvPS/+77DGcLrSUbxGYOX9G8Zvi+0+SErCQMy2s1W7Ueaxu2D0I3M8L5XAPgqjoN7 dk3x7ug4buOSZS4G/QAutHcN6XaokdIwN2GPr2bigMaHWVu8iKLH2T1lSDxCejAdahtg Xw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2rsggqrfn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 10 Apr 2019 07:22:51 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 10 Apr 2019 07:22:51 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (104.47.42.59) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 10 Apr 2019 07:22:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eyPAvKZqKTl8vPyROgwIgcxQNj9UZN/u5CkHV/rTFTM=; b=Qo1HsCA4pi093FM/DqQ6U7yjyJqVZwHDAriFD7yihvmeka1O4jzuDnfdPCiwTYKTOqDeHklBHUpMG5dQlzm1Rg2rrF8y6UrT/TgGANaghD4hf0cFhFtlcq88yRp1ogX45ghl97SSbcuMT2QnZh5v9gbTbXuV+0HKJmGc513PidI= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB2054.namprd18.prod.outlook.com (10.171.255.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.13; Wed, 10 Apr 2019 14:22:46 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::e980:fa09:c83a:851d%3]) with mapi id 15.20.1792.016; Wed, 10 Apr 2019 14:22:46 +0000 From: Pavan Nikhilesh Bhagavatula To: Yongseok Koh , "jerinjacobk@gmail.com" CC: Thomas Monjalon , dev , "Jerin Jacob Kollanukkaran" Thread-Topic: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags Thread-Index: AQHU70NHk2YaL9AxlEORJOmhN71AvaY1cMuw Date: Wed, 10 Apr 2019 14:22:46 +0000 Message-ID: References: <20190318164949.2357-1-jerinj@marvell.com> <20190406142737.20091-1-jerinj@marvell.com> <20190406142737.20091-2-jerinj@marvell.com> <54C87541-6DC7-4CAF-850B-8F7A4BF1C9BD@mellanox.com> <122A13B7-4883-4719-A682-AE3C40DDAA96@mellanox.com> In-Reply-To: <122A13B7-4883-4719-A682-AE3C40DDAA96@mellanox.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.167.234.147] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c470ad1e-e923-4fca-66aa-08d6bdc00103 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:CY4PR1801MB2054; x-ms-traffictypediagnostic: CY4PR1801MB2054: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(346002)(136003)(39860400002)(199004)(13464003)(51914003)(189003)(6116002)(8936002)(2501003)(14454004)(81156014)(81166006)(110136005)(6436002)(54906003)(97736004)(55016002)(99286004)(93886005)(71190400001)(78486014)(53936002)(107886003)(71200400001)(105586002)(229853002)(9686003)(316002)(33656002)(6246003)(256004)(26005)(74316002)(5660300002)(186003)(53546011)(102836004)(4326008)(486006)(52536014)(6506007)(68736007)(3846002)(7736002)(106356001)(478600001)(446003)(25786009)(2906002)(11346002)(305945005)(7696005)(66066001)(86362001)(76176011)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2054; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: QTSg2S2EKRNA8apdDfqzK/2RbzyIvm2HFPs7iQJCPFhXylCgzqrSzpzW1RVZ/+8/kmkORUKUZqe61XiVrLm4iHi3CcIp/+4Cpsj1GBN/RpykJ8WWBnhDYTV9BjlNbuayoUD5wT2oj/3OFPlhae+/ELgmwos7BIsq5YRE8e9HiW22sfT4AIv/87eZpf0iLyUJAf/oQTTQq8Z5ouuR4dgSLPy5tXslE/3u9VCSVuDSgZa2o2ztcrhwzI4YymY8Cb+8ET70vICgMQhnn4GiZxo1ndSavck7i6igN6SWNmqcobceiH2/75qQvBCDw7PXgupdDwbwFRUgr+i2AZFyaTo5oSjkn+7sNJ2Vpei19HcUKPG62JY75WEv9nqFKyew87h6maSDsnzXxO179ObTttoN8x+oM1jSftEkwh2A7sLCTKw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c470ad1e-e923-4fca-66aa-08d6bdc00103 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 14:22:46.6533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2054 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-10_06:, , signatures=0 Subject: Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags 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" Message-ID: <20190410142246.qMdBmBqPpNlmT0IyU-X6tRhRvNimtnJ9yl-djyvghak@z> >-----Original Message----- >From: Yongseok Koh >Sent: Wednesday, April 10, 2019 7:45 AM >To: jerinjacobk@gmail.com; Pavan Nikhilesh Bhagavatula > >Cc: Thomas Monjalon ; dev ; Jerin >Jacob Kollanukkaran >Subject: [EXT] Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support >machine specific flags > >External Email > >---------------------------------------------------------------------- > >> On Apr 9, 2019, at 5:40 PM, Yongseok Koh wrote: >> >>> >>> On Apr 6, 2019, at 7:27 AM, jerinjacobk@gmail.com wrote: >>> >>> From: Pavan Nikhilesh >>> >>> Currently, RTE_* flags are set based on the implementer ID but there >>> might be some micro arch specific differences from the same vendor >>> eg. CACHE_LINESIZE. Add support to set micro arch specific flags. >>> >>> Signed-off-by: Pavan Nikhilesh >>> Signed-off-by: Jerin Jacob >>> --- >>> config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- >>> 1 file changed, 32 insertions(+), 5 deletions(-) >>> >>> diff --git a/config/arm/meson.build b/config/arm/meson.build index >>> 170a4981a..8de3f3e3a 100644 >>> --- a/config/arm/meson.build >>> +++ b/config/arm/meson.build >>> @@ -52,12 +52,10 @@ flags_generic =3D [ >>> ['RTE_USE_C11_MEM_MODEL', true], >>> ['RTE_CACHE_LINE_SIZE', 128]] >>> flags_cavium =3D [ >>> - ['RTE_MACHINE', '"thunderx"'], >>> ['RTE_CACHE_LINE_SIZE', 128], >>> ['RTE_MAX_NUMA_NODES', 2], >>> ['RTE_MAX_LCORE', 96], >>> - ['RTE_MAX_VFIO_GROUPS', 128], >>> - ['RTE_USE_C11_MEM_MODEL', false]] >>> + ['RTE_MAX_VFIO_GROUPS', 128]] >>> flags_dpaa =3D [ >>> ['RTE_MACHINE', '"dpaa"'], >>> ['RTE_USE_C11_MEM_MODEL', true], >>> @@ -71,6 +69,27 @@ flags_dpaa2 =3D [ >>> ['RTE_MAX_NUMA_NODES', 1], >>> ['RTE_MAX_LCORE', 16], >>> ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] >>> +flags_default_extra =3D [] >>> +flags_thunderx_extra =3D [ >>> + ['RTE_MACHINE', '"thunderx"'], >>> + ['RTE_USE_C11_MEM_MODEL', false]] >>> + >>> +machine_args_generic =3D [ >>> + ['default', ['-march=3Darmv8-a+crc+crypto']], >>> + ['native', ['-march=3Dnative']], >>> + ['0xd03', ['-mcpu=3Dcortex-a53']], >>> + ['0xd04', ['-mcpu=3Dcortex-a35']], >>> + ['0xd07', ['-mcpu=3Dcortex-a57']], >>> + ['0xd08', ['-mcpu=3Dcortex-a72']], >>> + ['0xd09', ['-mcpu=3Dcortex-a73']], >>> + ['0xd0a', ['-mcpu=3Dcortex-a75']]] >>> + >>> +machine_args_cavium =3D [ >>> + ['default', ['-march=3Darmv8-a+crc+crypto','-mcpu=3Dthunderx']], >>> + ['native', ['-march=3Dnative']], >>> + ['0xa1', ['-mcpu=3Dthunderxt88'], flags_thunderx_extra], >>> + ['0xa2', ['-mcpu=3Dthunderxt81'], flags_thunderx_extra], >>> + ['0xa3', ['-mcpu=3Dthunderxt83'], flags_thunderx_extra]] >> >> Looks like there's a mistake in rebasing it? Seems so will send out v8. >> You should've removed machine_args_generic and machine_args_cavium in >> the beginning of this file. >> >> Other than that, it looks good to me. >> >> BTW, thanks for the patch. I raised this issue before and I was >> supposed to make the change but you have taken it. >> >> Yongseok >> >>> ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page >>> G7-5321) impl_generic =3D ['Generic armv8', flags_generic, >>> machine_args_generic] @@ -157,8 +176,16 @@ else >>> endif >>> foreach marg: machine[2] >>> if marg[0] =3D=3D impl_pn >>> - foreach f: marg[1] >>> - machine_args +=3D f >>> + foreach flag: marg[1] >>> + if cc.has_argument(flag) >>> + machine_args +=3D flag >>> + endif >>> + endforeach >>> + # Apply any extra machine specific flags. >>> + foreach flag: marg.get(2, flags_default_extra) >>> + if flag.length() > 0 >>> + dpdk_conf.set(flag[0], flag[1]) >>> + endif > >And setting the extra flags doesn't work well with gcc < 7 because of the >following, Extra flags aren't set in this case as the third variable in the list is m= issing when 'native' or 'default' is selected generic=3D=20 ['default', ['-march=3Darmv8-a+crc+crypto']], ['native', ['-march=3Dnative']] cavium=3D ['default', ['-march=3Darmv8-a+crc+crypto','-mcpu=3Dthunderx']], ['native', ['-march=3Dnative']] And marg.get falls back to flags_default_extra =3D []. > > # Primary part number based mcpu flags are supported > # for gcc versions > 7 > if cc.version().version_compare( > '<7.0') or cmd_output.length() =3D=3D 0 > if not meson.is_cross_build() and arm_force_native_march = =3D=3D true > impl_pn =3D 'native' > else > impl_pn =3D 'default' > endif > endif > >Thanks, >Yongseok > >>> endforeach >>> endif >>> endforeach >>> -- >>> 2.21.0