Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-12 Thread Mike Holmes
Thanks, I will post to the list

On 12 December 2016 at 04:31, Nicolas Morey-Chaisemartin 
wrote:

> I just had a quick look and it looks good to me.
>
> Nicolas
>
>
> Le 12/10/2016 à 08:29 PM, Mike Holmes a écrit :
>
> https://github.com/mike-holmes-linaro/odp/tree/helpers-os
>
> Helper lib now gets the default helper OS from the  platfrom in use via
> its configure.m4
>
> On 9 December 2016 at 08:45, Nicolas Morey-Chaisemartin 
> wrote:
>
>>
>>
>> Le 12/09/2016 à 02:41 PM, Mike Holmes a écrit :
>>
>>
>>
>> On 9 December 2016 at 08:33, Nicolas Morey-Chaisemartin > > wrote:
>>
>>>
>>>
>>> Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>>>
>>>
>>>
>>> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin <
>>> nmo...@kalray.eu> wrote:
>>>
 I'm OK with this. The only issue I have with this is that it moves back
 platform/OS selection back to configure.ac while I've been trying to
 move it out (https://github.com/nmorey/odp/tree/dev/generic-platforms).
 Shouldn't each platform select the right OS ?
 I mean linux-generic will probably always use the linux helper while
 the mppa implementation will use the right one for us (depending on the
 compilation flags).

>>>
>>> I would actually like to make the helpers much more independent so I am
>>> in line with your thinking.
>>> How about we just do exactly that and have helpers  build completely
>>> independently with its own configure.ac ?
>>>
>>>
>>> Won't the dependence from the platform test to the helper lib be an
>>> issue?
>>> Splitting them up might end in a circualt dependency.
>>>
>>
>> I am hoping to find and delete any circular dependencies that exist, the
>> helper should depend on the odp api, the tests and examples should depend
>> on the helpers
>>
>>
>>>
>>> Build ODP means building the tests which means building the helpers
>>> which need ODP to be built (for odp_cpumask_* functions at least).
>>>
>>> I'm not sure we really need to pull them out of the ODP build system,
>>> but simply keep the configure flexible enough so platforms can tweak/change
>>> the settings from the platform side.
>>>
>> Platform could add their own options in their configure.m4 if they need
>>> them, or simply select the basic helper setup and export the OS.
>>>
>>
>> Ok then I misunderstood this "Shouldn't each platform select the right OS
>> ?" - I agree it should.
>>
>> I added the selector "with_os" to the common configure.ac does that not
>> allow it to be changed by platform if we keep it all under one configure
>> setup? - perhaps it can be set in a per platform configure.m4 as you say, I
>> need to fiddle with that.
>>
>> Yes my bad. It works like that. configure.m4 should be able to adjust
>> settings depending on the option, or overwrite the value if they know
>> better.
>>
>>
>>
>>
>>>
>>>
>>>
>>>
>>>

 Also I think the lib should be renamed to libodphelper instead of
 libodphelper-linux.

>>>
>>> agree
>>>
>>>

 Any plans to get these patches in soon?

>>>
>>> with your help asap
>>>
>>>
 Should I wait for your patch to get in master, or get them in my patch
 series?

>>>
>>> Will work with you, let me make your suggested change to the lib and
>>> circle back with you on your first point.
>>>
>>> Glad to hear it :)
>>>
>>>
>>
>>
>> --
>> Mike Holmes
>> Program Manager - Linaro Networking Group
>> Linaro.org  *│ *Open source software for ARM SoCs
>> "Work should be fun and collaborative, the rest follows"
>>
>>
>>
>
>
> --
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org  *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-12 Thread Nicolas Morey-Chaisemartin
I just had a quick look and it looks good to me.

Nicolas

Le 12/10/2016 à 08:29 PM, Mike Holmes a écrit :
> https://github.com/mike-holmes-linaro/odp/tree/helpers-os 
> 
>
> Helper lib now gets the default helper OS from the  platfrom in use via its 
> configure.m4
>
> On 9 December 2016 at 08:45, Nicolas Morey-Chaisemartin  > wrote:
>
>
>
> Le 12/09/2016 à 02:41 PM, Mike Holmes a écrit :
>>
>>
>> On 9 December 2016 at 08:33, Nicolas Morey-Chaisemartin 
>> > wrote:
>>
>>
>>
>> Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>>>
>>>
>>> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin 
>>> > wrote:
>>>
>>> I'm OK with this. The only issue I have with this is that it 
>>> moves back platform/OS selection back to configure.ac  
>>> while I've been trying to move it out 
>>> (https://github.com/nmorey/odp/tree/dev/generic-platforms 
>>> ).
>>> Shouldn't each platform select the right OS ?
>>> I mean linux-generic will probably always use the linux helper 
>>> while the mppa implementation will use the right one for us (depending on 
>>> the compilation flags).
>>>
>>>
>>> I would actually like to make the helpers much more independent so 
>>> I am in line with your thinking.
>>> How about we just do exactly that and have helpers  build 
>>> completely independently with its own configure.ac  ?
>>
>> Won't the dependence from the platform test to the helper lib be an 
>> issue?
>> Splitting them up might end in a circualt dependency.
>>
>>
>> I am hoping to find and delete any circular dependencies that exist, the 
>> helper should depend on the odp api, the tests and examples should depend on 
>> the helpers
>>  
>>
>>
>> Build ODP means building the tests which means building the helpers 
>> which need ODP to be built (for odp_cpumask_* functions at least).
>>
>> I'm not sure we really need to pull them out of the ODP build 
>> system, but simply keep the configure flexible enough so platforms can 
>> tweak/change the settings from the platform side. 
>>
>> Platform could add their own options in their configure.m4 if they 
>> need them, or simply select the basic helper setup and export the OS.
>>
>>
>> Ok then I misunderstood this "Shouldn't each platform select the right 
>> OS ?" - I agree it should.
>>
>> I added the selector "with_os" to the common configure.ac 
>>  does that not allow it to be changed by platform if we 
>> keep it all under one configure setup? - perhaps it can be set in a per 
>> platform configure.m4 as you say, I need to fiddle with that.
> Yes my bad. It works like that. configure.m4 should be able to adjust 
> settings depending on the option, or overwrite the value if they know better.
>
>>
>>  
>>
>>
>>
>>
>>>  
>>>
>>>
>>> Also I think the lib should be renamed to libodphelper instead 
>>> of libodphelper-linux.
>>>
>>>
>>> agree
>>>  
>>>
>>>
>>> Any plans to get these patches in soon?
>>>
>>>
>>> with your help asap
>>>  
>>>
>>> Should I wait for your patch to get in master, or get them in 
>>> my patch series?
>>>
>>>
>>> Will work with you, let me make your suggested change to the lib 
>>> and circle back with you on your first point.
>> Glad to hear it :)
>>
>>
>>
>>
>> -- 
>> Mike Holmes
>> Program Manager - Linaro Networking Group
>> Linaro.org * **│ *Open source software for ARM 
>> SoCs
>> "Work should be fun and collaborative, the rest follows"
>>
>
>
>
>
> -- 
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org * **│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>



Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-10 Thread Mike Holmes
https://github.com/mike-holmes-linaro/odp/tree/helpers-os

Helper lib now gets the default helper OS from the  platfrom in use via its
configure.m4

On 9 December 2016 at 08:45, Nicolas Morey-Chaisemartin 
wrote:

>
>
> Le 12/09/2016 à 02:41 PM, Mike Holmes a écrit :
>
>
>
> On 9 December 2016 at 08:33, Nicolas Morey-Chaisemartin 
> wrote:
>
>>
>>
>> Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>>
>>
>>
>> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin > > wrote:
>>
>>> I'm OK with this. The only issue I have with this is that it moves back
>>> platform/OS selection back to configure.ac while I've been trying to
>>> move it out (https://github.com/nmorey/odp/tree/dev/generic-platforms).
>>> Shouldn't each platform select the right OS ?
>>> I mean linux-generic will probably always use the linux helper while the
>>> mppa implementation will use the right one for us (depending on the
>>> compilation flags).
>>>
>>
>> I would actually like to make the helpers much more independent so I am
>> in line with your thinking.
>> How about we just do exactly that and have helpers  build completely
>> independently with its own configure.ac ?
>>
>>
>> Won't the dependence from the platform test to the helper lib be an issue?
>> Splitting them up might end in a circualt dependency.
>>
>
> I am hoping to find and delete any circular dependencies that exist, the
> helper should depend on the odp api, the tests and examples should depend
> on the helpers
>
>
>>
>> Build ODP means building the tests which means building the helpers which
>> need ODP to be built (for odp_cpumask_* functions at least).
>>
>> I'm not sure we really need to pull them out of the ODP build system, but
>> simply keep the configure flexible enough so platforms can tweak/change the
>> settings from the platform side.
>>
> Platform could add their own options in their configure.m4 if they need
>> them, or simply select the basic helper setup and export the OS.
>>
>
> Ok then I misunderstood this "Shouldn't each platform select the right OS
> ?" - I agree it should.
>
> I added the selector "with_os" to the common configure.ac does that not
> allow it to be changed by platform if we keep it all under one configure
> setup? - perhaps it can be set in a per platform configure.m4 as you say, I
> need to fiddle with that.
>
> Yes my bad. It works like that. configure.m4 should be able to adjust
> settings depending on the option, or overwrite the value if they know
> better.
>
>
>
>
>>
>>
>>
>>
>>
>>>
>>> Also I think the lib should be renamed to libodphelper instead of
>>> libodphelper-linux.
>>>
>>
>> agree
>>
>>
>>>
>>> Any plans to get these patches in soon?
>>>
>>
>> with your help asap
>>
>>
>>> Should I wait for your patch to get in master, or get them in my patch
>>> series?
>>>
>>
>> Will work with you, let me make your suggested change to the lib and
>> circle back with you on your first point.
>>
>> Glad to hear it :)
>>
>>
>
>
> --
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org  *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-09 Thread Nicolas Morey-Chaisemartin


Le 12/09/2016 à 02:41 PM, Mike Holmes a écrit :
>
>
> On 9 December 2016 at 08:33, Nicolas Morey-Chaisemartin  > wrote:
>
>
>
> Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>>
>>
>> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin 
>> > wrote:
>>
>> I'm OK with this. The only issue I have with this is that it moves 
>> back platform/OS selection back to configure.ac  while 
>> I've been trying to move it out 
>> (https://github.com/nmorey/odp/tree/dev/generic-platforms 
>> ).
>> Shouldn't each platform select the right OS ?
>> I mean linux-generic will probably always use the linux helper while 
>> the mppa implementation will use the right one for us (depending on the 
>> compilation flags).
>>
>>
>> I would actually like to make the helpers much more independent so I am 
>> in line with your thinking.
>> How about we just do exactly that and have helpers  build completely 
>> independently with its own configure.ac  ?
>
> Won't the dependence from the platform test to the helper lib be an issue?
> Splitting them up might end in a circualt dependency.
>
>
> I am hoping to find and delete any circular dependencies that exist, the 
> helper should depend on the odp api, the tests and examples should depend on 
> the helpers
>  
>
>
> Build ODP means building the tests which means building the helpers which 
> need ODP to be built (for odp_cpumask_* functions at least).
>
> I'm not sure we really need to pull them out of the ODP build system, but 
> simply keep the configure flexible enough so platforms can tweak/change the 
> settings from the platform side. 
>
> Platform could add their own options in their configure.m4 if they need 
> them, or simply select the basic helper setup and export the OS.
>
>
> Ok then I misunderstood this "Shouldn't each platform select the right OS ?" 
> - I agree it should.
>
> I added the selector "with_os" to the common configure.ac 
>  does that not allow it to be changed by platform if we 
> keep it all under one configure setup? - perhaps it can be set in a per 
> platform configure.m4 as you say, I need to fiddle with that.
Yes my bad. It works like that. configure.m4 should be able to adjust settings 
depending on the option, or overwrite the value if they know better.

>
>  
>
>
>
>
>>  
>>
>>
>> Also I think the lib should be renamed to libodphelper instead of 
>> libodphelper-linux.
>>
>>
>> agree
>>  
>>
>>
>> Any plans to get these patches in soon?
>>
>>
>> with your help asap
>>  
>>
>> Should I wait for your patch to get in master, or get them in my 
>> patch series?
>>
>>
>> Will work with you, let me make your suggested change to the lib and 
>> circle back with you on your first point.
> Glad to hear it :)
>
>
>
>
> -- 
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org * **│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>



Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-09 Thread Mike Holmes
On 9 December 2016 at 08:33, Nicolas Morey-Chaisemartin 
wrote:

>
>
> Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>
>
>
> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin 
> wrote:
>
>> I'm OK with this. The only issue I have with this is that it moves back
>> platform/OS selection back to configure.ac while I've been trying to
>> move it out (https://github.com/nmorey/odp/tree/dev/generic-platforms).
>> Shouldn't each platform select the right OS ?
>> I mean linux-generic will probably always use the linux helper while the
>> mppa implementation will use the right one for us (depending on the
>> compilation flags).
>>
>
> I would actually like to make the helpers much more independent so I am in
> line with your thinking.
> How about we just do exactly that and have helpers  build completely
> independently with its own configure.ac ?
>
>
> Won't the dependence from the platform test to the helper lib be an issue?
> Splitting them up might end in a circualt dependency.
>

I am hoping to find and delete any circular dependencies that exist, the
helper should depend on the odp api, the tests and examples should depend
on the helpers


>
> Build ODP means building the tests which means building the helpers which
> need ODP to be built (for odp_cpumask_* functions at least).
>
> I'm not sure we really need to pull them out of the ODP build system, but
> simply keep the configure flexible enough so platforms can tweak/change the
> settings from the platform side.
>
Platform could add their own options in their configure.m4 if they need
> them, or simply select the basic helper setup and export the OS.
>

Ok then I misunderstood this "Shouldn't each platform select the right OS
?" - I agree it should.

I added the selector "with_os" to the common configure.ac does that not
allow it to be changed by platform if we keep it all under one configure
setup? - perhaps it can be set in a per platform configure.m4 as you say, I
need to fiddle with that.



>
>
>
>
>
>>
>> Also I think the lib should be renamed to libodphelper instead of
>> libodphelper-linux.
>>
>
> agree
>
>
>>
>> Any plans to get these patches in soon?
>>
>
> with your help asap
>
>
>> Should I wait for your patch to get in master, or get them in my patch
>> series?
>>
>
> Will work with you, let me make your suggested change to the lib and
> circle back with you on your first point.
>
> Glad to hear it :)
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-09 Thread Nicolas Morey-Chaisemartin


Le 12/09/2016 à 02:18 PM, Mike Holmes a écrit :
>
>
> On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin  > wrote:
>
> I'm OK with this. The only issue I have with this is that it moves back 
> platform/OS selection back to configure.ac  while I've 
> been trying to move it out 
> (https://github.com/nmorey/odp/tree/dev/generic-platforms 
> ).
> Shouldn't each platform select the right OS ?
> I mean linux-generic will probably always use the linux helper while the 
> mppa implementation will use the right one for us (depending on the 
> compilation flags).
>
>
> I would actually like to make the helpers much more independent so I am in 
> line with your thinking.
> How about we just do exactly that and have helpers  build completely 
> independently with its own configure.ac  ?

Won't the dependence from the platform test to the helper lib be an issue?
Splitting them up might end in a circualt dependency.

Build ODP means building the tests which means building the helpers which need 
ODP to be built (for odp_cpumask_* functions at least).

I'm not sure we really need to pull them out of the ODP build system, but 
simply keep the configure flexible enough so platforms can tweak/change the 
settings from the platform side.
Platform could add their own options in their configure.m4 if they need them, 
or simply select the basic helper setup and export the OS.


>  
>
>
> Also I think the lib should be renamed to libodphelper instead of 
> libodphelper-linux.
>
>
> agree
>  
>
>
> Any plans to get these patches in soon?
>
>
> with your help asap
>  
>
> Should I wait for your patch to get in master, or get them in my patch 
> series?
>
>
> Will work with you, let me make your suggested change to the lib and circle 
> back with you on your first point.
Glad to hear it :)



Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-09 Thread Mike Holmes
On 9 December 2016 at 04:41, Nicolas Morey-Chaisemartin 
wrote:

> I'm OK with this. The only issue I have with this is that it moves back
> platform/OS selection back to configure.ac while I've been trying to move
> it out (https://github.com/nmorey/odp/tree/dev/generic-platforms).
> Shouldn't each platform select the right OS ?
> I mean linux-generic will probably always use the linux helper while the
> mppa implementation will use the right one for us (depending on the
> compilation flags).
>

I would actually like to make the helpers much more independent so I am in
line with your thinking.
How about we just do exactly that and have helpers  build completely
independently with its own configure.ac ?


>
> Also I think the lib should be renamed to libodphelper instead of
> libodphelper-linux.
>

agree


>
> Any plans to get these patches in soon?
>

with your help asap


> Should I wait for your patch to get in master, or get them in my patch
> series?
>

Will work with you, let me make your suggested change to the lib and circle
back with you on your first point.


>
>
> Nicolas
>
>
>
> Le 12/08/2016 à 09:47 PM, Mike Holmes a écrit :
>
> So this https://github.com/mike-holmes-linaro/odp/tree/helpers-os is what
> I was thinking
>
> It moves the Linux specifics to helper/os/linux and selects the helper os
> to be built in the configure step
> It renames the linux.h helper include to threads.h which is what it
> predominately is
> It also removes the unused Linux specific  APIs since no odp test or
> example uses them and they break having an OS agnostic helper suite.
>
> On 8 December 2016 at 13:44, Mike Holmes  wrote:
>
>>
>>
>> On 7 December 2016 at 01:54, Nicolas Morey-Chaisemartin > > wrote:
>>
>>>
>>>
>>> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
>>> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>>> >  wrote:
>>> >> Signed-off-by: Nicolas Morey-Chaisemartin 
>>> >> ---
>>> >>  helper/Makefile.am  | 6 +++---
>>> >>  helper/test/Makefile.am | 6 +++---
>>> >>  2 files changed, 6 insertions(+), 6 deletions(-)
>>> >>
>>> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
>>> >> index d09d900..c75db00 100644
>>> >> --- a/helper/Makefile.am
>>> >> +++ b/helper/Makefile.am
>>> >> @@ -1,7 +1,7 @@
>>> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>>> >>
>>> >>  pkgconfigdir = $(libdir)/pkgconfig
>>> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>>> >> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libo
>>> dphelper@ODP_LIB_FLAVOR@.pc
>>> > Why would the helpers be tied to the implementation being built ? They
>>> > should be agnostic and depend on the OS
>>> I agree that they should not depend on the implementation of ODP. But as
>>> for libodp, helper might not be ABI compatible.
>>> The issue is that there's no evident place in the connfigure to select
>>> which implementation of the helper should be used.
>>> platform configure.m4 are the easiest place to add this which ties this
>>> to the platform.
>>> But I could add an ODPH_LIB_IMPL. So several platforms could use the
>>> same helper, while keeping the possibility of using non ABI compatible
>>> versions in other platforms.
>>>
>>> > I think the helpers are broken or we need an alternative to linux.c in
>>> > there, perhaps a odp/helpers/platform/linux/linux.c and
>>> > odp/helpers/platform/mpaa/linux.c
>>> I changed it in our git tree. helper/linux.c got moved to
>>> helper/os/linux/linux.c
>>> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have
>>> 2 OS flavors usable with ODP)
>>> The platform configure.m4 is in charge of selecting the OS depending on
>>> flags & compiler selected.
>>>
>>
>> I would be keen to do the same thing master, if it is OS differences then
>> that is much more in keeping with the intent.
>> I will play with a patch to move linux.c under and OS directory called
>> linux
>>
>>
>>> >
>>> >>  LIB   = $(top_builddir)/lib
>>> >>  AM_CFLAGS  = -I$(srcdir)/include
>>> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>>> >>  $(srcdir)/odph_lineartable.h \
>>> >>  $(srcdir)/odph_list_internal.h
>>> >>
>>> >> -__LIB__libodphelper_linux_la_SOURCES = \
>>> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>>> >> eth.c \
>>> >> ip.c \
>>> >> chksum.c \
>>> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>>> >> hashtable.c \
>>> >> lineartable.c
>>> >>
>>> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
>>> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>>> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>>> >> index 545db73..02c260c 100644
>>> >> --- a/helper/test/Makefile.am
>>> >> +++ 

Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-09 Thread Nicolas Morey-Chaisemartin
I'm OK with this. The only issue I have with this is that it moves back 
platform/OS selection back to configure.ac while I've been trying to move it 
out (https://github.com/nmorey/odp/tree/dev/generic-platforms).
Shouldn't each platform select the right OS ?
I mean linux-generic will probably always use the linux helper while the mppa 
implementation will use the right one for us (depending on the compilation 
flags).

Also I think the lib should be renamed to libodphelper instead of 
libodphelper-linux.

Any plans to get these patches in soon?
Should I wait for your patch to get in master, or get them in my patch series?

Nicolas


Le 12/08/2016 à 09:47 PM, Mike Holmes a écrit :
> So this https://github.com/mike-holmes-linaro/odp/tree/helpers-os is what I 
> was thinking
>
> It moves the Linux specifics to helper/os/linux and selects the helper os to 
> be built in the configure step
> It renames the linux.h helper include to threads.h which is what it 
> predominately is
> It also removes the unused Linux specific  APIs since no odp test or example 
> uses them and they break having an OS agnostic helper suite.
>
> On 8 December 2016 at 13:44, Mike Holmes  > wrote:
>
>
>
> On 7 December 2016 at 01:54, Nicolas Morey-Chaisemartin  > wrote:
>
>
>
> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
> > > wrote:
> >> Signed-off-by: Nicolas Morey-Chaisemartin  >
> >> ---
> >>  helper/Makefile.am  | 6 +++---
> >>  helper/test/Makefile.am | 6 +++---
> >>  2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
> >> index d09d900..c75db00 100644
> >> --- a/helper/Makefile.am
> >> +++ b/helper/Makefile.am
> >> @@ -1,7 +1,7 @@
> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
> >>
> >>  pkgconfigdir = $(libdir)/pkgconfig
> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
> >> +pkgconfig_DATA = 
> $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
> > Why would the helpers be tied to the implementation being built ? 
> They
> > should be agnostic and depend on the OS
> I agree that they should not depend on the implementation of ODP. But 
> as for libodp, helper might not be ABI compatible.
> The issue is that there's no evident place in the connfigure to 
> select which implementation of the helper should be used.
> platform configure.m4 are the easiest place to add this which ties 
> this to the platform.
> But I could add an ODPH_LIB_IMPL. So several platforms could use the 
> same helper, while keeping the possibility of using non ABI compatible 
> versions in other platforms.
>
> > I think the helpers are broken or we need an alternative to linux.c 
> in
> > there, perhaps a odp/helpers/platform/linux/linux.c and
> > odp/helpers/platform/mpaa/linux.c
> I changed it in our git tree. helper/linux.c got moved to 
> helper/os/linux/linux.c
> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we 
> have 2 OS flavors usable with ODP)
> The platform configure.m4 is in charge of selecting the OS depending 
> on flags & compiler selected.
>
>
> I would be keen to do the same thing master, if it is OS differences then 
> that is much more in keeping with the intent.
> I will play with a patch to move linux.c under and OS directory called 
> linux
>  
>
> >
> >>  LIB   = $(top_builddir)/lib
> >>  AM_CFLAGS  = -I$(srcdir)/include
> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
> >>  $(srcdir)/odph_lineartable.h \
> >>  $(srcdir)/odph_list_internal.h
> >>
> >> -__LIB__libodphelper_linux_la_SOURCES = \
> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
> >> eth.c \
> >> ip.c \
> >> chksum.c \
> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
> >> hashtable.c \
> >> lineartable.c
> >>
> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la 
> 
> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
> >> index 545db73..02c260c 100644
> >> --- a/helper/test/Makefile.am
> >> +++ 

Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-08 Thread Mike Holmes
So this https://github.com/mike-holmes-linaro/odp/tree/helpers-os is what I
was thinking

It moves the Linux specifics to helper/os/linux and selects the helper os
to be built in the configure step
It renames the linux.h helper include to threads.h which is what it
predominately is
It also removes the unused Linux specific  APIs since no odp test or
example uses them and they break having an OS agnostic helper suite.

On 8 December 2016 at 13:44, Mike Holmes  wrote:

>
>
> On 7 December 2016 at 01:54, Nicolas Morey-Chaisemartin 
> wrote:
>
>>
>>
>> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
>> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>> >  wrote:
>> >> Signed-off-by: Nicolas Morey-Chaisemartin 
>> >> ---
>> >>  helper/Makefile.am  | 6 +++---
>> >>  helper/test/Makefile.am | 6 +++---
>> >>  2 files changed, 6 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
>> >> index d09d900..c75db00 100644
>> >> --- a/helper/Makefile.am
>> >> +++ b/helper/Makefile.am
>> >> @@ -1,7 +1,7 @@
>> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>> >>
>> >>  pkgconfigdir = $(libdir)/pkgconfig
>> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>> >> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libo
>> dphelper@ODP_LIB_FLAVOR@.pc
>> > Why would the helpers be tied to the implementation being built ? They
>> > should be agnostic and depend on the OS
>> I agree that they should not depend on the implementation of ODP. But as
>> for libodp, helper might not be ABI compatible.
>> The issue is that there's no evident place in the connfigure to select
>> which implementation of the helper should be used.
>> platform configure.m4 are the easiest place to add this which ties this
>> to the platform.
>> But I could add an ODPH_LIB_IMPL. So several platforms could use the same
>> helper, while keeping the possibility of using non ABI compatible versions
>> in other platforms.
>>
>> > I think the helpers are broken or we need an alternative to linux.c in
>> > there, perhaps a odp/helpers/platform/linux/linux.c and
>> > odp/helpers/platform/mpaa/linux.c
>> I changed it in our git tree. helper/linux.c got moved to
>> helper/os/linux/linux.c
>> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have
>> 2 OS flavors usable with ODP)
>> The platform configure.m4 is in charge of selecting the OS depending on
>> flags & compiler selected.
>>
>
> I would be keen to do the same thing master, if it is OS differences then
> that is much more in keeping with the intent.
> I will play with a patch to move linux.c under and OS directory called
> linux
>
>
>> >
>> >>  LIB   = $(top_builddir)/lib
>> >>  AM_CFLAGS  = -I$(srcdir)/include
>> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>> >>  $(srcdir)/odph_lineartable.h \
>> >>  $(srcdir)/odph_list_internal.h
>> >>
>> >> -__LIB__libodphelper_linux_la_SOURCES = \
>> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>> >> eth.c \
>> >> ip.c \
>> >> chksum.c \
>> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>> >> hashtable.c \
>> >> lineartable.c
>> >>
>> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
>> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>> >> index 545db73..02c260c 100644
>> >> --- a/helper/test/Makefile.am
>> >> +++ b/helper/test/Makefile.am
>> >> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes
>> odpthreads_as_pthreads
>> >>
>> >>  dist_chksum_SOURCES = chksum.c
>> >>  dist_odpthreads_SOURCES = odpthreads.c
>> >> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/
>> libodp-linux.la
>> >> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_thread_SOURCES = thread.c
>> >> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> >> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_process_SOURCES = process.c
>> >>  dist_parse_SOURCES = parse.c
>> >> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> >> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_table_SOURCES = table.c
>> >> --
>> >> 2.10.1.4.g0ffc436
>> >>
>> >>
>> >
>> >
>>
>>
>
>
> --
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org  *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for 

Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-08 Thread Mike Holmes
On 7 December 2016 at 01:54, Nicolas Morey-Chaisemartin 
wrote:

>
>
> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
> >  wrote:
> >> Signed-off-by: Nicolas Morey-Chaisemartin 
> >> ---
> >>  helper/Makefile.am  | 6 +++---
> >>  helper/test/Makefile.am | 6 +++---
> >>  2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
> >> index d09d900..c75db00 100644
> >> --- a/helper/Makefile.am
> >> +++ b/helper/Makefile.am
> >> @@ -1,7 +1,7 @@
> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
> >>
> >>  pkgconfigdir = $(libdir)/pkgconfig
> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
> >> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR
> @.pc
> > Why would the helpers be tied to the implementation being built ? They
> > should be agnostic and depend on the OS
> I agree that they should not depend on the implementation of ODP. But as
> for libodp, helper might not be ABI compatible.
> The issue is that there's no evident place in the connfigure to select
> which implementation of the helper should be used.
> platform configure.m4 are the easiest place to add this which ties this to
> the platform.
> But I could add an ODPH_LIB_IMPL. So several platforms could use the same
> helper, while keeping the possibility of using non ABI compatible versions
> in other platforms.
>
> > I think the helpers are broken or we need an alternative to linux.c in
> > there, perhaps a odp/helpers/platform/linux/linux.c and
> > odp/helpers/platform/mpaa/linux.c
> I changed it in our git tree. helper/linux.c got moved to
> helper/os/linux/linux.c
> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have 2
> OS flavors usable with ODP)
> The platform configure.m4 is in charge of selecting the OS depending on
> flags & compiler selected.
>

I would be keen to do the same thing master, if it is OS differences then
that is much more in keeping with the intent.
I will play with a patch to move linux.c under and OS directory called linux


> >
> >>  LIB   = $(top_builddir)/lib
> >>  AM_CFLAGS  = -I$(srcdir)/include
> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
> >>  $(srcdir)/odph_lineartable.h \
> >>  $(srcdir)/odph_list_internal.h
> >>
> >> -__LIB__libodphelper_linux_la_SOURCES = \
> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
> >> eth.c \
> >> ip.c \
> >> chksum.c \
> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
> >> hashtable.c \
> >> lineartable.c
> >>
> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
> >> index 545db73..02c260c 100644
> >> --- a/helper/test/Makefile.am
> >> +++ b/helper/test/Makefile.am
> >> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes
> odpthreads_as_pthreads
> >>
> >>  dist_chksum_SOURCES = chksum.c
> >>  dist_odpthreads_SOURCES = odpthreads.c
> >> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_thread_SOURCES = thread.c
> >> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_process_SOURCES = process.c
> >>  dist_parse_SOURCES = parse.c
> >> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_table_SOURCES = table.c
> >> --
> >> 2.10.1.4.g0ffc436
> >>
> >>
> >
> >
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-07 Thread Nicolas Morey-Chaisemartin
The test code needs some of those (the no_barrier for examples).

I'm pretty sure the hashtable will need some of those because it used a 
globally shared structure.



Le 12/07/2016 à 09:15 AM, Maxim Uvarov a écrit :
> it's ok if this places in api. But do we have such places in examples or 
> helper code?
>
> On 7 December 2016 at 10:43, Nicolas Morey-Chaisemartin  > wrote:
>
> I usually force somme access to be uncached. A whole barrier would work, 
> but the performance cost is way too big.
>
>
> Just as an example:
>
> static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t 
> val)
> {
> atom->v = val;
> #if __GCC_ATOMIC_LLONG_LOCK_FREE < 2
> __atomic_clear(>lock, __ATOMIC_RELAXED);
> #endif
> }
>
>
> becomes
>
> static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t 
> val)
> {
> STORE_U64(atom->v, val);
> }
>
> where STORE_U64 forces an uncached write directly to memory.
>
> Nicolas
>
>
> Le 12/07/2016 à 08:09 AM, Maxim Uvarov a écrit :
>> Nicolas, what do you do to solve coherency problem? I think that maybe 
>> we are missing some api in odp, like read/write barriers.
>>
>> Maxim.
>>
>> On 7 December 2016 at 09:54, Nicolas Morey-Chaisemartin 
>> > wrote:
>>
>>
>>
>> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
>> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>> > > wrote:
>> >> Signed-off-by: Nicolas Morey-Chaisemartin > >
>> >> ---
>> >>  helper/Makefile.am  | 6 +++---
>> >>  helper/test/Makefile.am | 6 +++---
>> >>  2 files changed, 6 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
>> >> index d09d900..c75db00 100644
>> >> --- a/helper/Makefile.am
>> >> +++ b/helper/Makefile.am
>> >> @@ -1,7 +1,7 @@
>> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc 
>> 
>> >>
>> >>  pkgconfigdir = $(libdir)/pkgconfig
>> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>> >> +pkgconfig_DATA = 
>> $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
>> > Why would the helpers be tied to the implementation being built ? 
>> They
>> > should be agnostic and depend on the OS
>> I agree that they should not depend on the implementation of ODP. 
>> But as for libodp, helper might not be ABI compatible.
>> The issue is that there's no evident place in the connfigure to 
>> select which implementation of the helper should be used.
>> platform configure.m4 are the easiest place to add this which ties 
>> this to the platform.
>> But I could add an ODPH_LIB_IMPL. So several platforms could use the 
>> same helper, while keeping the possibility of using non ABI compatible 
>> versions in other platforms.
>>
>> > I think the helpers are broken or we need an alternative to 
>> linux.c in
>> > there, perhaps a odp/helpers/platform/linux/linux.c and
>> > odp/helpers/platform/mpaa/linux.c
>> I changed it in our git tree. helper/linux.c got moved to 
>> helper/os/linux/linux.c
>> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we 
>> have 2 OS flavors usable with ODP)
>> The platform configure.m4 is in charge of selecting the OS depending 
>> on flags & compiler selected.
>> >
>> >>  LIB   = $(top_builddir)/lib
>> >>  AM_CFLAGS  = -I$(srcdir)/include
>> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>> >>  $(srcdir)/odph_lineartable.h \
>> >>  $(srcdir)/odph_list_internal.h
>> >>
>> >> -__LIB__libodphelper_linux_la_SOURCES = \
>> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>> >> eth.c \
>> >> ip.c \
>> >> chksum.c \
>> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>> >> hashtable.c \
>> >> lineartable.c
>> >>
>> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la 
>> 
>> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> 
>> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>> >> index 545db73..02c260c 100644
>> >> --- a/helper/test/Makefile.am
>> >> +++ b/helper/test/Makefile.am
>> >> @@ -28,10 +28,10 @@ EXTRA_DIST = 

Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-07 Thread Maxim Uvarov
it's ok if this places in api. But do we have such places in examples or
helper code?

On 7 December 2016 at 10:43, Nicolas Morey-Chaisemartin 
wrote:

> I usually force somme access to be uncached. A whole barrier would work,
> but the performance cost is way too big.
>
>
> Just as an example:
>
> static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t
> val)
> {
> atom->v = val;
> #if __GCC_ATOMIC_LLONG_LOCK_FREE < 2
> __atomic_clear(>lock, __ATOMIC_RELAXED);
> #endif
> }
>
>
> becomes
>
> static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t
> val)
> {
> STORE_U64(atom->v, val);
> }
> where STORE_U64 forces an uncached write directly to memory.
>
> Nicolas
>
>
> Le 12/07/2016 à 08:09 AM, Maxim Uvarov a écrit :
>
> Nicolas, what do you do to solve coherency problem? I think that maybe we
> are missing some api in odp, like read/write barriers.
>
> Maxim.
>
> On 7 December 2016 at 09:54, Nicolas Morey-Chaisemartin 
> wrote:
>
>>
>>
>> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
>> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>> >  wrote:
>> >> Signed-off-by: Nicolas Morey-Chaisemartin 
>> >> ---
>> >>  helper/Makefile.am  | 6 +++---
>> >>  helper/test/Makefile.am | 6 +++---
>> >>  2 files changed, 6 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
>> >> index d09d900..c75db00 100644
>> >> --- a/helper/Makefile.am
>> >> +++ b/helper/Makefile.am
>> >> @@ -1,7 +1,7 @@
>> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>> >>
>> >>  pkgconfigdir = $(libdir)/pkgconfig
>> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>> >> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libo
>> dphelper@ODP_LIB_FLAVOR@.pc
>> > Why would the helpers be tied to the implementation being built ? They
>> > should be agnostic and depend on the OS
>> I agree that they should not depend on the implementation of ODP. But as
>> for libodp, helper might not be ABI compatible.
>> The issue is that there's no evident place in the connfigure to select
>> which implementation of the helper should be used.
>> platform configure.m4 are the easiest place to add this which ties this
>> to the platform.
>> But I could add an ODPH_LIB_IMPL. So several platforms could use the same
>> helper, while keeping the possibility of using non ABI compatible versions
>> in other platforms.
>>
>> > I think the helpers are broken or we need an alternative to linux.c in
>> > there, perhaps a odp/helpers/platform/linux/linux.c and
>> > odp/helpers/platform/mpaa/linux.c
>> I changed it in our git tree. helper/linux.c got moved to
>> helper/os/linux/linux.c
>> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have
>> 2 OS flavors usable with ODP)
>> The platform configure.m4 is in charge of selecting the OS depending on
>> flags & compiler selected.
>> >
>> >>  LIB   = $(top_builddir)/lib
>> >>  AM_CFLAGS  = -I$(srcdir)/include
>> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>> >>  $(srcdir)/odph_lineartable.h \
>> >>  $(srcdir)/odph_list_internal.h
>> >>
>> >> -__LIB__libodphelper_linux_la_SOURCES = \
>> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>> >> eth.c \
>> >> ip.c \
>> >> chksum.c \
>> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>> >> hashtable.c \
>> >> lineartable.c
>> >>
>> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
>> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>> >> index 545db73..02c260c 100644
>> >> --- a/helper/test/Makefile.am
>> >> +++ b/helper/test/Makefile.am
>> >> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes
>> odpthreads_as_pthreads
>> >>
>> >>  dist_chksum_SOURCES = chksum.c
>> >>  dist_odpthreads_SOURCES = odpthreads.c
>> >> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/
>> libodp-linux.la
>> >> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_thread_SOURCES = thread.c
>> >> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> >> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_process_SOURCES = process.c
>> >>  dist_parse_SOURCES = parse.c
>> >> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> >> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>> >>  dist_table_SOURCES = table.c
>> >> --
>> >> 2.10.1.4.g0ffc436
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Nicolas Morey-Chaisemartin
I usually force somme access to be uncached. A whole barrier would work, but 
the performance cost is way too big.


Just as an example:

static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t val)
{
atom->v = val;
#if __GCC_ATOMIC_LLONG_LOCK_FREE < 2
__atomic_clear(>lock, __ATOMIC_RELAXED);
#endif
}


becomes

static inline void odp_atomic_init_u64(odp_atomic_u64_t *atom, uint64_t val)
{
STORE_U64(atom->v, val);
}

where STORE_U64 forces an uncached write directly to memory.

Nicolas

Le 12/07/2016 à 08:09 AM, Maxim Uvarov a écrit :
> Nicolas, what do you do to solve coherency problem? I think that maybe we are 
> missing some api in odp, like read/write barriers.
>
> Maxim.
>
> On 7 December 2016 at 09:54, Nicolas Morey-Chaisemartin  > wrote:
>
>
>
> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
> > > wrote:
> >> Signed-off-by: Nicolas Morey-Chaisemartin  >
> >> ---
> >>  helper/Makefile.am  | 6 +++---
> >>  helper/test/Makefile.am | 6 +++---
> >>  2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
> >> index d09d900..c75db00 100644
> >> --- a/helper/Makefile.am
> >> +++ b/helper/Makefile.am
> >> @@ -1,7 +1,7 @@
> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
> >>
> >>  pkgconfigdir = $(libdir)/pkgconfig
> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
> >> +pkgconfig_DATA = 
> $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
> > Why would the helpers be tied to the implementation being built ? They
> > should be agnostic and depend on the OS
> I agree that they should not depend on the implementation of ODP. But as 
> for libodp, helper might not be ABI compatible.
> The issue is that there's no evident place in the connfigure to select 
> which implementation of the helper should be used.
> platform configure.m4 are the easiest place to add this which ties this 
> to the platform.
> But I could add an ODPH_LIB_IMPL. So several platforms could use the same 
> helper, while keeping the possibility of using non ABI compatible versions in 
> other platforms.
>
> > I think the helpers are broken or we need an alternative to linux.c in
> > there, perhaps a odp/helpers/platform/linux/linux.c and
> > odp/helpers/platform/mpaa/linux.c
> I changed it in our git tree. helper/linux.c got moved to 
> helper/os/linux/linux.c
> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have 
> 2 OS flavors usable with ODP)
> The platform configure.m4 is in charge of selecting the OS depending on 
> flags & compiler selected.
> >
> >>  LIB   = $(top_builddir)/lib
> >>  AM_CFLAGS  = -I$(srcdir)/include
> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
> >>  $(srcdir)/odph_lineartable.h \
> >>  $(srcdir)/odph_list_internal.h
> >>
> >> -__LIB__libodphelper_linux_la_SOURCES = \
> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
> >> eth.c \
> >> ip.c \
> >> chksum.c \
> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
> >> hashtable.c \
> >> lineartable.c
> >>
> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la 
> 
> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
> >> index 545db73..02c260c 100644
> >> --- a/helper/test/Makefile.am
> >> +++ b/helper/test/Makefile.am
> >> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes 
> odpthreads_as_pthreads
> >>
> >>  dist_chksum_SOURCES = chksum.c
> >>  dist_odpthreads_SOURCES = odpthreads.c
> >> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la 
>  $(LIB)/libodp-linux.la 
> >> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_thread_SOURCES = thread.c
> >> -thread_LDADD = $(LIB)/libodphelper-linux.la 
>  $(LIB)/libodp-linux.la 
> >> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_process_SOURCES = process.c
> >>  dist_parse_SOURCES = parse.c
> >> -process_LDADD = $(LIB)/libodphelper-linux.la 
>  $(LIB)/libodp-linux.la 
> >> +process_LDADD = 

Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Maxim Uvarov
Nicolas, what do you do to solve coherency problem? I think that maybe we
are missing some api in odp, like read/write barriers.

Maxim.

On 7 December 2016 at 09:54, Nicolas Morey-Chaisemartin 
wrote:

>
>
> Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
> > On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
> >  wrote:
> >> Signed-off-by: Nicolas Morey-Chaisemartin 
> >> ---
> >>  helper/Makefile.am  | 6 +++---
> >>  helper/test/Makefile.am | 6 +++---
> >>  2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/helper/Makefile.am b/helper/Makefile.am
> >> index d09d900..c75db00 100644
> >> --- a/helper/Makefile.am
> >> +++ b/helper/Makefile.am
> >> @@ -1,7 +1,7 @@
> >>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
> >>
> >>  pkgconfigdir = $(libdir)/pkgconfig
> >> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
> >> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR
> @.pc
> > Why would the helpers be tied to the implementation being built ? They
> > should be agnostic and depend on the OS
> I agree that they should not depend on the implementation of ODP. But as
> for libodp, helper might not be ABI compatible.
> The issue is that there's no evident place in the connfigure to select
> which implementation of the helper should be used.
> platform configure.m4 are the easiest place to add this which ties this to
> the platform.
> But I could add an ODPH_LIB_IMPL. So several platforms could use the same
> helper, while keeping the possibility of using non ABI compatible versions
> in other platforms.
>
> > I think the helpers are broken or we need an alternative to linux.c in
> > there, perhaps a odp/helpers/platform/linux/linux.c and
> > odp/helpers/platform/mpaa/linux.c
> I changed it in our git tree. helper/linux.c got moved to
> helper/os/linux/linux.c
> And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have 2
> OS flavors usable with ODP)
> The platform configure.m4 is in charge of selecting the OS depending on
> flags & compiler selected.
> >
> >>  LIB   = $(top_builddir)/lib
> >>  AM_CFLAGS  = -I$(srcdir)/include
> >> @@ -31,7 +31,7 @@ noinst_HEADERS = \
> >>  $(srcdir)/odph_lineartable.h \
> >>  $(srcdir)/odph_list_internal.h
> >>
> >> -__LIB__libodphelper_linux_la_SOURCES = \
> >> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
> >> eth.c \
> >> ip.c \
> >> chksum.c \
> >> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
> >> hashtable.c \
> >> lineartable.c
> >>
> >> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
> >> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> >> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
> >> index 545db73..02c260c 100644
> >> --- a/helper/test/Makefile.am
> >> +++ b/helper/test/Makefile.am
> >> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes
> odpthreads_as_pthreads
> >>
> >>  dist_chksum_SOURCES = chksum.c
> >>  dist_odpthreads_SOURCES = odpthreads.c
> >> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_thread_SOURCES = thread.c
> >> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_process_SOURCES = process.c
> >>  dist_parse_SOURCES = parse.c
> >> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> >> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
> >>  dist_table_SOURCES = table.c
> >> --
> >> 2.10.1.4.g0ffc436
> >>
> >>
> >
> >
>
>


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Nicolas Morey-Chaisemartin


Le 12/06/2016 à 09:37 PM, Mike Holmes a écrit :
> On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>  wrote:
>> Signed-off-by: Nicolas Morey-Chaisemartin 
>> ---
>>  helper/Makefile.am  | 6 +++---
>>  helper/test/Makefile.am | 6 +++---
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/helper/Makefile.am b/helper/Makefile.am
>> index d09d900..c75db00 100644
>> --- a/helper/Makefile.am
>> +++ b/helper/Makefile.am
>> @@ -1,7 +1,7 @@
>>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>>
>>  pkgconfigdir = $(libdir)/pkgconfig
>> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
> Why would the helpers be tied to the implementation being built ? They
> should be agnostic and depend on the OS
I agree that they should not depend on the implementation of ODP. But as for 
libodp, helper might not be ABI compatible.
The issue is that there's no evident place in the connfigure to select which 
implementation of the helper should be used.
platform configure.m4 are the easiest place to add this which ties this to the 
platform.
But I could add an ODPH_LIB_IMPL. So several platforms could use the same 
helper, while keeping the possibility of using non ABI compatible versions in 
other platforms.

> I think the helpers are broken or we need an alternative to linux.c in
> there, perhaps a odp/helpers/platform/linux/linux.c and
> odp/helpers/platform/mpaa/linux.c
I changed it in our git tree. helper/linux.c got moved to 
helper/os/linux/linux.c
And we added helper/os/nodeos/linux.c and helper/os/mos/linux.c (we have 2 OS 
flavors usable with ODP)
The platform configure.m4 is in charge of selecting the OS depending on flags & 
compiler selected.
>
>>  LIB   = $(top_builddir)/lib
>>  AM_CFLAGS  = -I$(srcdir)/include
>> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>>  $(srcdir)/odph_lineartable.h \
>>  $(srcdir)/odph_list_internal.h
>>
>> -__LIB__libodphelper_linux_la_SOURCES = \
>> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>> eth.c \
>> ip.c \
>> chksum.c \
>> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>> hashtable.c \
>> lineartable.c
>>
>> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
>> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>> index 545db73..02c260c 100644
>> --- a/helper/test/Makefile.am
>> +++ b/helper/test/Makefile.am
>> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes 
>> odpthreads_as_pthreads
>>
>>  dist_chksum_SOURCES = chksum.c
>>  dist_odpthreads_SOURCES = odpthreads.c
>> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_thread_SOURCES = thread.c
>> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_process_SOURCES = process.c
>>  dist_parse_SOURCES = parse.c
>> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_table_SOURCES = table.c
>> --
>> 2.10.1.4.g0ffc436
>>
>>
>
>



Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Nicolas Morey-Chaisemartin


Le 12/06/2016 à 10:17 PM, Maxim Uvarov a écrit :
> On 12/06/16 23:37, Mike Holmes wrote:
>> On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>>  wrote:
>>> Signed-off-by: Nicolas Morey-Chaisemartin 
>>> ---
>>>  helper/Makefile.am  | 6 +++---
>>>  helper/test/Makefile.am | 6 +++---
>>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/helper/Makefile.am b/helper/Makefile.am
>>> index d09d900..c75db00 100644
>>> --- a/helper/Makefile.am
>>> +++ b/helper/Makefile.am
>>> @@ -1,7 +1,7 @@
>>>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>>>
>>>  pkgconfigdir = $(libdir)/pkgconfig
>>> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>>> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
>> Why would the helpers be tied to the implementation being built ? They
>> should be agnostic and depend on the OS
>> I think the helpers are broken or we need an alternative to linux.c in
>> there, perhaps a odp/helpers/platform/linux/linux.c and
>> odp/helpers/platform/mpaa/linux.c
>>
>
> Nicolas, do you have modification in helpers? We checked that
> linux-generic and odp-dpdk platform have the same source code for
> helpers. And we are doing efforts to make it the same.
>
> Maxim.
At this moment we have a different linux.c for our own thread/process 
implementation.
But I think I'll have to change some things in the hashtable helper to handle 
our lack of cache coherency.

Nicolas


Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Maxim Uvarov
On 12/06/16 23:37, Mike Holmes wrote:
> On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
>  wrote:
>> Signed-off-by: Nicolas Morey-Chaisemartin 
>> ---
>>  helper/Makefile.am  | 6 +++---
>>  helper/test/Makefile.am | 6 +++---
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/helper/Makefile.am b/helper/Makefile.am
>> index d09d900..c75db00 100644
>> --- a/helper/Makefile.am
>> +++ b/helper/Makefile.am
>> @@ -1,7 +1,7 @@
>>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>>
>>  pkgconfigdir = $(libdir)/pkgconfig
>> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
>> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
> 
> Why would the helpers be tied to the implementation being built ? They
> should be agnostic and depend on the OS
> I think the helpers are broken or we need an alternative to linux.c in
> there, perhaps a odp/helpers/platform/linux/linux.c and
> odp/helpers/platform/mpaa/linux.c
> 


Nicolas, do you have modification in helpers? We checked that
linux-generic and odp-dpdk platform have the same source code for
helpers. And we are doing efforts to make it the same.

Maxim.

>>
>>  LIB   = $(top_builddir)/lib
>>  AM_CFLAGS  = -I$(srcdir)/include
>> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>>  $(srcdir)/odph_lineartable.h \
>>  $(srcdir)/odph_list_internal.h
>>
>> -__LIB__libodphelper_linux_la_SOURCES = \
>> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
>> eth.c \
>> ip.c \
>> chksum.c \
>> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
>> hashtable.c \
>> lineartable.c
>>
>> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
>> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
>> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
>> index 545db73..02c260c 100644
>> --- a/helper/test/Makefile.am
>> +++ b/helper/test/Makefile.am
>> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes 
>> odpthreads_as_pthreads
>>
>>  dist_chksum_SOURCES = chksum.c
>>  dist_odpthreads_SOURCES = odpthreads.c
>> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_thread_SOURCES = thread.c
>> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_process_SOURCES = process.c
>>  dist_parse_SOURCES = parse.c
>> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
>> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
>> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>>  dist_table_SOURCES = table.c
>> --
>> 2.10.1.4.g0ffc436
>>
>>
> 
> 
> 



Re: [lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Mike Holmes
On 6 December 2016 at 12:08, Nicolas Morey-Chaisemartin
 wrote:
> Signed-off-by: Nicolas Morey-Chaisemartin 
> ---
>  helper/Makefile.am  | 6 +++---
>  helper/test/Makefile.am | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/helper/Makefile.am b/helper/Makefile.am
> index d09d900..c75db00 100644
> --- a/helper/Makefile.am
> +++ b/helper/Makefile.am
> @@ -1,7 +1,7 @@
>  include $(top_srcdir)/platform/@with_platform@/Makefile.inc
>
>  pkgconfigdir = $(libdir)/pkgconfig
> -pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
> +pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc

Why would the helpers be tied to the implementation being built ? They
should be agnostic and depend on the OS
I think the helpers are broken or we need an alternative to linux.c in
there, perhaps a odp/helpers/platform/linux/linux.c and
odp/helpers/platform/mpaa/linux.c

>
>  LIB   = $(top_builddir)/lib
>  AM_CFLAGS  = -I$(srcdir)/include
> @@ -31,7 +31,7 @@ noinst_HEADERS = \
>  $(srcdir)/odph_lineartable.h \
>  $(srcdir)/odph_list_internal.h
>
> -__LIB__libodphelper_linux_la_SOURCES = \
> +__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
> eth.c \
> ip.c \
> chksum.c \
> @@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
> hashtable.c \
> lineartable.c
>
> -lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
> +lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
> diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
> index 545db73..02c260c 100644
> --- a/helper/test/Makefile.am
> +++ b/helper/test/Makefile.am
> @@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes 
> odpthreads_as_pthreads
>
>  dist_chksum_SOURCES = chksum.c
>  dist_odpthreads_SOURCES = odpthreads.c
> -odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> +odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>  dist_thread_SOURCES = thread.c
> -thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> +thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>  dist_process_SOURCES = process.c
>  dist_parse_SOURCES = parse.c
> -process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
> +process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
> $(LIB)/libodp@ODP_LIB_FLAVOR@.la
>  dist_table_SOURCES = table.c
> --
> 2.10.1.4.g0ffc436
>
>



-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org │ Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"


[lng-odp] [PATCH v2 4/6] helper: use ODP_LIB_FLAVOR to generate libodp name

2016-12-06 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin 
---
 helper/Makefile.am  | 6 +++---
 helper/test/Makefile.am | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/helper/Makefile.am b/helper/Makefile.am
index d09d900..c75db00 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -1,7 +1,7 @@
 include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc
+pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper@ODP_LIB_FLAVOR@.pc
 
 LIB   = $(top_builddir)/lib
 AM_CFLAGS  = -I$(srcdir)/include
@@ -31,7 +31,7 @@ noinst_HEADERS = \
 $(srcdir)/odph_lineartable.h \
 $(srcdir)/odph_list_internal.h
 
-__LIB__libodphelper_linux_la_SOURCES = \
+__LIB__libodphelper@ODP_LIB_FLAVOR@_la_SOURCES = \
eth.c \
ip.c \
chksum.c \
@@ -39,4 +39,4 @@ __LIB__libodphelper_linux_la_SOURCES = \
hashtable.c \
lineartable.c
 
-lib_LTLIBRARIES = $(LIB)/libodphelper-linux.la
+lib_LTLIBRARIES = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 545db73..02c260c 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -28,10 +28,10 @@ EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
 
 dist_chksum_SOURCES = chksum.c
 dist_odpthreads_SOURCES = odpthreads.c
-odpthreads_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
+odpthreads_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
$(LIB)/libodp@ODP_LIB_FLAVOR@.la
 dist_thread_SOURCES = thread.c
-thread_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
+thread_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
$(LIB)/libodp@ODP_LIB_FLAVOR@.la
 dist_process_SOURCES = process.c
 dist_parse_SOURCES = parse.c
-process_LDADD = $(LIB)/libodphelper-linux.la $(LIB)/libodp-linux.la
+process_LDADD = $(LIB)/libodphelper@ODP_LIB_FLAVOR@.la 
$(LIB)/libodp@ODP_LIB_FLAVOR@.la
 dist_table_SOURCES = table.c
-- 
2.10.1.4.g0ffc436