DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: Herbert Guan <Herbert.Guan@arm.com>,
	"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	harry.van.haaren@intel.com,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v4 2/2] build: add support for detecting march on ARM
Date: Mon, 22 Jan 2018 12:46:52 +0530	[thread overview]
Message-ID: <20180122071651.42q4moppnroivdbm@Pavan-LT> (raw)
In-Reply-To: <HE1PR08MB2809D0E32A6066980F35D93886EC0@HE1PR08MB2809.eurprd08.prod.outlook.com>

Hi Herbert,

Thanks for the review, will add a default entry for generic arm.

On Mon, Jan 22, 2018 at 05:52:36AM +0000, Herbert Guan wrote:
> Hi, Pavan
>
> Please see my notes inline.
>
> Best regards,
> Herbert
>
> > -----Original Message-----
> > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com]
> > Sent: Saturday, January 20, 2018 2:24
> > To: jerin.jacob@caviumnetworks.com; bruce.richardson@intel.com;
> > harry.van.haaren@intel.com; Herbert Guan <Herbert.Guan@arm.com>;
> > hemant.agrawal@nxp.com
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH v4 2/2] build: add support for detecting march
> > on ARM
> >
> > 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 <pbhagavatula@caviumnetworks.com>
> > ---
<snip>
> > +impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium]
>
> There're only Cavimu args/flags defined, so other arm/arm64 platforms will fail at detecting.  Can you add one entry for default?
>
> > +
> > +dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'gcc')
> > +dpdk_conf.set('RTE_TOOLCHAIN_GCC', 1)
> >  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)
> > -else
> > +
> > +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)
> > +
> > +	if not meson.is_cross_build()
> > +		# The script returns ['Implementor', '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
> > +			message('Using default armv8 config')
> > +		else
> > +			machine_args = [] # Clear previous machine args
> > +			cmd_output = cmd.stdout().strip().split(' ')
> > +			machine = get_variable('impl_' + cmd_output[0])
>
> Script will fail for non-cavium Arm platforms.  We need to check if cmd_output[0] is a known value in a list, otherwise should go to default entry.
>
> > +			message('Implementor : ' + machine[0])
> > +

  reply	other threads:[~2018-01-22  7:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 10:53 [dpdk-dev] [RFC PATCH] RFC build: prototype support for ARM builds Bruce Richardson
2017-12-19 13:27 ` Luca Boccassi
2017-12-19 14:17   ` Bruce Richardson
2018-01-19 13:05 ` [dpdk-dev] [PATCH v2 1/2] build: add " Pavan Nikhilesh
2018-01-19 13:05   ` [dpdk-dev] [PATCH v2 2/2] build: add support for detecting march on ARM Pavan Nikhilesh
2018-01-19 13:52 ` [dpdk-dev] [PATCH v3 1/2] build: add support for ARM builds Pavan Nikhilesh
2018-01-19 13:52   ` [dpdk-dev] [PATCH v3 2/2] build: add support for detecting march on ARM Pavan Nikhilesh
2018-01-19 16:17     ` Bruce Richardson
2018-01-19 17:13       ` Pavan Nikhilesh
2018-01-19 17:30         ` Bruce Richardson
2018-01-19 16:24   ` [dpdk-dev] [PATCH v3 1/2] build: add support for ARM builds Bruce Richardson
2018-01-19 16:49     ` Hemant Agrawal
2018-01-19 17:33       ` Bruce Richardson
2018-01-19 18:23 ` [dpdk-dev] [PATCH v4 " Pavan Nikhilesh
2018-01-19 18:23   ` [dpdk-dev] [PATCH v4 2/2] build: add support for detecting march on ARM Pavan Nikhilesh
2018-01-22  5:52     ` Herbert Guan
2018-01-22  7:16       ` Pavan Nikhilesh [this message]
2018-01-22 11:46 ` [dpdk-dev] [PATCH v5 1/2] build: add support for ARM builds Pavan Nikhilesh
2018-01-22 11:46   ` [dpdk-dev] [PATCH v5 2/2] build: add support for detecting march on ARM Pavan Nikhilesh
2018-01-22 12:30     ` Bruce Richardson
2018-01-22 12:37       ` Pavan Nikhilesh
2018-01-22 14:09         ` Bruce Richardson
2018-01-22 14:44           ` Pavan Nikhilesh
2018-01-22 15:26 ` [dpdk-dev] [PATCH v6 1/4] build: add support for ARM builds Pavan Nikhilesh
2018-01-22 15:26   ` [dpdk-dev] [PATCH v6 2/4] build: add support for detecting march on ARM Pavan Nikhilesh
2018-01-22 15:26   ` [dpdk-dev] [PATCH v6 3/4] build: add support for vendor specific ARM cross builds Pavan Nikhilesh
2018-01-22 15:26   ` [dpdk-dev] [PATCH v6 4/4] doc: add instructions to cross compile using meson Pavan Nikhilesh
2018-01-22 16:10   ` [dpdk-dev] [PATCH v6 1/4] build: add support for ARM builds Bruce Richardson
2018-01-22 16:20   ` Jerin Jacob
2018-01-22 16:26     ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180122071651.42q4moppnroivdbm@Pavan-LT \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=Herbert.Guan@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).