From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0048.outbound.protection.outlook.com [104.47.41.48]) by dpdk.org (Postfix) with ESMTP id D442558CE for ; Mon, 22 Jan 2018 16:27:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7cO3FyXt+YZ/n00RxMQHX6Q3PqQzLdcznsKzaKeQEiw=; b=olJAcppJ58/SEfPvo8jIjXh5yc7H9jq22TCkd01E7mPXDhavnFzWcmZljgZU/YnBfkMAcQ36jjA26OEg4rhdSQ65sTEXjbehpxbcFQwuPLV8/QsZ4ZcmVSlIPluB5xHJkPRGGzBzinKTfU70h4PXhMAtC73wooSJ9urQVW4uypk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 15:27:42 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, herbert.guan@arm.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 22 Jan 2018 20:56:30 +0530 Message-Id: <20180122152632.13685-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180122152632.13685-1-pbhagavatula@caviumnetworks.com> References: <20171219105338.198727-1-bruce.richardson@intel.com> <20180122152632.13685-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0601CA0004.apcprd06.prod.outlook.com (10.170.128.14) To DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3d91940-3a61-4dbe-d364-08d561acb0c4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR07MB3465; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 3:e1HqE2hhHoM7B28YLoB08ISKgmyA+80an90u6XHB6JAkmQ0WTXJLlAVGxBZd1Z5FukW393KRf+Kj1a+5UtS7vh/iRaNSrgHcRgnwoweQAa4pIZ0mf2G7U1fka3QEaayQpe/P8sxf+Mm62bxOUjCCBLn+IwcPVlZtoqDystUk/4VNHoWR0sUhjuZT2ufd/Ty9vdwFwWMsASH5FIxiE1dkfKXZArYiYIgfQPuK3aIEFrspbUb0jisp2sCDnSNmJQKl; 25:JSyFE69bPkS+TkFRGYQYjRP8PQOXLtiXl8Ib4l2DY085jJeoE52XF+5XlPoATK4D4JCaKslVbNf7bkSukZ3vhn09//2p3WhKGJBHJV4d8vB4oaP4VhInE8QLpAMLi7p5sk9Y6wXuiLVqRyKjDMtDkHEGZ0MNWn2Dc5Ehyshbf+lHb/RAGi93YwLN5KkbTE3dKgwqoT8yNqvyiqJA9EMe9W5DhHBYP2R5rNamO7YFq6MtJNrSIbhfHWvgm4HWU652YJ2LmgVG6tZyfIZVbSk7wcBrfZ4WRdpY+kR27ciNJvtJ4k9nOAHVxoxW/rfvZ+7N2d2kzWEYO3jB+YOGzeBSxA==; 31:qV9RIIv1FHXFs7bL2miQGW/TNvD93a7+t3Au71mWptB9lRXuWZaezQr7otyYP3ezdSZYWY8uaQmM+iDgfnTuvR4OpwqjniQTKnGatyuHjiEmLN+ux8Fwol7zhgvvav5DSb4IUmrnoXXHbRlvcDPjsBpD3XFk1/kBfTi7MFYodynW2WYlPoy7TNVdyN/194qZM6WKWqAwJERz4oeNlLjA/H4V8VoMFDmOalfXvC9ORI8= X-MS-TrafficTypeDiagnostic: DM5PR07MB3465: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 20:ifAb/CVeWkmGUscvWEUrq/4d1YvjsW0eFAEHiOIFGP9z5TcmLjORm6gUjmT8UC4LqpEwrLMS61XHP7SONigk3Ii+zYRImfPOJcffwUHbCcoe7S1SkRNGdiMJx/acGi13No0Xlcl+hgAjqXwy3mspkI5GSbCnJQWxpC6qbaz19PdMcj07/r4o8T3dFRdt7f+GiQSoDgQ+/an4uiF8VU+eWcf80hW7+wP8JfA9FPJQ16Uqneh4jGvRT2PXRzX2zDJk9Oz60qDrvXHay9I/Nt6ydCKaq3SY0Zp4PI3e0g8F8py84rBCGVXbrUVFmJsU9VcMklvm1ZH5CEL661N6E6m+lCIKUpaFb4Me5Hh/Jo665kj4wVARtf8ehWBR+nOACp8SZ5HaYgdrWRRm7Dcr3VKK9hEX6G3REAQNcYQalymH8GXPM5ORnNT/js4qbEa8fk9BRc3+6u90tWDoxyqEb2Ns83bdDMEMhd2dS3izPFh7ZKjzte5MBKkEd8numF+/fVUrS4a7WewvYZ2Oj3BJwYCI5ck2sZHoeHfY7F41phthRwzlwfSZENAEKxPmBpWXKUAf/NRxqo0Tj3tBWRM1YOjul0Hf4piWQqdhsn4UnUNyl3M=; 4:wKuNgtm+nxDPO6vz3+b38Rido+lGc6GPfvHGNKHclISUMas9BcR5YbNFC1aVeuw7FEu/AaV3cBtaredSV08nXXfXWZj1jWWvKRB9XGKHLPH42kJtrx10DtOP4VLEYGYyqK93K66lEt0VU8/uNGgw9KiBG7xBP2tf4Ms+UtlXCPQKyr0HA3fXN8OnhJZugQ7oke/9bfiUuCL1/T7aoZ4mAAjZwXwqyy3fymhpImojm5ww8Iyf6cY4ShCgZOUgBDXBhUIjsmyjeoTeicIEfchpSA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(3231023)(2400081)(944501161)(6041288)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR07MB3465; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3465; X-Forefront-PRVS: 0560A2214D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39380400002)(396003)(39850400004)(346002)(366004)(376002)(189003)(199004)(16586007)(68736007)(76176011)(50226002)(51416003)(52116002)(36756003)(26005)(50466002)(59450400001)(2906002)(6506007)(6116002)(386003)(3846002)(25786009)(1076002)(5660300001)(105586002)(4326008)(6512007)(81166006)(53936002)(48376002)(6486002)(6666003)(2950100002)(8936002)(81156014)(97736004)(107886003)(106356001)(42882006)(47776003)(5009440100003)(66066001)(16526018)(316002)(8676002)(72206003)(575784001)(478600001)(8656006)(7736002)(305945005)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3465; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3465; 23:UtLM6k3my+juk8/K/pYCcJMkh3eVzpcibt1QNBa/m?= =?us-ascii?Q?EEdKH24HeABQr1O+wZqpN54VtPYp1a489O0iLZgwM6gj0bsEPJU8RzIH7zmS?= =?us-ascii?Q?+qlmQdKW5VfLg8sAjBuOcz8zTXoD9HgYtBLi3IFWcGEW2GT9XlUbtbJX7PNt?= =?us-ascii?Q?ybdiniTzJbzrhUR7vKeTOLoICMoyXJxOyXKKfevX6LvEgWMUs3JJQZV7zTf8?= =?us-ascii?Q?8iqFRPv7OCwzLDupVjE3zsjvLiCEN5klr2EX9v/91kUTdahWpaRFeApyGisQ?= =?us-asc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J5L5BqOV+8yJBVxn+ckw0oSSeIh3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 15:27:42.6688 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3d91940-3a61-4dbe-d364-08d561acb0c4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3465 Subject: [dpdk-dev] [PATCH v6 2/4] build: add support for detecting march on ARM 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, 22 Jan 2018 15:27:49 -0000 Added support for detecting march and mcpu by reading midr_el1 register. The implementer, primary part number values read can be used to figure out the underlying arm cpu. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/meson.build | 2 +- app/test-pmd/meson.build | 2 +- config/arm/armv8_machine.py | 18 ++++++++ config/arm/meson.build | 98 +++++++++++++++++++++++++++++++++++++++---- config/meson.build | 19 +++++---- drivers/meson.build | 2 +- examples/meson.build | 2 +- lib/meson.build | 2 +- meson.build | 2 +- test/test/meson.build | 2 +- 10 files changed, 125 insertions(+), 24 deletions(-) create mode 100755 config/arm/armv8_machine.py diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build index 1dd954539..5beaa0070 100644 --- a/app/test-eventdev/meson.build +++ b/app/test-eventdev/meson.build @@ -21,7 +21,7 @@ endif executable('dpdk-test-eventdev', sources, - c_args: machine_arg, + c_args: machine_args, link_whole: link_libs, dependencies: dep_objs, install_rpath: join_paths(get_option('prefix'), driver_install_path), diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index e819677a5..2a3f0ba1f 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -45,7 +45,7 @@ endif executable('dpdk-testpmd', sources, - c_args: machine_arg, + c_args: machine_args, link_whole: link_libs, dependencies: dep_objs, install_rpath: join_paths(get_option('prefix'), driver_install_path), diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py new file mode 100755 index 000000000..404866d2f --- /dev/null +++ b/config/arm/armv8_machine.py @@ -0,0 +1,18 @@ +#!/usr/bin/python +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Cavium, Inc + +ident = [] +fname = '/sys/devices/system/cpu/cpu0/regs/identification/midr_el1' +with open(fname) as f: + content = f.read() + +midr_el1 = (int(content.rstrip('\n'), 16)) + +ident.append(hex((midr_el1 >> 24) & 0xFF)) # Implementer +ident.append(hex((midr_el1 >> 20) & 0xF)) # Variant +ident.append(hex((midr_el1 >> 16) & 0XF)) # Architecture +ident.append(hex((midr_el1 >> 4) & 0xFFF)) # Primary Part number +ident.append(hex(midr_el1 & 0xF)) # Revision + +print(' '.join(ident)) diff --git a/config/arm/meson.build b/config/arm/meson.build index f05de4c2c..a5bfb9610 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -5,28 +5,110 @@ # for checking defines we need to use the correct compiler flags march_opt = '-march=@0@'.format(machine) -dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) -if cc.sizeof('void *') == 8 - dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) - dpdk_conf.set('RTE_ARCH_ARM64', 1) - dpdk_conf.set('RTE_ARCH_64', 1) +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']]] +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['0xa1', ['-mcpu=thunderxt88']], + ['0xa2', ['-mcpu=thunderxt81']], + ['0xa3', ['-mcpu=thunderxt83']]] + +flags_generic = [[]] +flags_cavium = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_CACHE_LINE_SIZE', 128], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 96], + ['RTE_MAX_VFIO_GROUPS', 128], + ['RTE_RING_USE_C11_MEM_MODEL', false]] + +impl_generic = ['Generic armv8', flags_generic, machine_args_generic] +impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium] + +if cc.get_define('__clang__') != '' + dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'clang') + dpdk_conf.set('RTE_TOOLCHAIN_CLANG', 1) else + dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'gcc') + dpdk_conf.set('RTE_TOOLCHAIN_GCC', 1) +endif + +dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) + +if cc.sizeof('void *') != 8 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64) dpdk_conf.set('RTE_ARCH_ARM', 1) dpdk_conf.set('RTE_ARCH_ARMv7', 1) +else + dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) + dpdk_conf.set('RTE_ARCH_ARM64', 1) + dpdk_conf.set('RTE_ARCH_64', 1) + + machine = [] + cmd_generic = ['generic', '', '', 'default', ''] + cmd_output = cmd_generic # Set generic by default + machine_args = [] # Clear previous machine args + if not meson.is_cross_build() + # The script returns ['Implementer', 'Variant', 'Architecture', + # 'Primary Part number', 'Revision'] + detect_vendor = find_program(join_paths( + meson.current_source_dir(), 'armv8_machine.py')) + cmd = run_command(detect_vendor.path()) + if cmd.returncode() == 0 + cmd_output = cmd.stdout().strip().split(' ') + endif + # Set to generic if variable is not found + machine = get_variable('impl_' + cmd_output[0], 'generic') + else + impl_id = meson.get_cross_property('implementor_id', 'generic') + machine = get_variable('impl_' + impl_id) + endif + + if machine == 'generic' + machine = impl_generic + cmd_output = cmd_generic + endif + + message('Implementer : ' + machine[0]) + foreach flag: machine[1] + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeach + # Primary part number based mcpu flags are supported + # for gcc versions > 7 + if cc.version().version_compare( + '<7.0') or cmd_output.length() == 0 + foreach marg: machine[2] + if marg[0] == 'default' + foreach f: marg[1] + machine_args += f + endforeach + endif + endforeach + else + foreach marg: machine[2] + if marg[0] == cmd_output[3] + foreach f: marg[1] + machine_args += f + endforeach + endif + endforeach + endif endif +message(machine_args) -if cc.get_define('__ARM_NEON', args: march_opt) != '' +if cc.get_define('__ARM_NEON', args: machine_args) != '' dpdk_conf.set('RTE_MACHINE_CPUFLAG_NEON', 1) compile_time_cpuflags += ['RTE_CPUFLAG_NEON'] endif -if cc.get_define('__ARM_FEATURE_CRC32', args: march_opt) != '' +if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != '' dpdk_conf.set('RTE_MACHINE_CPUFLAG_CRC32', 1) compile_time_cpuflags += ['RTE_CPUFLAG_CRC32'] endif -if cc.get_define('__ARM_FEATURE_CRYPTO', args: march_opt) != '' +if cc.get_define('__ARM_FEATURE_CRYPTO', args: machine_args) != '' dpdk_conf.set('RTE_MACHINE_CPUFLAG_AES', 1) dpdk_conf.set('RTE_MACHINE_CPUFLAG_PMULL', 1) dpdk_conf.set('RTE_MACHINE_CPUFLAG_SHA1', 1) diff --git a/config/meson.build b/config/meson.build index fa55c53a5..f8c67578d 100644 --- a/config/meson.build +++ b/config/meson.build @@ -8,7 +8,8 @@ else machine = get_option('machine') endif dpdk_conf.set('RTE_MACHINE', machine) -machine_arg = '-march=' + machine +machine_args = [] +machine_args += '-march=' + machine # use pthreads add_project_link_arguments('-pthread', language: 'c') @@ -53,6 +54,14 @@ foreach arg: warning_flags endif endforeach +# set other values pulled from the build options +dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores')) +dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes')) +dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) +dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id')) +# values which have defaults which may be overridden +dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) + compile_time_cpuflags = [] if host_machine.cpu_family().startswith('x86') arch_subdir = 'x86' @@ -65,12 +74,4 @@ dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) # set the install path for the drivers dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path) -# set other values pulled from the build options -dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores')) -dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes')) -dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) -dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id')) -# values which have defaults which may be overridden -dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) - install_headers('rte_config.h', subdir: get_option('include_subdir_arch')) diff --git a/drivers/meson.build b/drivers/meson.build index 26dfe72a2..604384f07 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -27,7 +27,7 @@ foreach class:driver_classes version = 1 sources = [] objs = [] - cflags = [machine_arg] + cflags = machine_args includes = [include_directories(drv_path)] # set up internal deps. Drivers can append/override as necessary deps = std_deps diff --git a/examples/meson.build b/examples/meson.build index 0abed7169..b3f997242 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -9,7 +9,7 @@ endif foreach example: get_option('examples').split(',') name = example sources = [] - cflags = [machine_arg] + cflags = machine_args ext_deps = [] includes = [include_directories(example)] deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline'] diff --git a/lib/meson.build b/lib/meson.build index 6c062556e..7cdf3332a 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -32,7 +32,7 @@ foreach l:libraries sources = [] headers = [] includes = [] - cflags = [machine_arg] + cflags = machine_args objs = [] # other object files to link against, used e.g. for # instruction-set optimized versions of code diff --git a/meson.build b/meson.build index e63144490..b41cc812e 100644 --- a/meson.build +++ b/meson.build @@ -66,5 +66,5 @@ pkg.generate(name: meson.project_name(), ['-Wl,-Bdynamic'] + dpdk_extra_ldflags, description: 'The Data Plane Development Kit (DPDK)', subdirs: [get_option('include_subdir_arch'), '.'], - extra_cflags: ['-include "rte_config.h"', machine_arg] + extra_cflags: ['-include "rte_config.h"'] + machine_args ) diff --git a/test/test/meson.build b/test/test/meson.build index 2501b59d4..fb6079d86 100644 --- a/test/test/meson.build +++ b/test/test/meson.build @@ -202,7 +202,7 @@ if get_option('tests') test_sources, link_whole: link_libs, dependencies: test_dep_objs, - c_args: machine_arg, + c_args: machine_args, install_rpath: driver_install_path, install: false) -- 2.16.0