DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Anand Rawat <anand.rawat@intel.com>,
	dev@dpdk.org, pallavi.kadam@intel.com, jeffrey.b.shaw@intel.com,
	ranjit.menon@intel.com
Subject: Re: [dpdk-dev] [PATCH 1/6] eal: eal stub to add windows support
Date: Fri, 1 Mar 2019 14:17:17 +0000	[thread overview]
Message-ID: <20190301141717.GA325020@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <1633455.prhy9BIAj0@xps>

On Fri, Mar 01, 2019 at 03:03:02PM +0100, Thomas Monjalon wrote:
> 01/03/2019 08:18, Anand Rawat:
> > Added initial stub source files for windows support and meson changes
> > to build them.
> 
> Thanks for sending some new patches based on meson.
> 
> Let's start review with some simple considerations.
> 
> > Signed-off-by: Anand Rawat <anand.rawat@intel.com> Signed-off-by:
> > Kadam, Pallavi <pallavi.kadam@intel.com>
> 
> Please avoid comma in names.  I think the right name is Pallavi Kadam?
> 
> > Reviewed-by: Jeffrey B Shaw <jeffrey.b.shaw@intel.com> Reviewed-by:
> > Ranjit Menon <ranjit.menon@intel.com>
> 
> Please make sure everybody involved here is in Cc of the emails.  Git
> should add them automatically.  Please add me as Cc of next versions. I'm
> interested in the start of the Windows port. Thanks
> 
> [...]
> > -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2019 Intel
> > Corporation
> 
> I'm not sure you need to update the dates.  In case you need to, you
> should probably keep the original date.
> 
> > -# use pthreads -add_project_link_arguments('-pthread', language: 'c')
> > -dpdk_extra_ldflags += '-pthread' +if host_machine.system() !=
> > 'windows' +	# use pthreads + add_project_link_arguments('-pthread',
> > language: 'c') + dpdk_extra_ldflags += '-pthread'
> 
> Why pthreads is not used in Windows?
> 
> > -# some libs depend on maths lib -add_project_link_arguments('-lm',
> > language: 'c') -dpdk_extra_ldflags += '-lm' +	# some libs depend
> > on maths lib +	add_project_link_arguments('-lm', language: 'c') +
> > dpdk_extra_ldflags += '-lm' +endif
> 
> Why libmath is not used?
> 
> >  # get binutils version for the workaround of Bug 97 -ldver =
> >  run_command('ld', '-v').stdout().strip() -if ldver.contains('2.30') -
> >  if cc.has_argument('-mno-avx512f') -		march_opt +=
> >  '-mno-avx512f' -		message('Binutils 2.30 detected, disabling
> >  AVX512 support as workaround for bug #97') +if host_machine.system()
> >  != 'windows'
> 
> The real fix should be to check which linker is selected by meson.
> 
> > +	ldver = run_command('ld', '-v').stdout().strip() +	if
> > ldver.contains('2.30') +		if cc.has_argument('-mno-avx512f')
> > +			march_opt += '-mno-avx512f' + message('Binutils
> > 2.30 detected, disabling AVX512 support as workaround for bug #97') +
> > endif
> 
> [...]
> > --- a/lib/librte_eal/common/include/arch/x86/meson.build +++
> > b/lib/librte_eal/common/include/arch/x86/meson.build -install_headers(
> > -	'rte_atomic_32.h', -	'rte_atomic_64.h', -	'rte_atomic.h', -
> > 'rte_byteorder_32.h', -	'rte_byteorder_64.h', -	'rte_byteorder.h',
> > -	'rte_cpuflags.h', -	'rte_cycles.h', -	'rte_io.h', -
> > 'rte_memcpy.h', -	'rte_prefetch.h', -	'rte_pause.h', -
> > 'rte_rtm.h', -	'rte_rwlock.h', -	'rte_spinlock.h', -
> > 'rte_vect.h', -	subdir: get_option('include_subdir_arch')) +if
> > host_machine.system() != 'windows' +	install_headers( +
> > 'rte_atomic_32.h', +		'rte_atomic_64.h', +
> > 'rte_atomic.h', +		'rte_byteorder_32.h', +
> > 'rte_byteorder_64.h', +		'rte_byteorder.h', +
> > 'rte_cpuflags.h', +		'rte_cycles.h', +		'rte_io.h',
> > +		'rte_memcpy.h', +		'rte_prefetch.h', +
> > 'rte_pause.h', +		'rte_rtm.h', +		'rte_rwlock.h', +
> > 'rte_spinlock.h', +		'rte_vect.h', +		subdir:
> > get_option('include_subdir_arch') +	) +endif
> 
> The headers should not be different for Windows.  NACK for this part.
> 
> [...]
> > @@ -17,13 +17,19 @@ elif host_machine.system() == 'freebsd'
> > dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1) subdir('bsdapp/eal')
> >  
> > +elif host_machine.system() == 'windows' +
> > dpdk_conf.set('RTE_EXEC_ENV_WINDOWS', 1)
> 
> For consistency, it should RTE_EXEC_ENV_WINAPP.
> 
For this one you can partially blame me - early internal review suggested
changing to winapp, but I suggested holding off on the change for community
consensus. Personally, I  would prefer a little inconsistency and keep it
as windows for clarity. In future, I also think we should just rename
linxuapp to linux, and bsdapp to freebsd!

However, for now, if the majority prefer winapp, I'm ok with it. [Though I
can't help reading it as winamp half the time! No llamas involved here
though!]

/Bruce

  reply	other threads:[~2019-03-01 14:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01  7:18 [dpdk-dev] [PATCH 0/6] HelloWorld example for Windows Anand Rawat
2019-03-01  7:18 ` [dpdk-dev] [PATCH 1/6] eal: eal stub to add windows support Anand Rawat
2019-03-01 14:03   ` Thomas Monjalon
2019-03-01 14:17     ` Bruce Richardson [this message]
2019-03-01 14:30       ` Thomas Monjalon
2019-03-01 15:19       ` Luca Boccassi
2019-03-01  7:18 ` [dpdk-dev] [PATCH 2/6] eal: Add header files to support windows Anand Rawat
2019-03-01  7:18 ` [dpdk-dev] [PATCH 3/6] eal: Add headers for compatibility with windows environment Anand Rawat
2019-03-01  7:18 ` [dpdk-dev] [PATCH 4/6] eal: add minimum viable code for eal on windows Anand Rawat
2019-03-01  7:18 ` [dpdk-dev] [PATCH 5/6] examples: Add meson changes for windows Anand Rawat
2019-03-01  7:18 ` [dpdk-dev] [PATCH 6/6] doc: add documention " Anand Rawat
2019-03-01 19:02   ` Stephen Hemminger
2019-03-02  2:41     ` Ranjit Menon
2019-03-06  8:33       ` Thomas Monjalon
2019-03-01 13:47 ` [dpdk-dev] [PATCH 0/6] HelloWorld example for Windows Bruce Richardson
2019-03-04 10:13   ` David Marchand
2019-03-04 10:14     ` David Marchand
2019-03-05 23:43     ` Anand Rawat

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=20190301141717.GA325020@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anand.rawat@intel.com \
    --cc=dev@dpdk.org \
    --cc=jeffrey.b.shaw@intel.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=thomas@monjalon.net \
    /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).