diff mbox

[API-NEXT,12/18] linux-generic: drv: adding align.h

Message ID 1468864178-43721-13-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard July 18, 2016, 5:49 p.m. UTC
duplicated from the API side
(hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 include/odp_drv.h                              |  1 +
 platform/linux-generic/Makefile.am             |  1 +
 platform/linux-generic/include/odp/drv/align.h | 60 ++++++++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 platform/linux-generic/include/odp/drv/align.h

-- 
2.7.4

Comments

Maxim Uvarov July 20, 2016, 6:49 p.m. UTC | #1
On 07/18/16 20:49, Christophe Milard wrote:
> duplicated from the API side

> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

all commits have reference to this hash which looks like not very 
correlate with what should it be....

Maxim.

> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

> ---

>   include/odp_drv.h                              |  1 +

>   platform/linux-generic/Makefile.am             |  1 +

>   platform/linux-generic/include/odp/drv/align.h | 60 ++++++++++++++++++++++++++

>   3 files changed, 62 insertions(+)

>   create mode 100644 platform/linux-generic/include/odp/drv/align.h

>

> diff --git a/include/odp_drv.h b/include/odp_drv.h

> index e2c3bda..6d2f7ff 100644

> --- a/include/odp_drv.h

> +++ b/include/odp_drv.h

> @@ -18,6 +18,7 @@

>   extern C {

>   #endif

>   

> +#include <odp/drv/align.h>

>   #include <odp/drv/byteorder.h>

>   #include <odp/drv/compiler.h>

>   #include <odp/drv/std_types.h>

> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am

> index 68db647..20b4b29 100644

> --- a/platform/linux-generic/Makefile.am

> +++ b/platform/linux-generic/Makefile.am

> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>   

>   odpdrvincludedir = $(includedir)/odp/drv

>   odpdrvinclude_HEADERS = \

> +		  $(srcdir)/include/odp/drv/align.h \

>   		  $(srcdir)/include/odp/drv/byteorder.h \

>   		  $(srcdir)/include/odp/drv/compiler.h \

>   		  $(srcdir)/include/odp/drv/std_types.h \

> diff --git a/platform/linux-generic/include/odp/drv/align.h b/platform/linux-generic/include/odp/drv/align.h

> new file mode 100644

> index 0000000..9ae3e19

> --- /dev/null

> +++ b/platform/linux-generic/include/odp/drv/align.h

> @@ -0,0 +1,60 @@

> +/* Copyright (c) 2013, Linaro Limited

> + * All rights reserved.

> + *

> + * SPDX-License-Identifier:	BSD-3-Clause

> + */

> +

> +/**

> + * @file

> + *

> + * ODPDRV alignments

> + */

> +

> +#ifndef ODPDRV_PLAT_ALIGN_H_

> +#define ODPDRV_PLAT_ALIGN_H_

> +

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

> +/** @ingroup odpdrv_compiler_optim

> + *  @{

> + */

> +

> +#ifdef __GNUC__

> +

> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

> +

> +#define ODPDRV_PACKED __attribute__((__packed__))

> +

> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)

> +

> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

> +

> +#if defined __arm__ || defined __aarch64__

> +

> +#define ODPDRV_CACHE_LINE_SIZE 64

> +

> +#endif

> +

> +#else

> +#error Non-gcc compatible compiler

> +#endif

> +

> +#define ODPDRV_PAGE_SIZE       4096

> +

> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

> +

> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

> +

> +/**

> + * @}

> + */

> +

> +#include <odp/drv/spec/align.h>

> +

> +#ifdef __cplusplus

> +}

> +#endif

> +

> +#endif
Christophe Milard July 20, 2016, 8:07 p.m. UTC | #2
I am not sure I understand the problem ?
The files were originated from the following commit ID which was the
last commit ID in the api-next branch when I did the patch...

I have had a review from Anders and will send a v2 anyway now

Christophe.


Christophe
commit 77a27212b563299959fb2a609b86bb9117a8f918
Author: Barry Spinney <spinney@mellanox.com>
Date:   Wed Jul 13 11:59:40 2016 -0500

    api: tm: resolve todo

    This todo just asks a question which is no longer important.

    Signed-off-by: Barry Spinney <spinney@mellanox.com>

    Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

    Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>


On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> On 07/18/16 20:49, Christophe Milard wrote:

>>

>> duplicated from the API side

>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>

> all commits have reference to this hash which looks like not very correlate

> with what should it be....

>

> Maxim.

>

>

>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>> ---

>>   include/odp_drv.h                              |  1 +

>>   platform/linux-generic/Makefile.am             |  1 +

>>   platform/linux-generic/include/odp/drv/align.h | 60

>> ++++++++++++++++++++++++++

>>   3 files changed, 62 insertions(+)

>>   create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>

>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>> index e2c3bda..6d2f7ff 100644

>> --- a/include/odp_drv.h

>> +++ b/include/odp_drv.h

>> @@ -18,6 +18,7 @@

>>   extern C {

>>   #endif

>>   +#include <odp/drv/align.h>

>>   #include <odp/drv/byteorder.h>

>>   #include <odp/drv/compiler.h>

>>   #include <odp/drv/std_types.h>

>> diff --git a/platform/linux-generic/Makefile.am

>> b/platform/linux-generic/Makefile.am

>> index 68db647..20b4b29 100644

>> --- a/platform/linux-generic/Makefile.am

>> +++ b/platform/linux-generic/Makefile.am

>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>     odpdrvincludedir = $(includedir)/odp/drv

>>   odpdrvinclude_HEADERS = \

>> +                 $(srcdir)/include/odp/drv/align.h \

>>                   $(srcdir)/include/odp/drv/byteorder.h \

>>                   $(srcdir)/include/odp/drv/compiler.h \

>>                   $(srcdir)/include/odp/drv/std_types.h \

>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>> b/platform/linux-generic/include/odp/drv/align.h

>> new file mode 100644

>> index 0000000..9ae3e19

>> --- /dev/null

>> +++ b/platform/linux-generic/include/odp/drv/align.h

>> @@ -0,0 +1,60 @@

>> +/* Copyright (c) 2013, Linaro Limited

>> + * All rights reserved.

>> + *

>> + * SPDX-License-Identifier:    BSD-3-Clause

>> + */

>> +

>> +/**

>> + * @file

>> + *

>> + * ODPDRV alignments

>> + */

>> +

>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>> +#define ODPDRV_PLAT_ALIGN_H_

>> +

>> +#ifdef __cplusplus

>> +extern "C" {

>> +#endif

>> +

>> +/** @ingroup odpdrv_compiler_optim

>> + *  @{

>> + */

>> +

>> +#ifdef __GNUC__

>> +

>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>> +

>> +#define ODPDRV_PACKED __attribute__((__packed__))

>> +

>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)

>> +

>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>> +

>> +#if defined __arm__ || defined __aarch64__

>> +

>> +#define ODPDRV_CACHE_LINE_SIZE 64

>> +

>> +#endif

>> +

>> +#else

>> +#error Non-gcc compatible compiler

>> +#endif

>> +

>> +#define ODPDRV_PAGE_SIZE       4096

>> +

>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>> +

>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>> +

>> +/**

>> + * @}

>> + */

>> +

>> +#include <odp/drv/spec/align.h>

>> +

>> +#ifdef __cplusplus

>> +}

>> +#endif

>> +

>> +#endif

>

>
Maxim Uvarov July 21, 2016, 6:45 a.m. UTC | #3
On 07/20/16 23:07, Christophe Milard wrote:
> I am not sure I understand the problem ?

> The files were originated from the following commit ID which was the

> last commit ID in the api-next branch when I did the patch...

>

> I have had a review from Anders and will send a v2 anyway now

>

> Christophe.

>

>

> Christophe

> commit 77a27212b563299959fb2a609b86bb9117a8f918

> Author: Barry Spinney <spinney@mellanox.com>

> Date:   Wed Jul 13 11:59:40 2016 -0500

>

>      api: tm: resolve todo

>

>      This todo just asks a question which is no longer important.

>

>      Signed-off-by: Barry Spinney <spinney@mellanox.com>

>      Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>      Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>


Do no understand you also. You say in commit log:
"""

duplicated from the API side
(hash: 77a27212b563299959fb2a609b86bb9117a8f918.)
"""

Commit refers to this "api: tm: resolve todo" but it adds some aling.h
So it's not duplicate of api 77a23212 but for drivers.

If your patch set is bases on some commit id in api-next, that 
information should
not be in git log.

Maxim.


> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> On 07/18/16 20:49, Christophe Milard wrote:

>>> duplicated from the API side

>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>> all commits have reference to this hash which looks like not very correlate

>> with what should it be....

>>

>> Maxim.

>>

>>

>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>> ---

>>>    include/odp_drv.h                              |  1 +

>>>    platform/linux-generic/Makefile.am             |  1 +

>>>    platform/linux-generic/include/odp/drv/align.h | 60

>>> ++++++++++++++++++++++++++

>>>    3 files changed, 62 insertions(+)

>>>    create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>

>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>> index e2c3bda..6d2f7ff 100644

>>> --- a/include/odp_drv.h

>>> +++ b/include/odp_drv.h

>>> @@ -18,6 +18,7 @@

>>>    extern C {

>>>    #endif

>>>    +#include <odp/drv/align.h>

>>>    #include <odp/drv/byteorder.h>

>>>    #include <odp/drv/compiler.h>

>>>    #include <odp/drv/std_types.h>

>>> diff --git a/platform/linux-generic/Makefile.am

>>> b/platform/linux-generic/Makefile.am

>>> index 68db647..20b4b29 100644

>>> --- a/platform/linux-generic/Makefile.am

>>> +++ b/platform/linux-generic/Makefile.am

>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>      odpdrvincludedir = $(includedir)/odp/drv

>>>    odpdrvinclude_HEADERS = \

>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>                    $(srcdir)/include/odp/drv/byteorder.h \

>>>                    $(srcdir)/include/odp/drv/compiler.h \

>>>                    $(srcdir)/include/odp/drv/std_types.h \

>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>> b/platform/linux-generic/include/odp/drv/align.h

>>> new file mode 100644

>>> index 0000000..9ae3e19

>>> --- /dev/null

>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>> @@ -0,0 +1,60 @@

>>> +/* Copyright (c) 2013, Linaro Limited

>>> + * All rights reserved.

>>> + *

>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>> + */

>>> +

>>> +/**

>>> + * @file

>>> + *

>>> + * ODPDRV alignments

>>> + */

>>> +

>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>> +#define ODPDRV_PLAT_ALIGN_H_

>>> +

>>> +#ifdef __cplusplus

>>> +extern "C" {

>>> +#endif

>>> +

>>> +/** @ingroup odpdrv_compiler_optim

>>> + *  @{

>>> + */

>>> +

>>> +#ifdef __GNUC__

>>> +

>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>> +

>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>> +

>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)

>>> +

>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>> +

>>> +#if defined __arm__ || defined __aarch64__

>>> +

>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>> +

>>> +#endif

>>> +

>>> +#else

>>> +#error Non-gcc compatible compiler

>>> +#endif

>>> +

>>> +#define ODPDRV_PAGE_SIZE       4096

>>> +

>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>> +

>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>> +

>>> +/**

>>> + * @}

>>> + */

>>> +

>>> +#include <odp/drv/spec/align.h>

>>> +

>>> +#ifdef __cplusplus

>>> +}

>>> +#endif

>>> +

>>> +#endif

>>
Christophe Milard July 21, 2016, 7:01 a.m. UTC | #4
On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> On 07/20/16 23:07, Christophe Milard wrote:

>>

>> I am not sure I understand the problem ?

>> The files were originated from the following commit ID which was the

>> last commit ID in the api-next branch when I did the patch...

>>

>> I have had a review from Anders and will send a v2 anyway now

>>

>> Christophe.

>>

>>

>> Christophe

>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>> Author: Barry Spinney <spinney@mellanox.com>

>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>

>>      api: tm: resolve todo

>>

>>      This todo just asks a question which is no longer important.

>>

>>      Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>      Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>      Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>

>

> Do no understand you also. You say in commit log:

> """

>

> duplicated from the API side

> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

> """

>

> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

> So it's not duplicate of api 77a23212 but for drivers.

>

> If your patch set is bases on some commit id in api-next, that information

> should

> not be in git log.


The point is to remember the version of the API files my new drv files
are based on.
Are you saying that you do not want this information in the commit message.
Do you want me to remove the hash from the commit messages??

Christophe.

>

> Maxim.

>

>

>

>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>

>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>

>>>> duplicated from the API side

>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>

>>> all commits have reference to this hash which looks like not very

>>> correlate

>>> with what should it be....

>>>

>>> Maxim.

>>>

>>>

>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>> ---

>>>>    include/odp_drv.h                              |  1 +

>>>>    platform/linux-generic/Makefile.am             |  1 +

>>>>    platform/linux-generic/include/odp/drv/align.h | 60

>>>> ++++++++++++++++++++++++++

>>>>    3 files changed, 62 insertions(+)

>>>>    create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>

>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>> index e2c3bda..6d2f7ff 100644

>>>> --- a/include/odp_drv.h

>>>> +++ b/include/odp_drv.h

>>>> @@ -18,6 +18,7 @@

>>>>    extern C {

>>>>    #endif

>>>>    +#include <odp/drv/align.h>

>>>>    #include <odp/drv/byteorder.h>

>>>>    #include <odp/drv/compiler.h>

>>>>    #include <odp/drv/std_types.h>

>>>> diff --git a/platform/linux-generic/Makefile.am

>>>> b/platform/linux-generic/Makefile.am

>>>> index 68db647..20b4b29 100644

>>>> --- a/platform/linux-generic/Makefile.am

>>>> +++ b/platform/linux-generic/Makefile.am

>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>      odpdrvincludedir = $(includedir)/odp/drv

>>>>    odpdrvinclude_HEADERS = \

>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>                    $(srcdir)/include/odp/drv/byteorder.h \

>>>>                    $(srcdir)/include/odp/drv/compiler.h \

>>>>                    $(srcdir)/include/odp/drv/std_types.h \

>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>> new file mode 100644

>>>> index 0000000..9ae3e19

>>>> --- /dev/null

>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>> @@ -0,0 +1,60 @@

>>>> +/* Copyright (c) 2013, Linaro Limited

>>>> + * All rights reserved.

>>>> + *

>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>> + */

>>>> +

>>>> +/**

>>>> + * @file

>>>> + *

>>>> + * ODPDRV alignments

>>>> + */

>>>> +

>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>> +

>>>> +#ifdef __cplusplus

>>>> +extern "C" {

>>>> +#endif

>>>> +

>>>> +/** @ingroup odpdrv_compiler_optim

>>>> + *  @{

>>>> + */

>>>> +

>>>> +#ifdef __GNUC__

>>>> +

>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>> +

>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>> +

>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)

>>>> +

>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>> +

>>>> +#if defined __arm__ || defined __aarch64__

>>>> +

>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>> +

>>>> +#endif

>>>> +

>>>> +#else

>>>> +#error Non-gcc compatible compiler

>>>> +#endif

>>>> +

>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>> +

>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>> +

>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>> +

>>>> +/**

>>>> + * @}

>>>> + */

>>>> +

>>>> +#include <odp/drv/spec/align.h>

>>>> +

>>>> +#ifdef __cplusplus

>>>> +}

>>>> +#endif

>>>> +

>>>> +#endif

>>>

>>>

>
Maxim Uvarov July 21, 2016, 7:20 a.m. UTC | #5
On 07/21/16 10:01, Christophe Milard wrote:
> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> On 07/20/16 23:07, Christophe Milard wrote:

>>> I am not sure I understand the problem ?

>>> The files were originated from the following commit ID which was the

>>> last commit ID in the api-next branch when I did the patch...

>>>

>>> I have had a review from Anders and will send a v2 anyway now

>>>

>>> Christophe.

>>>

>>>

>>> Christophe

>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>> Author: Barry Spinney <spinney@mellanox.com>

>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>

>>>       api: tm: resolve todo

>>>

>>>       This todo just asks a question which is no longer important.

>>>

>>>       Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>       Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>       Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>

>> Do no understand you also. You say in commit log:

>> """

>>

>> duplicated from the API side

>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>> """

>>

>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>> So it's not duplicate of api 77a23212 but for drivers.

>>

>> If your patch set is bases on some commit id in api-next, that information

>> should

>> not be in git log.

> The point is to remember the version of the API files my new drv files

> are based on.

> Are you saying that you do not want this information in the commit message.

> Do you want me to remove the hash from the commit messages??

>

> Christophe.


yes, please remove them. I think you can fetch this information from 
mailing list if it will be needed.

btw, I tested your patches and all tests passed.

Maxim.


>

>> Maxim.

>>

>>

>>

>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>> duplicated from the API side

>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>> all commits have reference to this hash which looks like not very

>>>> correlate

>>>> with what should it be....

>>>>

>>>> Maxim.

>>>>

>>>>

>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>> ---

>>>>>     include/odp_drv.h                              |  1 +

>>>>>     platform/linux-generic/Makefile.am             |  1 +

>>>>>     platform/linux-generic/include/odp/drv/align.h | 60

>>>>> ++++++++++++++++++++++++++

>>>>>     3 files changed, 62 insertions(+)

>>>>>     create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>>

>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>> index e2c3bda..6d2f7ff 100644

>>>>> --- a/include/odp_drv.h

>>>>> +++ b/include/odp_drv.h

>>>>> @@ -18,6 +18,7 @@

>>>>>     extern C {

>>>>>     #endif

>>>>>     +#include <odp/drv/align.h>

>>>>>     #include <odp/drv/byteorder.h>

>>>>>     #include <odp/drv/compiler.h>

>>>>>     #include <odp/drv/std_types.h>

>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>> b/platform/linux-generic/Makefile.am

>>>>> index 68db647..20b4b29 100644

>>>>> --- a/platform/linux-generic/Makefile.am

>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>       odpdrvincludedir = $(includedir)/odp/drv

>>>>>     odpdrvinclude_HEADERS = \

>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>                     $(srcdir)/include/odp/drv/byteorder.h \

>>>>>                     $(srcdir)/include/odp/drv/compiler.h \

>>>>>                     $(srcdir)/include/odp/drv/std_types.h \

>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>> new file mode 100644

>>>>> index 0000000..9ae3e19

>>>>> --- /dev/null

>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>> @@ -0,0 +1,60 @@

>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>> + * All rights reserved.

>>>>> + *

>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>> + */

>>>>> +

>>>>> +/**

>>>>> + * @file

>>>>> + *

>>>>> + * ODPDRV alignments

>>>>> + */

>>>>> +

>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>> +

>>>>> +#ifdef __cplusplus

>>>>> +extern "C" {

>>>>> +#endif

>>>>> +

>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>> + *  @{

>>>>> + */

>>>>> +

>>>>> +#ifdef __GNUC__

>>>>> +

>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>> +

>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>> +

>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)

>>>>> +

>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>>> +

>>>>> +#if defined __arm__ || defined __aarch64__

>>>>> +

>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>> +

>>>>> +#endif

>>>>> +

>>>>> +#else

>>>>> +#error Non-gcc compatible compiler

>>>>> +#endif

>>>>> +

>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>> +

>>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>> +

>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>> +

>>>>> +/**

>>>>> + * @}

>>>>> + */

>>>>> +

>>>>> +#include <odp/drv/spec/align.h>

>>>>> +

>>>>> +#ifdef __cplusplus

>>>>> +}

>>>>> +#endif

>>>>> +

>>>>> +#endif

>>>>
Anders Roxell July 21, 2016, 7:40 a.m. UTC | #6
On 21 July 2016 at 09:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> On 07/21/16 10:01, Christophe Milard wrote:

>>

>> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>

>>> On 07/20/16 23:07, Christophe Milard wrote:

>>>>

>>>> I am not sure I understand the problem ?

>>>> The files were originated from the following commit ID which was the

>>>> last commit ID in the api-next branch when I did the patch...

>>>>

>>>> I have had a review from Anders and will send a v2 anyway now

>>>>

>>>> Christophe.

>>>>

>>>>

>>>> Christophe

>>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>>> Author: Barry Spinney <spinney@mellanox.com>

>>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>>

>>>>       api: tm: resolve todo

>>>>

>>>>       This todo just asks a question which is no longer important.

>>>>

>>>>       Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>>       Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>>       Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>

>>>

>>> Do no understand you also. You say in commit log:

>>> """

>>>

>>> duplicated from the API side

>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>> """

>>>

>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>>> So it's not duplicate of api 77a23212 but for drivers.

>>>

>>> If your patch set is bases on some commit id in api-next, that

>>> information

>>> should

>>> not be in git log.

>>

>> The point is to remember the version of the API files my new drv files

>> are based on.

>> Are you saying that you do not want this information in the commit

>> message.

>> Do you want me to remove the hash from the commit messages??

>>

>> Christophe.

>

>

> yes, please remove them. I think you can fetch this information from mailing

> list if it will be needed.


its better to have a changelog with more information than too little so that you
have to search the ML to find whats been going on.

Cheers,
Anders

>

> btw, I tested your patches and all tests passed.

>

> Maxim.

>

>

>

>>

>>> Maxim.

>>>

>>>

>>>

>>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>>

>>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>>>

>>>>>> duplicated from the API side

>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>

>>>>> all commits have reference to this hash which looks like not very

>>>>> correlate

>>>>> with what should it be....

>>>>>

>>>>> Maxim.

>>>>>

>>>>>

>>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>>> ---

>>>>>>     include/odp_drv.h                              |  1 +

>>>>>>     platform/linux-generic/Makefile.am             |  1 +

>>>>>>     platform/linux-generic/include/odp/drv/align.h | 60

>>>>>> ++++++++++++++++++++++++++

>>>>>>     3 files changed, 62 insertions(+)

>>>>>>     create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>>>

>>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>>> index e2c3bda..6d2f7ff 100644

>>>>>> --- a/include/odp_drv.h

>>>>>> +++ b/include/odp_drv.h

>>>>>> @@ -18,6 +18,7 @@

>>>>>>     extern C {

>>>>>>     #endif

>>>>>>     +#include <odp/drv/align.h>

>>>>>>     #include <odp/drv/byteorder.h>

>>>>>>     #include <odp/drv/compiler.h>

>>>>>>     #include <odp/drv/std_types.h>

>>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>>> b/platform/linux-generic/Makefile.am

>>>>>> index 68db647..20b4b29 100644

>>>>>> --- a/platform/linux-generic/Makefile.am

>>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>>       odpdrvincludedir = $(includedir)/odp/drv

>>>>>>     odpdrvinclude_HEADERS = \

>>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>>                     $(srcdir)/include/odp/drv/byteorder.h \

>>>>>>                     $(srcdir)/include/odp/drv/compiler.h \

>>>>>>                     $(srcdir)/include/odp/drv/std_types.h \

>>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>>> new file mode 100644

>>>>>> index 0000000..9ae3e19

>>>>>> --- /dev/null

>>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>>> @@ -0,0 +1,60 @@

>>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>>> + * All rights reserved.

>>>>>> + *

>>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>>> + */

>>>>>> +

>>>>>> +/**

>>>>>> + * @file

>>>>>> + *

>>>>>> + * ODPDRV alignments

>>>>>> + */

>>>>>> +

>>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>>> +

>>>>>> +#ifdef __cplusplus

>>>>>> +extern "C" {

>>>>>> +#endif

>>>>>> +

>>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>>> + *  @{

>>>>>> + */

>>>>>> +

>>>>>> +#ifdef __GNUC__

>>>>>> +

>>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>>> +

>>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>>> +

>>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,

>>>>>> member)

>>>>>> +

>>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>>>> +

>>>>>> +#if defined __arm__ || defined __aarch64__

>>>>>> +

>>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>>> +

>>>>>> +#endif

>>>>>> +

>>>>>> +#else

>>>>>> +#error Non-gcc compatible compiler

>>>>>> +#endif

>>>>>> +

>>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>>> +

>>>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>>> +

>>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>>> +

>>>>>> +/**

>>>>>> + * @}

>>>>>> + */

>>>>>> +

>>>>>> +#include <odp/drv/spec/align.h>

>>>>>> +

>>>>>> +#ifdef __cplusplus

>>>>>> +}

>>>>>> +#endif

>>>>>> +

>>>>>> +#endif

>>>>>

>>>>>

>
Christophe Milard July 21, 2016, 8:09 a.m. UTC | #7
So what now, Maxim? Still want a v3 without the hash?
I guess you decide as you are the maintener...

On 21 July 2016 at 09:40, Anders Roxell <anders.roxell@linaro.org> wrote:
> On 21 July 2016 at 09:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> On 07/21/16 10:01, Christophe Milard wrote:

>>>

>>> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>

>>>> On 07/20/16 23:07, Christophe Milard wrote:

>>>>>

>>>>> I am not sure I understand the problem ?

>>>>> The files were originated from the following commit ID which was the

>>>>> last commit ID in the api-next branch when I did the patch...

>>>>>

>>>>> I have had a review from Anders and will send a v2 anyway now

>>>>>

>>>>> Christophe.

>>>>>

>>>>>

>>>>> Christophe

>>>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>>>> Author: Barry Spinney <spinney@mellanox.com>

>>>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>>>

>>>>>       api: tm: resolve todo

>>>>>

>>>>>       This todo just asks a question which is no longer important.

>>>>>

>>>>>       Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>>>       Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>>>       Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>>

>>>>

>>>> Do no understand you also. You say in commit log:

>>>> """

>>>>

>>>> duplicated from the API side

>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>> """

>>>>

>>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>>>> So it's not duplicate of api 77a23212 but for drivers.

>>>>

>>>> If your patch set is bases on some commit id in api-next, that

>>>> information

>>>> should

>>>> not be in git log.

>>>

>>> The point is to remember the version of the API files my new drv files

>>> are based on.

>>> Are you saying that you do not want this information in the commit

>>> message.

>>> Do you want me to remove the hash from the commit messages??

>>>

>>> Christophe.

>>

>>

>> yes, please remove them. I think you can fetch this information from mailing

>> list if it will be needed.

>

> its better to have a changelog with more information than too little so that you

> have to search the ML to find whats been going on.

>

> Cheers,

> Anders

>

>>

>> btw, I tested your patches and all tests passed.

>>

>> Maxim.

>>

>>

>>

>>>

>>>> Maxim.

>>>>

>>>>

>>>>

>>>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>>>

>>>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>>>>

>>>>>>> duplicated from the API side

>>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>>

>>>>>> all commits have reference to this hash which looks like not very

>>>>>> correlate

>>>>>> with what should it be....

>>>>>>

>>>>>> Maxim.

>>>>>>

>>>>>>

>>>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>>>> ---

>>>>>>>     include/odp_drv.h                              |  1 +

>>>>>>>     platform/linux-generic/Makefile.am             |  1 +

>>>>>>>     platform/linux-generic/include/odp/drv/align.h | 60

>>>>>>> ++++++++++++++++++++++++++

>>>>>>>     3 files changed, 62 insertions(+)

>>>>>>>     create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>>>>

>>>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>>>> index e2c3bda..6d2f7ff 100644

>>>>>>> --- a/include/odp_drv.h

>>>>>>> +++ b/include/odp_drv.h

>>>>>>> @@ -18,6 +18,7 @@

>>>>>>>     extern C {

>>>>>>>     #endif

>>>>>>>     +#include <odp/drv/align.h>

>>>>>>>     #include <odp/drv/byteorder.h>

>>>>>>>     #include <odp/drv/compiler.h>

>>>>>>>     #include <odp/drv/std_types.h>

>>>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>>>> b/platform/linux-generic/Makefile.am

>>>>>>> index 68db647..20b4b29 100644

>>>>>>> --- a/platform/linux-generic/Makefile.am

>>>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>>>       odpdrvincludedir = $(includedir)/odp/drv

>>>>>>>     odpdrvinclude_HEADERS = \

>>>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>>>                     $(srcdir)/include/odp/drv/byteorder.h \

>>>>>>>                     $(srcdir)/include/odp/drv/compiler.h \

>>>>>>>                     $(srcdir)/include/odp/drv/std_types.h \

>>>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>>>> new file mode 100644

>>>>>>> index 0000000..9ae3e19

>>>>>>> --- /dev/null

>>>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>>>> @@ -0,0 +1,60 @@

>>>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>>>> + * All rights reserved.

>>>>>>> + *

>>>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>>>> + */

>>>>>>> +

>>>>>>> +/**

>>>>>>> + * @file

>>>>>>> + *

>>>>>>> + * ODPDRV alignments

>>>>>>> + */

>>>>>>> +

>>>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>>>> +

>>>>>>> +#ifdef __cplusplus

>>>>>>> +extern "C" {

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>>>> + *  @{

>>>>>>> + */

>>>>>>> +

>>>>>>> +#ifdef __GNUC__

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>>>> +

>>>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>>>> +

>>>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,

>>>>>>> member)

>>>>>>> +

>>>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>>>>> +

>>>>>>> +#if defined __arm__ || defined __aarch64__

>>>>>>> +

>>>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>>>> +

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#else

>>>>>>> +#error Non-gcc compatible compiler

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>>>> +

>>>>>>> +/**

>>>>>>> + * @}

>>>>>>> + */

>>>>>>> +

>>>>>>> +#include <odp/drv/spec/align.h>

>>>>>>> +

>>>>>>> +#ifdef __cplusplus

>>>>>>> +}

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#endif

>>>>>>

>>>>>>

>>
Maxim Uvarov July 21, 2016, 9:51 a.m. UTC | #8
On 07/21/16 10:40, Anders Roxell wrote:
> On 21 July 2016 at 09:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> On 07/21/16 10:01, Christophe Milard wrote:

>>> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>> On 07/20/16 23:07, Christophe Milard wrote:

>>>>> I am not sure I understand the problem ?

>>>>> The files were originated from the following commit ID which was the

>>>>> last commit ID in the api-next branch when I did the patch...

>>>>>

>>>>> I have had a review from Anders and will send a v2 anyway now

>>>>>

>>>>> Christophe.

>>>>>

>>>>>

>>>>> Christophe

>>>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>>>> Author: Barry Spinney <spinney@mellanox.com>

>>>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>>>

>>>>>        api: tm: resolve todo

>>>>>

>>>>>        This todo just asks a question which is no longer important.

>>>>>

>>>>>        Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>>>        Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>>>        Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>>

>>>> Do no understand you also. You say in commit log:

>>>> """

>>>>

>>>> duplicated from the API side

>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>> """

>>>>

>>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>>>> So it's not duplicate of api 77a23212 but for drivers.

>>>>

>>>> If your patch set is bases on some commit id in api-next, that

>>>> information

>>>> should

>>>> not be in git log.

>>> The point is to remember the version of the API files my new drv files

>>> are based on.

>>> Are you saying that you do not want this information in the commit

>>> message.

>>> Do you want me to remove the hash from the commit messages??

>>>

>>> Christophe.

>>

>> yes, please remove them. I think you can fetch this information from mailing

>> list if it will be needed.

> its better to have a changelog with more information than too little so that you

> have to search the ML to find whats been going on.

>

> Cheers,

> Anders


in that case we need understand why this information is needed. At least 
for me it's unclear.

Maxim.

>

>> btw, I tested your patches and all tests passed.

>>

>> Maxim.

>>

>>

>>

>>>> Maxim.

>>>>

>>>>

>>>>

>>>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>>>> duplicated from the API side

>>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>> all commits have reference to this hash which looks like not very

>>>>>> correlate

>>>>>> with what should it be....

>>>>>>

>>>>>> Maxim.

>>>>>>

>>>>>>

>>>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>>>> ---

>>>>>>>      include/odp_drv.h                              |  1 +

>>>>>>>      platform/linux-generic/Makefile.am             |  1 +

>>>>>>>      platform/linux-generic/include/odp/drv/align.h | 60

>>>>>>> ++++++++++++++++++++++++++

>>>>>>>      3 files changed, 62 insertions(+)

>>>>>>>      create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>>>>

>>>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>>>> index e2c3bda..6d2f7ff 100644

>>>>>>> --- a/include/odp_drv.h

>>>>>>> +++ b/include/odp_drv.h

>>>>>>> @@ -18,6 +18,7 @@

>>>>>>>      extern C {

>>>>>>>      #endif

>>>>>>>      +#include <odp/drv/align.h>

>>>>>>>      #include <odp/drv/byteorder.h>

>>>>>>>      #include <odp/drv/compiler.h>

>>>>>>>      #include <odp/drv/std_types.h>

>>>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>>>> b/platform/linux-generic/Makefile.am

>>>>>>> index 68db647..20b4b29 100644

>>>>>>> --- a/platform/linux-generic/Makefile.am

>>>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>>>        odpdrvincludedir = $(includedir)/odp/drv

>>>>>>>      odpdrvinclude_HEADERS = \

>>>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>>>                      $(srcdir)/include/odp/drv/byteorder.h \

>>>>>>>                      $(srcdir)/include/odp/drv/compiler.h \

>>>>>>>                      $(srcdir)/include/odp/drv/std_types.h \

>>>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>>>> new file mode 100644

>>>>>>> index 0000000..9ae3e19

>>>>>>> --- /dev/null

>>>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>>>> @@ -0,0 +1,60 @@

>>>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>>>> + * All rights reserved.

>>>>>>> + *

>>>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>>>> + */

>>>>>>> +

>>>>>>> +/**

>>>>>>> + * @file

>>>>>>> + *

>>>>>>> + * ODPDRV alignments

>>>>>>> + */

>>>>>>> +

>>>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>>>> +

>>>>>>> +#ifdef __cplusplus

>>>>>>> +extern "C" {

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>>>> + *  @{

>>>>>>> + */

>>>>>>> +

>>>>>>> +#ifdef __GNUC__

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>>>> +

>>>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>>>> +

>>>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,

>>>>>>> member)

>>>>>>> +

>>>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>>>>> +

>>>>>>> +#if defined __arm__ || defined __aarch64__

>>>>>>> +

>>>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>>>> +

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#else

>>>>>>> +#error Non-gcc compatible compiler

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>>>> +

>>>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>>>> +

>>>>>>> +/**

>>>>>>> + * @}

>>>>>>> + */

>>>>>>> +

>>>>>>> +#include <odp/drv/spec/align.h>

>>>>>>> +

>>>>>>> +#ifdef __cplusplus

>>>>>>> +}

>>>>>>> +#endif

>>>>>>> +

>>>>>>> +#endif

>>>>>>
Maxim Uvarov July 21, 2016, 9:58 a.m. UTC | #9
On 07/21/16 11:09, Christophe Milard wrote:
> So what now, Maxim? Still want a v3 without the hash?

> I guess you decide as you are the maintener...


I will accept patches without this hash because it's very confusing. Or 
with this hash but if I understand why it has to be there.
If you don't care about this hashes than it's quicker to just send v3.

Maxim.


> On 21 July 2016 at 09:40, Anders Roxell <anders.roxell@linaro.org> wrote:

>> On 21 July 2016 at 09:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>> On 07/21/16 10:01, Christophe Milard wrote:

>>>> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>> On 07/20/16 23:07, Christophe Milard wrote:

>>>>>> I am not sure I understand the problem ?

>>>>>> The files were originated from the following commit ID which was the

>>>>>> last commit ID in the api-next branch when I did the patch...

>>>>>>

>>>>>> I have had a review from Anders and will send a v2 anyway now

>>>>>>

>>>>>> Christophe.

>>>>>>

>>>>>>

>>>>>> Christophe

>>>>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>>>>> Author: Barry Spinney <spinney@mellanox.com>

>>>>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>>>>

>>>>>>        api: tm: resolve todo

>>>>>>

>>>>>>        This todo just asks a question which is no longer important.

>>>>>>

>>>>>>        Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>>>>        Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>>>>        Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>>>

>>>>> Do no understand you also. You say in commit log:

>>>>> """

>>>>>

>>>>> duplicated from the API side

>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>> """

>>>>>

>>>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>>>>> So it's not duplicate of api 77a23212 but for drivers.

>>>>>

>>>>> If your patch set is bases on some commit id in api-next, that

>>>>> information

>>>>> should

>>>>> not be in git log.

>>>> The point is to remember the version of the API files my new drv files

>>>> are based on.

>>>> Are you saying that you do not want this information in the commit

>>>> message.

>>>> Do you want me to remove the hash from the commit messages??

>>>>

>>>> Christophe.

>>>

>>> yes, please remove them. I think you can fetch this information from mailing

>>> list if it will be needed.

>> its better to have a changelog with more information than too little so that you

>> have to search the ML to find whats been going on.

>>

>> Cheers,

>> Anders

>>

>>> btw, I tested your patches and all tests passed.

>>>

>>> Maxim.

>>>

>>>

>>>

>>>>> Maxim.

>>>>>

>>>>>

>>>>>

>>>>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>>>>> duplicated from the API side

>>>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>>> all commits have reference to this hash which looks like not very

>>>>>>> correlate

>>>>>>> with what should it be....

>>>>>>>

>>>>>>> Maxim.

>>>>>>>

>>>>>>>

>>>>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>>>>> ---

>>>>>>>>      include/odp_drv.h                              |  1 +

>>>>>>>>      platform/linux-generic/Makefile.am             |  1 +

>>>>>>>>      platform/linux-generic/include/odp/drv/align.h | 60

>>>>>>>> ++++++++++++++++++++++++++

>>>>>>>>      3 files changed, 62 insertions(+)

>>>>>>>>      create mode 100644 platform/linux-generic/include/odp/drv/align.h

>>>>>>>>

>>>>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>>>>> index e2c3bda..6d2f7ff 100644

>>>>>>>> --- a/include/odp_drv.h

>>>>>>>> +++ b/include/odp_drv.h

>>>>>>>> @@ -18,6 +18,7 @@

>>>>>>>>      extern C {

>>>>>>>>      #endif

>>>>>>>>      +#include <odp/drv/align.h>

>>>>>>>>      #include <odp/drv/byteorder.h>

>>>>>>>>      #include <odp/drv/compiler.h>

>>>>>>>>      #include <odp/drv/std_types.h>

>>>>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>>>>> b/platform/linux-generic/Makefile.am

>>>>>>>> index 68db647..20b4b29 100644

>>>>>>>> --- a/platform/linux-generic/Makefile.am

>>>>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>>>>        odpdrvincludedir = $(includedir)/odp/drv

>>>>>>>>      odpdrvinclude_HEADERS = \

>>>>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>>>>                      $(srcdir)/include/odp/drv/byteorder.h \

>>>>>>>>                      $(srcdir)/include/odp/drv/compiler.h \

>>>>>>>>                      $(srcdir)/include/odp/drv/std_types.h \

>>>>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>>>>> new file mode 100644

>>>>>>>> index 0000000..9ae3e19

>>>>>>>> --- /dev/null

>>>>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>>>>> @@ -0,0 +1,60 @@

>>>>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>>>>> + * All rights reserved.

>>>>>>>> + *

>>>>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>>>>> + */

>>>>>>>> +

>>>>>>>> +/**

>>>>>>>> + * @file

>>>>>>>> + *

>>>>>>>> + * ODPDRV alignments

>>>>>>>> + */

>>>>>>>> +

>>>>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>>>>> +

>>>>>>>> +#ifdef __cplusplus

>>>>>>>> +extern "C" {

>>>>>>>> +#endif

>>>>>>>> +

>>>>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>>>>> + *  @{

>>>>>>>> + */

>>>>>>>> +

>>>>>>>> +#ifdef __GNUC__

>>>>>>>> +

>>>>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>>>>> +

>>>>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>>>>> +

>>>>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,

>>>>>>>> member)

>>>>>>>> +

>>>>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)

>>>>>>>> +

>>>>>>>> +#if defined __arm__ || defined __aarch64__

>>>>>>>> +

>>>>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>>>>> +

>>>>>>>> +#endif

>>>>>>>> +

>>>>>>>> +#else

>>>>>>>> +#error Non-gcc compatible compiler

>>>>>>>> +#endif

>>>>>>>> +

>>>>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>>>>> +

>>>>>>>> +#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>>>>> +

>>>>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>>>>> +

>>>>>>>> +/**

>>>>>>>> + * @}

>>>>>>>> + */

>>>>>>>> +

>>>>>>>> +#include <odp/drv/spec/align.h>

>>>>>>>> +

>>>>>>>> +#ifdef __cplusplus

>>>>>>>> +}

>>>>>>>> +#endif

>>>>>>>> +

>>>>>>>> +#endif

>>>>>>>
Christophe Milard July 21, 2016, 10:54 a.m. UTC | #10
I do care about these hashes: The point is, if in the future, we have
a bug on the DRV interface which involves these common things, and we
don't see the bug on the API, we may be interrested to see what has
changed on both sides since the "copy". So I see a value in keeping
this info.

I see a value having them. I'll send a v3 without then, but still hope
you'll merge v2. You are the maintener: you choose.

Christophe

On 21 July 2016 at 11:58, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> On 07/21/16 11:09, Christophe Milard wrote:

>>

>> So what now, Maxim? Still want a v3 without the hash?

>> I guess you decide as you are the maintener...

>

>

> I will accept patches without this hash because it's very confusing. Or with

> this hash but if I understand why it has to be there.

> If you don't care about this hashes than it's quicker to just send v3.

>

> Maxim.

>

>

>

>> On 21 July 2016 at 09:40, Anders Roxell <anders.roxell@linaro.org> wrote:

>>>

>>> On 21 July 2016 at 09:20, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>

>>>> On 07/21/16 10:01, Christophe Milard wrote:

>>>>>

>>>>> On 21 July 2016 at 08:45, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>>>>>>

>>>>>> On 07/20/16 23:07, Christophe Milard wrote:

>>>>>>>

>>>>>>> I am not sure I understand the problem ?

>>>>>>> The files were originated from the following commit ID which was the

>>>>>>> last commit ID in the api-next branch when I did the patch...

>>>>>>>

>>>>>>> I have had a review from Anders and will send a v2 anyway now

>>>>>>>

>>>>>>> Christophe.

>>>>>>>

>>>>>>>

>>>>>>> Christophe

>>>>>>> commit 77a27212b563299959fb2a609b86bb9117a8f918

>>>>>>> Author: Barry Spinney <spinney@mellanox.com>

>>>>>>> Date:   Wed Jul 13 11:59:40 2016 -0500

>>>>>>>

>>>>>>>        api: tm: resolve todo

>>>>>>>

>>>>>>>        This todo just asks a question which is no longer important.

>>>>>>>

>>>>>>>        Signed-off-by: Barry Spinney <spinney@mellanox.com>

>>>>>>>        Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>>>>>        Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>>>>>>

>>>>>>

>>>>>> Do no understand you also. You say in commit log:

>>>>>> """

>>>>>>

>>>>>> duplicated from the API side

>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>> """

>>>>>>

>>>>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h

>>>>>> So it's not duplicate of api 77a23212 but for drivers.

>>>>>>

>>>>>> If your patch set is bases on some commit id in api-next, that

>>>>>> information

>>>>>> should

>>>>>> not be in git log.

>>>>>

>>>>> The point is to remember the version of the API files my new drv files

>>>>> are based on.

>>>>> Are you saying that you do not want this information in the commit

>>>>> message.

>>>>> Do you want me to remove the hash from the commit messages??

>>>>>

>>>>> Christophe.

>>>>

>>>>

>>>> yes, please remove them. I think you can fetch this information from

>>>> mailing

>>>> list if it will be needed.

>>>

>>> its better to have a changelog with more information than too little so

>>> that you

>>> have to search the ML to find whats been going on.

>>>

>>> Cheers,

>>> Anders

>>>

>>>> btw, I tested your patches and all tests passed.

>>>>

>>>> Maxim.

>>>>

>>>>

>>>>

>>>>>> Maxim.

>>>>>>

>>>>>>

>>>>>>

>>>>>>> On 20 July 2016 at 20:49, Maxim Uvarov <maxim.uvarov@linaro.org>

>>>>>>> wrote:

>>>>>>>>

>>>>>>>> On 07/18/16 20:49, Christophe Milard wrote:

>>>>>>>>>

>>>>>>>>> duplicated from the API side

>>>>>>>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)

>>>>>>>>

>>>>>>>> all commits have reference to this hash which looks like not very

>>>>>>>> correlate

>>>>>>>> with what should it be....

>>>>>>>>

>>>>>>>> Maxim.

>>>>>>>>

>>>>>>>>

>>>>>>>>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>>>>>>>> ---

>>>>>>>>>      include/odp_drv.h                              |  1 +

>>>>>>>>>      platform/linux-generic/Makefile.am             |  1 +

>>>>>>>>>      platform/linux-generic/include/odp/drv/align.h | 60

>>>>>>>>> ++++++++++++++++++++++++++

>>>>>>>>>      3 files changed, 62 insertions(+)

>>>>>>>>>      create mode 100644

>>>>>>>>> platform/linux-generic/include/odp/drv/align.h

>>>>>>>>>

>>>>>>>>> diff --git a/include/odp_drv.h b/include/odp_drv.h

>>>>>>>>> index e2c3bda..6d2f7ff 100644

>>>>>>>>> --- a/include/odp_drv.h

>>>>>>>>> +++ b/include/odp_drv.h

>>>>>>>>> @@ -18,6 +18,7 @@

>>>>>>>>>      extern C {

>>>>>>>>>      #endif

>>>>>>>>>      +#include <odp/drv/align.h>

>>>>>>>>>      #include <odp/drv/byteorder.h>

>>>>>>>>>      #include <odp/drv/compiler.h>

>>>>>>>>>      #include <odp/drv/std_types.h>

>>>>>>>>> diff --git a/platform/linux-generic/Makefile.am

>>>>>>>>> b/platform/linux-generic/Makefile.am

>>>>>>>>> index 68db647..20b4b29 100644

>>>>>>>>> --- a/platform/linux-generic/Makefile.am

>>>>>>>>> +++ b/platform/linux-generic/Makefile.am

>>>>>>>>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \

>>>>>>>>>        odpdrvincludedir = $(includedir)/odp/drv

>>>>>>>>>      odpdrvinclude_HEADERS = \

>>>>>>>>> +                 $(srcdir)/include/odp/drv/align.h \

>>>>>>>>>                      $(srcdir)/include/odp/drv/byteorder.h \

>>>>>>>>>                      $(srcdir)/include/odp/drv/compiler.h \

>>>>>>>>>                      $(srcdir)/include/odp/drv/std_types.h \

>>>>>>>>> diff --git a/platform/linux-generic/include/odp/drv/align.h

>>>>>>>>> b/platform/linux-generic/include/odp/drv/align.h

>>>>>>>>> new file mode 100644

>>>>>>>>> index 0000000..9ae3e19

>>>>>>>>> --- /dev/null

>>>>>>>>> +++ b/platform/linux-generic/include/odp/drv/align.h

>>>>>>>>> @@ -0,0 +1,60 @@

>>>>>>>>> +/* Copyright (c) 2013, Linaro Limited

>>>>>>>>> + * All rights reserved.

>>>>>>>>> + *

>>>>>>>>> + * SPDX-License-Identifier:    BSD-3-Clause

>>>>>>>>> + */

>>>>>>>>> +

>>>>>>>>> +/**

>>>>>>>>> + * @file

>>>>>>>>> + *

>>>>>>>>> + * ODPDRV alignments

>>>>>>>>> + */

>>>>>>>>> +

>>>>>>>>> +#ifndef ODPDRV_PLAT_ALIGN_H_

>>>>>>>>> +#define ODPDRV_PLAT_ALIGN_H_

>>>>>>>>> +

>>>>>>>>> +#ifdef __cplusplus

>>>>>>>>> +extern "C" {

>>>>>>>>> +#endif

>>>>>>>>> +

>>>>>>>>> +/** @ingroup odpdrv_compiler_optim

>>>>>>>>> + *  @{

>>>>>>>>> + */

>>>>>>>>> +

>>>>>>>>> +#ifdef __GNUC__

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_PACKED __attribute__((__packed__))

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,

>>>>>>>>> member)

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type

>>>>>>>>> *)0)->member)

>>>>>>>>> +

>>>>>>>>> +#if defined __arm__ || defined __aarch64__

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_CACHE_LINE_SIZE 64

>>>>>>>>> +

>>>>>>>>> +#endif

>>>>>>>>> +

>>>>>>>>> +#else

>>>>>>>>> +#error Non-gcc compatible compiler

>>>>>>>>> +#endif

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_PAGE_SIZE       4096

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_ALIGNED_CACHE

>>>>>>>>> ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)

>>>>>>>>> +

>>>>>>>>> +#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)

>>>>>>>>> +

>>>>>>>>> +/**

>>>>>>>>> + * @}

>>>>>>>>> + */

>>>>>>>>> +

>>>>>>>>> +#include <odp/drv/spec/align.h>

>>>>>>>>> +

>>>>>>>>> +#ifdef __cplusplus

>>>>>>>>> +}

>>>>>>>>> +#endif

>>>>>>>>> +

>>>>>>>>> +#endif

>>>>>>>>

>>>>>>>>

>
diff mbox

Patch

diff --git a/include/odp_drv.h b/include/odp_drv.h
index e2c3bda..6d2f7ff 100644
--- a/include/odp_drv.h
+++ b/include/odp_drv.h
@@ -18,6 +18,7 @@ 
 extern C {
 #endif
 
+#include <odp/drv/align.h>
 #include <odp/drv/byteorder.h>
 #include <odp/drv/compiler.h>
 #include <odp/drv/std_types.h>
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 68db647..20b4b29 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -93,6 +93,7 @@  odpapiplatinclude_HEADERS = \
 
 odpdrvincludedir = $(includedir)/odp/drv
 odpdrvinclude_HEADERS = \
+		  $(srcdir)/include/odp/drv/align.h \
 		  $(srcdir)/include/odp/drv/byteorder.h \
 		  $(srcdir)/include/odp/drv/compiler.h \
 		  $(srcdir)/include/odp/drv/std_types.h \
diff --git a/platform/linux-generic/include/odp/drv/align.h b/platform/linux-generic/include/odp/drv/align.h
new file mode 100644
index 0000000..9ae3e19
--- /dev/null
+++ b/platform/linux-generic/include/odp/drv/align.h
@@ -0,0 +1,60 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:	BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODPDRV alignments
+ */
+
+#ifndef ODPDRV_PLAT_ALIGN_H_
+#define ODPDRV_PLAT_ALIGN_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @ingroup odpdrv_compiler_optim
+ *  @{
+ */
+
+#ifdef __GNUC__
+
+#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))
+
+#define ODPDRV_PACKED __attribute__((__packed__))
+
+#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type, member)
+
+#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)
+
+#if defined __arm__ || defined __aarch64__
+
+#define ODPDRV_CACHE_LINE_SIZE 64
+
+#endif
+
+#else
+#error Non-gcc compatible compiler
+#endif
+
+#define ODPDRV_PAGE_SIZE       4096
+
+#define ODPDRV_ALIGNED_CACHE   ODPDRV_ALIGNED(ODPDRV_CACHE_LINE_SIZE)
+
+#define ODPDRV_ALIGNED_PAGE    ODPDRV_ALIGNED(ODPDRV_PAGE_SIZE)
+
+/**
+ * @}
+ */
+
+#include <odp/drv/spec/align.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif