From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 5BD373772 for ; Fri, 12 Apr 2019 01:37:28 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A460320A70; Thu, 11 Apr 2019 19:37:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 11 Apr 2019 19:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=qFMoBmtrg4K8TGBXoFWfC7V5TmbAgk06KkRjbXYwoCs=; b=fhsb4YVBuGw1 qCvLhJczNsez7Y/NaKNHBEXuG4hX/KPoIdg/V5Giy//ZjuvnWBkrhwFCPmM0muAU j+nSyBJTEwco8Qq8y9ibAjw+LRk7Z0MMvpOVI3zrUah9TaY6K57DXSYP74omnOZd q3vuKOMGB/oXclolLgQWQxUOTmsCqjg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qFMoBmtrg4K8TGBXoFWfC7V5TmbAgk06KkRjbXYwo Cs=; b=j5G2TDoGIaTJnS3Ar396lvuuFESlwDl7paZIB/Xrv26DmuENw/sQf4odo Dijr51Nyez27XTwRd69HuKO/VcsfYvF5+/kptsUnfcE7w79x+m4z1TwNpKoEPpKV NXCck2G27wsZTXpr99lMDa3PwrtsjwKzfvmZOeaptap/Kp5cnvwmOuHFX76l5OW2 1VjTcuUd5TmTIgvA8lZImYqt/DBg+11ZB4TNvgJwTIIZfLRE/c7Jc1zujfzrOuLn 387rsV4gp8OrsLZQngEikvRB57z2Z3j4umr8Euywy8OQqnOF3Q3lB68lfRJJNrAF OAwPqqJVHTGPmXDW1GNh0rMQYyjGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrvddtgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4BB4510390; Thu, 11 Apr 2019 19:37:25 -0400 (EDT) From: Thomas Monjalon To: Pavan Nikhilesh , Jerin Jacob Cc: dev@dpdk.org, jerinjacobk@gmail.com, yskoh@mellanox.com, bruce.richardson@intel.com Date: Fri, 12 Apr 2019 01:37:24 +0200 Message-ID: <7046361.HPUSkOkSIl@xps> In-Reply-To: <20190410161400.9361-2-jerinj@marvell.com> References: <20190406142737.20091-1-jerinj@marvell.com> <20190410161400.9361-1-jerinj@marvell.com> <20190410161400.9361-2-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 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: Thu, 11 Apr 2019 23:37:28 -0000 10/04/2019 18:13, jerinjacobk@gmail.com: > 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. I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess. [...] > flags_common_default = [ > # 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 > @@ -52,12 +33,10 @@ flags_generic = [ > ['RTE_USE_C11_MEM_MODEL', true], > ['RTE_CACHE_LINE_SIZE', 128]] > 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_USE_C11_MEM_MODEL', false]] > + ['RTE_MAX_VFIO_GROUPS', 128]] > flags_dpaa = [ > ['RTE_MACHINE', '"dpaa"'], > ['RTE_USE_C11_MEM_MODEL', true], > @@ -71,6 +50,27 @@ flags_dpaa2 = [ > ['RTE_MAX_NUMA_NODES', 1], > ['RTE_MAX_LCORE', 16], > ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] > +flags_default_extra = [] > +flags_thunderx_extra = [ > + ['RTE_MACHINE', '"thunderx"'], > + ['RTE_USE_C11_MEM_MODEL', false]] > + > +machine_args_generic = [ > + ['default', ['-march=armv8-a+crc+crypto']], > + ['native', ['-march=native']], > + ['0xd03', ['-mcpu=cortex-a53']], > + ['0xd04', ['-mcpu=cortex-a35']], > + ['0xd07', ['-mcpu=cortex-a57']], > + ['0xd08', ['-mcpu=cortex-a72']], > + ['0xd09', ['-mcpu=cortex-a73']], > + ['0xd0a', ['-mcpu=cortex-a75']]] > + > +machine_args_cavium = [ > + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], > + ['native', ['-march=native']], > + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], > + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], > + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] I think we should have a simpler model. We need only to know the machine name and get all the related machine config. In native compilation, machine name is guessed from implementor id and pn (from config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script. In the cross-compilation config files (config/arm/*), we can just specify the machine name. Then every machine config (machine_args and dpdk_conf) would be specified in some arrays based on the machine name. Of course, we can keep some common default values. Thoughts? 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 23B77A0096 for ; Fri, 12 Apr 2019 01:37:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A18B44C3; Fri, 12 Apr 2019 01:37:29 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 5BD373772 for ; Fri, 12 Apr 2019 01:37:28 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A460320A70; Thu, 11 Apr 2019 19:37:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 11 Apr 2019 19:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=qFMoBmtrg4K8TGBXoFWfC7V5TmbAgk06KkRjbXYwoCs=; b=fhsb4YVBuGw1 qCvLhJczNsez7Y/NaKNHBEXuG4hX/KPoIdg/V5Giy//ZjuvnWBkrhwFCPmM0muAU j+nSyBJTEwco8Qq8y9ibAjw+LRk7Z0MMvpOVI3zrUah9TaY6K57DXSYP74omnOZd q3vuKOMGB/oXclolLgQWQxUOTmsCqjg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qFMoBmtrg4K8TGBXoFWfC7V5TmbAgk06KkRjbXYwo Cs=; b=j5G2TDoGIaTJnS3Ar396lvuuFESlwDl7paZIB/Xrv26DmuENw/sQf4odo Dijr51Nyez27XTwRd69HuKO/VcsfYvF5+/kptsUnfcE7w79x+m4z1TwNpKoEPpKV NXCck2G27wsZTXpr99lMDa3PwrtsjwKzfvmZOeaptap/Kp5cnvwmOuHFX76l5OW2 1VjTcuUd5TmTIgvA8lZImYqt/DBg+11ZB4TNvgJwTIIZfLRE/c7Jc1zujfzrOuLn 387rsV4gp8OrsLZQngEikvRB57z2Z3j4umr8Euywy8OQqnOF3Q3lB68lfRJJNrAF OAwPqqJVHTGPmXDW1GNh0rMQYyjGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrvddtgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4BB4510390; Thu, 11 Apr 2019 19:37:25 -0400 (EDT) From: Thomas Monjalon To: Pavan Nikhilesh , Jerin Jacob Cc: dev@dpdk.org, jerinjacobk@gmail.com, yskoh@mellanox.com, bruce.richardson@intel.com Date: Fri, 12 Apr 2019 01:37:24 +0200 Message-ID: <7046361.HPUSkOkSIl@xps> In-Reply-To: <20190410161400.9361-2-jerinj@marvell.com> References: <20190406142737.20091-1-jerinj@marvell.com> <20190410161400.9361-1-jerinj@marvell.com> <20190410161400.9361-2-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v8 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: <20190411233724.rDpqO3H8uqoXlniMv1I-MP-mmMWvfqpSq6C6zgfrh80@z> 10/04/2019 18:13, jerinjacobk@gmail.com: > 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. I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess. [...] > flags_common_default = [ > # 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 > @@ -52,12 +33,10 @@ flags_generic = [ > ['RTE_USE_C11_MEM_MODEL', true], > ['RTE_CACHE_LINE_SIZE', 128]] > 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_USE_C11_MEM_MODEL', false]] > + ['RTE_MAX_VFIO_GROUPS', 128]] > flags_dpaa = [ > ['RTE_MACHINE', '"dpaa"'], > ['RTE_USE_C11_MEM_MODEL', true], > @@ -71,6 +50,27 @@ flags_dpaa2 = [ > ['RTE_MAX_NUMA_NODES', 1], > ['RTE_MAX_LCORE', 16], > ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] > +flags_default_extra = [] > +flags_thunderx_extra = [ > + ['RTE_MACHINE', '"thunderx"'], > + ['RTE_USE_C11_MEM_MODEL', false]] > + > +machine_args_generic = [ > + ['default', ['-march=armv8-a+crc+crypto']], > + ['native', ['-march=native']], > + ['0xd03', ['-mcpu=cortex-a53']], > + ['0xd04', ['-mcpu=cortex-a35']], > + ['0xd07', ['-mcpu=cortex-a57']], > + ['0xd08', ['-mcpu=cortex-a72']], > + ['0xd09', ['-mcpu=cortex-a73']], > + ['0xd0a', ['-mcpu=cortex-a75']]] > + > +machine_args_cavium = [ > + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], > + ['native', ['-march=native']], > + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], > + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], > + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] I think we should have a simpler model. We need only to know the machine name and get all the related machine config. In native compilation, machine name is guessed from implementor id and pn (from config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script. In the cross-compilation config files (config/arm/*), we can just specify the machine name. Then every machine config (machine_args and dpdk_conf) would be specified in some arrays based on the machine name. Of course, we can keep some common default values. Thoughts?