From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 277D6A0C43;
	Thu, 21 Oct 2021 22:14:53 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id A872A40040;
	Thu, 21 Oct 2021 22:14:52 +0200 (CEST)
Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com
 [66.111.4.221]) by mails.dpdk.org (Postfix) with ESMTP id 477804003F
 for <dev@dpdk.org>; Thu, 21 Oct 2021 22:14:51 +0200 (CEST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailnew.nyi.internal (Postfix) with ESMTP id D738E581311;
 Thu, 21 Oct 2021 16:14:50 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Thu, 21 Oct 2021 16:14:50 -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=fm2; bh=
 LI2Rfeiu+8Jd+I17LJH2amUYsJvwphHSm/srItLC96Y=; b=uGc6GKwpvVuhMLy/
 BXU5e88yO/BTabYtx2ZQ2ekfmEmVreeZKB70wcONZIDg3l+ynSC+GI4RW4wOyCL1
 NlJlhRVGfb/mrawBABhl6OTXi4tsZC4wFehn9QFhiU5RXBJXXk1zD7JlN6ULDA9L
 nHOxvklf7aho44euov67sGifFkRoeMD0I9RKYondklc0Rr7lRo9xUg440T+wGIhU
 Rww0spei/ZiCltu22h0lV3I/Ge3f0nwW014qDaWYZ9bqIrVbUC3jOs02uP1qhlHF
 d6pWddunrCHF82G+RtAVsMtgDi3S4eKDyMRhWnfSY2pcHcRT8LP4SGcoT99AuDPj
 79PwVg==
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=fm1; bh=LI2Rfeiu+8Jd+I17LJH2amUYsJvwphHSm/srItLC9
 6Y=; b=Hi6MAI+8NofL+fiiUyBI8THjJANnU3TBIBQf5mNGo1AOfz36qZYWrS1oZ
 q913Qf/irQUz6zAVugilqo847QBvQjvieOH6/zSAPCAOPan1nKY94ab0HwODv05+
 aA9zjvRd6NH5GTKvNnx6JrMR3l3cxXuRLURNA27VY+d0pvNT8VUs2Ti5uGZJtq5D
 1bTSOkkGlDvDUW8JI6SrXFfqAcMAh6o0d2ErJrkx2A/2f+RgpOUf7jqdvb+7tpPY
 zDJKzs08d5npDLAnCcsa3nKE43CAuHQAhJsSix68iUHayfvLO1MHGZw0tF+2CNCy
 KO0HHClM+vWJJD/mJXEuaAO54lUtQ==
X-ME-Sender: <xms:OspxYViRBoZQLgWZgh6D2IGHciuYw1b1fVdF-pauteUiyJVi1sS1rw>
 <xme:OspxYaAOd4zEEMmHoaM2ZBx70roFvj644BQdZqL0mWQPrnvssrxbgCJwmaIUsc8Of
 KLQSBokK1l4lC7LAw>
X-ME-Received: <xmr:OspxYVFStfit_hdNdzsWoERC-kovjtNA8Rg-eY1a6pH1rSWr6KZqFSPSkjqIOs7ene6CJn6eRynjlXErzZQaJc7Zpw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddviedgudeghecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej
 ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:OspxYaQ-uDJ0WHfmqzz2Vuud0XED4xzjZi2MzxL9xButBrbiyLLVMw>
 <xmx:OspxYSzILVSYHhjRbvEb0nXIwTJnCtyyy6vDI7e5Fumt1L4Qgsq0BA>
 <xmx:OspxYQ5fzCrZZ7njQsAQG2ClVPI4pMhJUc2oBXOE0misF47Q86wqBQ>
 <xmx:OspxYXq9hn_7dG2I1UbLt9rsn56IblsBoMqjhYpci0cCDFV_8aaNXQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 21 Oct 2021 16:14:49 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: keesang.song@amd.com, Aman Kumar <aman.kumar@vvdntech.in>
Cc: dev@dpdk.org, rasland@nvidia.com, asafp@nvidia.com, shys@nvidia.com,
 viacheslavo@nvidia.com, akozyrev@nvidia.com, matan@nvidia.com,
 anatoly.burakov@intel.com, jerinjacobk@gmail.com, bruce.richardson@intel.com
Date: Thu, 21 Oct 2021 22:14:47 +0200
Message-ID: <2479122.cfcLeCfLrI@thomas>
In-Reply-To: <20211019104724.19416-1-aman.kumar@vvdntech.in>
References: <20210823084411.29592-1-aman.kumar@vvdntech.in>
 <20211019104724.19416-1-aman.kumar@vvdntech.in>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v2 1/2] lib/eal: add amd epyc2 memcpy routine
 to eal
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

19/10/2021 12:47, Aman Kumar:
> This patch provides rte_memcpy* calls optimized for
> AMD EPYC platforms. Use config/x86/x86_amd_epyc_linux_gcc
> as cross-file with meson to build dpdk for AMD EPYC platforms.
[...]
> --- a/config/x86/meson.build
> +++ b/config/x86/meson.build
> @@ -72,3 +72,10 @@ endif
>  dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
>  dpdk_conf.set('RTE_MAX_LCORE', 128)
>  dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
> +
> +if meson.is_cross_build()
> +	if meson.get_cross_property('platform') == 'amd-epyc'
> +	    dpdk_conf.set('RTE_MAX_LCORE', 512)
> +	    dpdk_conf.set('RTE_MEMCPY_AMDEPYC', 1)
> +	endif
> +endif

Thinking again about the cross file.
Why not using the meson option "cpu_instruction_set"
to define RTE_MACHINE as "epyc" and tune other compilation options
without using artificial cross build?

Reminder, the default in config/meson.build is:
if cpu_instruction_set == 'generic'
    if host_machine.cpu_family().startswith('x86')
        cpu_instruction_set = 'corei7'

Cc Bruce who maintains this meson code.