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 855991B457 for ; Mon, 7 Jan 2019 16:42:21 +0100 (CET) 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 x07FeZlq009095; Mon, 7 Jan 2019 07:42:17 -0800 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=g8gCNyzHXw+C6V6W7BLiZFuQoE+fUGpDFNd5IarGe88=; b=TIIq8QIpX+TNo/RNoImM3EZhzks5mtvdKOWjf2rV+3MMGTvOE3yGTtTkinLAublsE6Gj nsKamBIxfpy41eVKX4UxgB1aLyD/GfvXRXJVNbVfBKRQwO7AfjeWk8wWTNiQevaRD1nK c9gLaFvN0gpR05sWzSdHsLo2h4AQDfYLh0KrFjwZiVsx2E/EJn+IaxghDJl2RAU1Cnml j5WgJj6pLmlKlwfPzC+K4qiOIG3CmfX7dDh2nWQTvL9z0y4oP2DrvyjV8i71Su24P4V8 Qj0es8lBZnqdukzraRKZYuL4kHd01UlDNLypiSgI+0WE7YnZVnscuf4opq9eKQ+EM0CJ fw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2pv53q12wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 07 Jan 2019 07:42:17 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 7 Jan 2019 07:42:16 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.56) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 7 Jan 2019 07:42:16 -0800 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=g8gCNyzHXw+C6V6W7BLiZFuQoE+fUGpDFNd5IarGe88=; b=eeZM82RfApFSqqX2lHNBxqU+zkW9WJcEjzPfvKc+e+oDmbT8HJ5x6qC7f6I2+4z/vn9g6aQ9bO+1o++mzFQbVFHXIcYELLksTttvfNRi1K9HAsMpNckAul5I3UgsI0GzoahsLN5ETARxaEZyFkpujJkmHtSGw6Gbp719JVVwmj4= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1989.namprd18.prod.outlook.com (10.171.255.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Mon, 7 Jan 2019 15:42:13 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::8d37:71d9:3b0c:ad00]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::8d37:71d9:3b0c:ad00%2]) with mapi id 15.20.1495.011; Mon, 7 Jan 2019 15:42:13 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran , "Gavin.Hu@arm.com" , "bruce.richardson@intel.com" , "thomas@monjalon.net" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH v2 4/6] meson: add infra to support machine specific flags Thread-Index: AQHUpp+PXZsfg0WxB0Gv8YAityBteQ== Date: Mon, 7 Jan 2019 15:42:13 +0000 Message-ID: <20190107154129.24700-4-pbhagavatula@marvell.com> References: <20190106131933.7898-1-jerinj@marvell.com> <20190107154129.24700-1-pbhagavatula@marvell.com> In-Reply-To: <20190107154129.24700-1-pbhagavatula@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::18) To CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7a::14) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [111.93.218.67] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR1801MB1989; 20:dgQphnAJ75Sei/FkCv5PUuQi6aXPtyRV96G3B/KRs4MZQD2acavMLYs6f9Xuyxz6Yin8sT+XQagttKYMJDki6eZ2wz37yY3tPpjCPQLt+fTDA5UcLC+u07vLKs20kepXZt7cKKddcY2vU6nnoV7HyNZOlHUYEMsVGPcvWMdRD34= x-ms-office365-filtering-correlation-id: ef0f5e93-4945-467d-8371-08d674b6b1a5 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB1989; x-ms-traffictypediagnostic: CY4PR1801MB1989: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(3231475)(944501520)(52105112)(3002001)(93006095)(93001095)(10201501046)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:CY4PR1801MB1989; BCL:0; PCL:0; RULEID:; SRVR:CY4PR1801MB1989; x-forefront-prvs: 0910AAF391 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(396003)(136003)(39860400002)(189003)(199004)(107886003)(5660300001)(26005)(53936002)(78486014)(25786009)(256004)(4326008)(76176011)(575784001)(6512007)(2201001)(81156014)(81166006)(99286004)(8676002)(86362001)(1076003)(316002)(54906003)(110136005)(68736007)(6436002)(7736002)(97736004)(305945005)(6486002)(2501003)(6506007)(386003)(66066001)(8936002)(14454004)(3846002)(2906002)(106356001)(11346002)(105586002)(52116002)(6116002)(71200400001)(478600001)(446003)(36756003)(486006)(476003)(2616005)(71190400001)(102836004)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1989; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: eYmvoKtxCKCPbgnlRxfW1Asa1kw0n3kgszY/UZ5L4toEPAfXWXW4QZLac4lMIqWWIKdZK/y0D8ctWbut6iEk7WghjucUk89uWyNep89dlZ43MG6ZSO1YZCEZ4MQmpc1dz9EYb5+V9d3TKkpgYkUKtXDDSvSsjBlmr5LuDbPJhjbPjVqt0R6vPF8pe5Ct1G8rt7HRtH7ZKlfUGvtxMH64/SmqWh/laitX9+rPoG8MHk65pa+Ce2LmlzXAOe7tFqjWH95WOyiFaCGNtToxEV/IGkNXEBDtPdpu6IX8VWBzjU/qp4d7DTc5iDAPdSCZjpDK spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ef0f5e93-4945-467d-8371-08d674b6b1a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2019 15:42:13.5960 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1989 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-07_07:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901070137 Subject: [dpdk-dev] [PATCH v2 4/6] 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: Mon, 07 Jan 2019 15:42:22 -0000 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 --- config/arm/meson.build | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index dae55d6b2..576363fc0 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -7,23 +7,6 @@ march_opt =3D '-march=3D@0@'.format(machine) =20 arm_force_native_march =3D false =20 -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']], - ['0xa2', ['-mcpu=3Dthunderxt81']], - ['0xa3', ['-mcpu=3Dthunderxt83']]] - flags_common_default =3D [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file @@ -50,12 +33,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], @@ -69,6 +50,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]] =20 ## 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,10 +159,19 @@ else foreach marg: machine[2] if marg[0] =3D=3D impl_pn foreach f: marg[1] - machine_args +=3D f + if cc.has_argument(f) + machine_args +=3D f + endif endforeach 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 + endforeach endif message(machine_args) =20 --=20 2.20.1