[dpdk-dev] [PATCH] spinlock:move constructor function out of header

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Jul 15 10:16:48 CEST 2016


2016-07-14 22:45, Wiles, Keith:
> > On Jul 14, 2016, at 2:59 PM, Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:
> > 
> > Thanks Keith for continuing work.
> > 
> > 2016-07-14 14:31, Keith Wiles:
> >> lib/librte_eal/bsdapp/eal/Makefile                 |  1 +
> >> lib/librte_eal/common/arch/arm/rte_spinlock.c      | 46 ++++++++++++++++++++++
> >> lib/librte_eal/common/arch/ppc_64/rte_spinlock.c   | 46 ++++++++++++++++++++++
> >> lib/librte_eal/common/arch/tile/rte_spinlock.c     | 46 ++++++++++++++++++++++
> >> lib/librte_eal/common/arch/x86/rte_spinlock.c      | 46 ++++++++++++++++++++++
> >> .../common/include/arch/x86/rte_spinlock.h         | 14 ++-----
> >> lib/librte_eal/linuxapp/eal/Makefile               |  1 +
> > 
> > I am not sure we should add a .c file for each arch, given it is called only
> > from arch/x86/rte_spinlock.h.
> 
> I did not like having the .c for everyone, but the previous comment seemed
> to suggest it. I am willing to change it any better method, just let me
> know what you think. I would like just one.

I will make sure it is not needed. In this case, we can keep the original
patch from Damjan and just do some trivial changes. I can make them quickly
before RC3.

> On a side note I have combined the bsdapp and linuxapp into a single
> directory before. It is doable and it eliminates a number of duplicate
> files or code.

Yes patches to remove duplicated code are welcome. But please do not
introduce more #ifdefs. I think it is better to keep separate directories
bsdapp/ and linuxapp/ while increasing the shared code in common/ as
much as possible.
Some functions are really different and are better handled separately.

> Plus a also added support for OS X for DPDK, but I do not have access
> to any NICs with that version yet other then virtual ones.
> I could submit it and may be someone will write the kext to make it work. :-)

Maybe that OS X would deserve a third separate directory.
I guess you wanted it only for dev testing?
Why not just use a Linux or FreeBSD VM?


More information about the dev mailing list