From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0054.outbound.protection.outlook.com [104.47.36.54]) by dpdk.org (Postfix) with ESMTP id F32181B2C9 for ; Fri, 19 Jan 2018 18:13:54 +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=8/IHera8DaT/sJFihaAExHdOoB6s2VJ3eavFiYTLYmU=; b=bp39Ga6U66h+Gaqz3iRDe3eFd2KXMkjlbg16rSV8eoWbG/A9xP5YX+QFkDb4/WHQu/wtEUM1royEasctYnBekqw3+g/rJBXt7+9RoJiCwrovIWodV5M/PEKGsh1quiRoprMWnvLLQoZAYfQirI5ZkpXg/XHhudzsHgFm0AlMOu8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (103.16.71.47) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 17:13:51 +0000 Date: Fri, 19 Jan 2018 22:43:31 +0530 From: Pavan Nikhilesh To: Bruce Richardson , jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, herbert.guan@arm.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org Message-ID: <20180119171330.l53eoeysdxshyrvx@Pavan-LT> References: <20171219105338.198727-1-bruce.richardson@intel.com> <20180119135251.10171-1-pbhagavatula@caviumnetworks.com> <20180119135251.10171-2-pbhagavatula@caviumnetworks.com> <20180119161741.GA16980@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180119161741.GA16980@bricha3-MOBL3.ger.corp.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR01CA0096.apcprd01.prod.exchangelabs.com (10.170.138.150) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b6edc106-804e-4e73-c618-08d55f600412 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:E533n2TdOiJ9w56tHFJp3Y+wvs7xGjEU5tCpuOlmD8cg0usywSMux77L53vDW+ZABbFd+mCSIKvm15YaMqCAoD9H/5Fa5ERIdW5YW/41OBFkZyM7rVeffkLRNNkRpH86OrSgs8M1oCjryeEwlJUVsozCrll54702zcORqRVB3JDNQiqpQH6htExlC9KbrRhOFHHNG2G8fnpVPPQXpwsj4I92LWXK/79T+z4a+2Fs0erT81DwQY8E0yg7Xybhf5MQ; 25:JaJt5GRzr3oKZc1PsVptdbnP2UMhW3v+O7+BkBU+zyxNEO5EgG7Dh0g6chN1M0VTpda35fHC+M2cJTCk0wXbir/F4de3Mf0hCQld7SAsQ04QupN4bDBwhyyRW1amDaPYFOee1T4lurdVDCmAKvKytU2xgdlX+ukikR4yB9GiKjbNIvHUw3wmu2oua4tirBjyXAmCSdcZgMd9naDwtMKFmXf6lf03D8whp65vO7DSJSC2xRW8xUN2L0zS+im4MamisxNkQjHaQw+drDScHJ24pd3Reyz06iGFplTMFRm/HJUuXz4lXVUyJ+IjScWQUGeF0EYZWTg6+n+leVpo0sPfhw==; 31:MTuSZJJXQduJxCHqm4pzkqTgFzxqRTibGEeQLqYsPfmFnm4iJ24vrrMVI3rDcn5QUYqsCtTj67oHrXq+G6iBek6gwDYv0x/p6+2jao1oIeDXbxuC4QB36/uFmSDr1USBS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ispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040495)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3231023)(2400080)(944501161)(3002001)(6041282)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 0557CBAD84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39850400004)(376002)(366004)(39380400002)(346002)(396003)(189003)(199004)(2906002)(105586002)(68736007)(5660300001)(8936002)(575784001)(9686003)(47776003)(55016002)(53936002)(58126008)(6666003)(97736004)(16586007)(316002)(83506002)(16526018)(26005)(93886005)(229853002)(8656006)(25786009)(33716001)(478600001)(1076002)(3846002)(81156014)(59450400001)(33896004)(76176011)(81166006)(42882006)(2950100002)(52116002)(6116002)(305945005)(8676002)(4326008)(72206003)(106356001)(6496006)(7736002)(50466002)(6246003)(23726003)(66066001)(386003)(107986001)(42262002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:Pavan-LT; 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; CY4PR07MB3462; 23:7M2YqKy575YM2MOxuqbxkqIiVmftsB0/wLzAvWKqA?= =?us-ascii?Q?6OrX3S+rgHod+s2Ba8KI/zZ7wST2TTYqCGhXMH10ARsjIVfjDeUzbOWRU8l1?= =?us-ascii?Q?uHzRcnDzHJSpO0RxAmIqnRl1YSNVk068LWCzBkEIQX4b93657335RfWYxpll?= =?us-ascii?Q?nmquCisnx+yRk3o4cGPHPRx6bKy18qaZth7fsD+FibGm0Pw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fZTHJEMwfo=; 7:ROY3g8AZwDpeWVstoQHhL6AxVsIYNoqv3jiUlS/Gz+iBQx5ZaS5pDqAPdsaCZDIQn4R4J4gZf45uhlb025P31764IOc1LfzlHmd00WHZSYa+Bw8L7p4x8ydDHeLWgzM0xSgQdC+fSVrXRmgFz51Tw1m+5OsmDIisHfQi4oqRfhz6UQeAzh0JUoqfihuUh18cTlHmLxQ4wmFrcq8+5N6+vnJeQzMiQ3OXoD+PXUvHgdglv8EQ2rhIty4wkbHOlsXi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 17:13:51.2318 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6edc106-804e-4e73-c618-08d55f600412 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: Re: [dpdk-dev] [PATCH v3 2/2] 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: Fri, 19 Jan 2018 17:13:55 -0000 On Fri, Jan 19, 2018 at 04:17:41PM +0000, Bruce Richardson wrote: > On Fri, Jan 19, 2018 at 07:22:51PM +0530, Pavan Nikhilesh wrote: > > 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-pmd/meson.build | 2 +- > > config/arm/armv8_machine.py | 18 +++++++++++ > > config/arm/meson.build | 76 ++++++++++++++++++++++++++++++++++++++++----- > > config/meson.build | 19 ++++++------ > > drivers/meson.build | 2 +- > > examples/meson.build | 2 +- > > lib/meson.build | 2 +- > > meson.build | 2 +- > > test/test/meson.build | 2 +- > > 9 files changed, 102 insertions(+), 23 deletions(-) > > create mode 100755 config/arm/armv8_machine.py > > > > 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..62af5e68a 100644 > > --- a/config/arm/meson.build > > +++ b/config/arm/meson.build > > @@ -5,28 +5,88 @@ > > # for checking defines we need to use the correct compiler flags > > march_opt = '-march=@0@'.format(machine) > > > > +machine_args_cavium = [ > > + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], > > + ['0xa1', ['-mcpu=thunderxt88']], > > + ['0xa2', ['-mcpu=thunderxt81']], > > + ['0xa3', ['-mcpu=thunderxt83']]] > > + > > +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_0x43 = ['Cavium', flags_cavium, machine_args_cavium] > > + > > +dpdk_conf.set('RTE_TOOLCHAIN', '"gcc"') > > dpdk_conf.set_quoted() is probably what you want here. Ah, will fix it in v4 > > > +dpdk_conf.set('RTE_TOOLCHAIN_GCC', 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) > > - > Is there a reason why these lines have been moved? I have moved them above so that they can be overridden by the arch specific scripts called by subdir(arch_subdir). Example RTE_MAX_VFIO_GROUPS needs to be 128 in thunderx. > Thanks, Pavan.