[lng-odp] [Bug 2865] odp helper table APIs are not documented

2017-01-31 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2865

--- Comment #4 from Mike Holmes  ---
Dug a little more - see the end of the patch for an obvious case that I missed
where there were no docs when originally reviewed :/

http://patches.opendataplane.org/patch/6197/ 

Not sure who has used this code if anyone, but I think it is only the helpers
that use it for self test. Is anyone familiar enough with it to add the docs
easily ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[lng-odp] [Bug 2865] odp helper table APIs are not documented

2017-01-31 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2865

Bill Fischofer  changed:

   What|Removed |Added

 CC||bill.fischo...@linaro.org

--- Comment #3 from Bill Fischofer  ---
You may have some stale files in that directory. On a clean pull of v1.13.0.0 I
see this:

bill@Ubuntu15:~/linaro/review$ make doxygen-doc
  DXGEN  doc/application-api-guide/Doxyfile
  DXGEN  doc/helper-guide/Doxyfile
  DXGEN  doc/platform-api-guide/Doxyfile
  DXGEN  doc/driver-api-guide/Doxyfile
bill@Ubuntu15:~/linaro/review$ 

I doubt this would have escaped Maxim's testing prior to tagging that release.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Re: [lng-odp] [PATCH v4 0/8] First ABI files

2017-01-31 Thread Bill Fischofer
Thanks, Petri. This now seems fully bisectable. For this series:

Reviewed-and-tested-by: Bill Fischofer 

On Tue, Jan 31, 2017 at 2:07 AM, Petri Savolainen
 wrote:
> Added initial version of couple of ABI specification files. These files define
> types/values that are implementation specific in the API spec. For ABI
> compatibility, application and implementation need to use these definitions
> (based on the target architecture). ABI is defined by CPU ISA (including
> version, endianism, etc) and SW environment (OS and compiler). Six different
> ABIs are initially defined - all are Linux based and assume the default
> endianism.
>
> Some unused types were found for API spec. Those will be removed once this
> patch set is merged with api-next.
>
> v2:
>   * Use strong types as default handle types
>
> v3:
>   * Rebased. Updated helper test Makefile.
>
> v4:
>   * Rebased. Changed author mail address.
>
> Petri Savolainen (8):
>   abi: event: added the first ABI spec file
>   abi: buffer: added initial definitions
>   abi: classifier: added initial definitions
>   abi: crypto: added initial definitions
>   abi: packet: added initial definitions
>   abi: pool: added initial definitions
>   abi: queue: added initial definitions
>   abi: shm: added initial definitions
>
>  configure.ac   | 22 ++
>  example/Makefile.inc   |  1 +
>  example/timer/odp_timer_test.c |  2 +-
>  helper/Makefile.am |  1 +
>  helper/test/Makefile.am|  1 +
>  include/odp/arch/arm32-linux/odp/api/abi/buffer.h  |  7 
>  .../arch/arm32-linux/odp/api/abi/classification.h  |  7 
>  include/odp/arch/arm32-linux/odp/api/abi/crypto.h  |  7 
>  include/odp/arch/arm32-linux/odp/api/abi/event.h   |  7 
>  include/odp/arch/arm32-linux/odp/api/abi/packet.h  |  7 
>  include/odp/arch/arm32-linux/odp/api/abi/pool.h|  7 
>  include/odp/arch/arm32-linux/odp/api/abi/queue.h   |  7 
>  .../arch/arm32-linux/odp/api/abi/shared_memory.h   |  7 
>  include/odp/arch/arm64-linux/odp/api/abi/buffer.h  |  7 
>  .../arch/arm64-linux/odp/api/abi/classification.h  |  7 
>  include/odp/arch/arm64-linux/odp/api/abi/crypto.h  |  7 
>  include/odp/arch/arm64-linux/odp/api/abi/event.h   |  7 
>  include/odp/arch/arm64-linux/odp/api/abi/packet.h  |  7 
>  include/odp/arch/arm64-linux/odp/api/abi/pool.h|  7 
>  include/odp/arch/arm64-linux/odp/api/abi/queue.h   |  7 
>  .../arch/arm64-linux/odp/api/abi/shared_memory.h   |  7 
>  include/odp/arch/default/api/abi/buffer.h  | 38 +
>  include/odp/arch/default/api/abi/classification.h  | 40 ++
>  include/odp/arch/default/api/abi/crypto.h  | 36 +
>  include/odp/arch/default/api/abi/event.h   | 42 +++
>  include/odp/arch/default/api/abi/packet.h  | 47 
> ++
>  include/odp/arch/default/api/abi/pool.h| 43 
>  include/odp/arch/default/api/abi/queue.h   | 35 
>  include/odp/arch/default/api/abi/shared_memory.h   | 35 
>  include/odp/arch/mips64-linux/odp/api/abi/buffer.h |  7 
>  .../arch/mips64-linux/odp/api/abi/classification.h |  7 
>  include/odp/arch/mips64-linux/odp/api/abi/crypto.h |  7 
>  include/odp/arch/mips64-linux/odp/api/abi/event.h  |  7 
>  include/odp/arch/mips64-linux/odp/api/abi/packet.h |  7 
>  include/odp/arch/mips64-linux/odp/api/abi/pool.h   |  7 
>  include/odp/arch/mips64-linux/odp/api/abi/queue.h  |  7 
>  .../arch/mips64-linux/odp/api/abi/shared_memory.h  |  7 
>  .../odp/arch/power64-linux/odp/api/abi/buffer.h|  7 
>  .../power64-linux/odp/api/abi/classification.h |  7 
>  .../odp/arch/power64-linux/odp/api/abi/crypto.h|  7 
>  include/odp/arch/power64-linux/odp/api/abi/event.h |  7 
>  .../odp/arch/power64-linux/odp/api/abi/packet.h|  7 
>  include/odp/arch/power64-linux/odp/api/abi/pool.h  |  7 
>  include/odp/arch/power64-linux/odp/api/abi/queue.h |  7 
>  .../arch/power64-linux/odp/api/abi/shared_memory.h |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/buffer.h |  7 
>  .../arch/x86_32-linux/odp/api/abi/classification.h |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/crypto.h |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/event.h  |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/packet.h |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/pool.h   |  7 
>  include/odp/arch/x86_32-linux/odp/api/abi/queue.h  |  7 
>  .../arch/x86_32-linux/odp/api/abi/shared_memory.h  |  7 
>  include/odp/arch/x86_64-linux/odp/api/abi/buffer.h |  7 
>  .../arch/x86_64-linux/odp/api/abi/classification.h |  7 
>  include/odp/arch/x86_64-linux/odp/api/abi/crypto.h |  7 
>  include/odp/ar

[lng-odp] [Bug 2865] odp helper table APIs are not documented

2017-01-31 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2865

--- Comment #2 from Mike Holmes  ---
I dont think that is correct as I see it is in 1.13.0.0 prior to helper clean
up updates

mike@mike-desktop:~/work/git/odp$ git show
commit 3875d6ebf690e07b69f11621caefab1afc58e100
Author: Maxim Uvarov 
Date:   Fri Jan 13 16:50:36 2017 +0300

update API version number from v1.12.0.0 to v1.13.0.0

mike@mike-desktop:~/work/git/odp$ make doxygen-doc 
  DXGEN  doc/application-api-guide/Doxyfile
  DXGEN  doc/helper-guide/Doxyfile
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:27:
warning: Compound odph_iplookup_prefix_t is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:55:
warning: Member odph_cuckoo_table_create(const char *name, uint32_t capacity,
uint32_t key_size, uint32_t value_size) (function) of file odph_cuckootable.h
is not documented.

A quick git blame then uncovers fd86c7fd and looking at it you see that in deed
there is no documentation in that commit

commit fd86c7fd19820e21c182e2c0e043331e6aab6282
Author: Ru Jia 
Date:   Thu Jun 30 16:15:31 2016 +0800

helper: table: add impl of ip lookup table

This is an implementation of the 16,8,8 ip lookup
(longest prefix matching) algorithm. The key of the
table is 32-bit IPv4 address.

Signed-off-by: Ru Jia 
Reviewed-and-tested-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.

Re: [lng-odp] [PATCHv2 1/2] linux-generic: classification: implement ipv6 packet matching rule

2017-01-31 Thread Bill Fischofer
For this series:

Reviewed-and-tested-by: Bill Fischofer 

On Tue, Jan 31, 2017 at 12:42 AM, Balasubramanian Manoharan
 wrote:
> Adds test case for ipv6 source and destination address matching
>
> Signed-off-by: Balasubramanian Manoharan 
> ---
> v2: clang compilation fix
>  .../include/odp_classification_datamodel.h | 11 +-
>  .../include/odp_classification_inlines.h   | 44 
> ++
>  .../linux-generic/include/odp_packet_internal.h|  5 +++
>  platform/linux-generic/odp_classification.c| 26 +
>  4 files changed, 77 insertions(+), 9 deletions(-)
>
> diff --git a/platform/linux-generic/include/odp_classification_datamodel.h 
> b/platform/linux-generic/include/odp_classification_datamodel.h
> index f6393ee..5b1cde3 100644
> --- a/platform/linux-generic/include/odp_classification_datamodel.h
> +++ b/platform/linux-generic/include/odp_classification_datamodel.h
> @@ -25,6 +25,7 @@ extern "C" {
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Maximum Class Of Service Entry */
>  #define ODP_COS_MAX_ENTRY  64
> @@ -43,7 +44,7 @@ extern "C" {
>  /* Max L3 QoS Value */
>  #define ODP_COS_MAX_L3_QOS (1 << ODP_COS_L3_QOS_BITS)
>  /* Max PMR Term bits */
> -#define ODP_PMR_TERM_BYTES_MAX 8
> +#define ODP_PMR_TERM_BYTES_MAX 16
>
>  /**
>  Packet Matching Rule Term Value
> @@ -67,6 +68,14 @@ typedef struct pmr_term_value {
> /** End value of the range */
> uint64_tval_end;
> } range;
> +   struct {
> +   uint8_t value[_ODP_IPV6ADDR_LEN];
> +   uint8_t mask[_ODP_IPV6ADDR_LEN];
> +   } match_ipv6;
> +   struct {
> +   uint8_t val_start[_ODP_IPV6ADDR_LEN];
> +   uint8_t val_end[_ODP_IPV6ADDR_LEN];
> +   } range_ipv6;
> };
> uint32_toffset; /**< Offset if term == ODP_PMR_CUSTOM_FRAME */
> uint32_tval_sz; /**< Size of the value to be matched */
> diff --git a/platform/linux-generic/include/odp_classification_inlines.h 
> b/platform/linux-generic/include/odp_classification_inlines.h
> index b839197..4d85cf2 100644
> --- a/platform/linux-generic/include/odp_classification_inlines.h
> +++ b/platform/linux-generic/include/odp_classification_inlines.h
> @@ -179,19 +179,47 @@ static inline int verify_pmr_dmac(const uint8_t 
> *pkt_addr,
> return 0;
>  }
>
> -static inline int verify_pmr_ipv6_saddr(const uint8_t *pkt_addr ODP_UNUSED,
> -   odp_packet_hdr_t *pkt_hdr ODP_UNUSED,
> -   pmr_term_value_t *term_value 
> ODP_UNUSED)
> +static inline int verify_pmr_ipv6_saddr(const uint8_t *pkt_addr,
> +   odp_packet_hdr_t *pkt_hdr,
> +   pmr_term_value_t *term_value)
>  {
> -   ODP_UNIMPLEMENTED();
> +   const _odp_ipv6hdr_t *ipv6;
> +   uint8_t src_addr[_ODP_IPV6ADDR_LEN];
> +   uint8_t i;
> +
> +   if (!packet_hdr_has_ipv6(pkt_hdr))
> +   return 0;
> +
> +   ipv6 = (const _odp_ipv6hdr_t *)(pkt_addr + pkt_hdr->p.l3_offset);
> +   memcpy(src_addr, ipv6->src_addr, _ODP_IPV6ADDR_LEN);
> +   for (i = 0; i < _ODP_IPV6ADDR_LEN; i++)
> +   src_addr[i] = src_addr[i] & term_value->match_ipv6.mask[i];
> +
> +   if (!memcmp(term_value->match_ipv6.value, src_addr, 
> _ODP_IPV6ADDR_LEN))
> +   return 1;
> +
> return 0;
>  }
>
> -static inline int verify_pmr_ipv6_daddr(const uint8_t *pkt_addr ODP_UNUSED,
> -   odp_packet_hdr_t *pkt_hdr ODP_UNUSED,
> -   pmr_term_value_t *term_value 
> ODP_UNUSED)
> +static inline int verify_pmr_ipv6_daddr(const uint8_t *pkt_addr,
> +   odp_packet_hdr_t *pkt_hdr,
> +   pmr_term_value_t *term_value)
>  {
> -   ODP_UNIMPLEMENTED();
> +   const _odp_ipv6hdr_t *ipv6;
> +   uint8_t dst_addr[_ODP_IPV6ADDR_LEN];
> +   uint8_t i;
> +
> +   if (!packet_hdr_has_ipv6(pkt_hdr))
> +   return 0;
> +
> +   ipv6 = (const _odp_ipv6hdr_t *)(pkt_addr + pkt_hdr->p.l3_offset);
> +   memcpy(dst_addr, ipv6->dst_addr, _ODP_IPV6ADDR_LEN);
> +   for (i = 0; i < _ODP_IPV6ADDR_LEN; i++)
> +   dst_addr[i] = dst_addr[i] & term_value->match_ipv6.mask[i];
> +
> +   if (!memcmp(term_value->match_ipv6.value, dst_addr, 
> _ODP_IPV6ADDR_LEN))
> +   return 1;
> +
> return 0;
>  }
>
> diff --git a/platform/linux-generic/include/odp_packet_internal.h 
> b/platform/linux-generic/include/odp_packet_internal.h
> index e6e9d74..e3ada5c 100644
> --- a/platform/linux-generic/include/odp_packet_internal.h
> +++ b/platform/linux-generic/include/odp_packet_

Re: [lng-odp] [PATCH] linux-generic: Add ARM odp_cpu_pause()

2017-01-31 Thread Bill Fischofer
On Thu, Jan 26, 2017 at 9:31 PM, Brian Brooks  wrote:
> Signed-off-by: Brian Brooks 

Reviewed-by: Bill Fischofer 

> ---
>  platform/linux-generic/arch/arm/odp/api/cpu_arch.h | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/platform/linux-generic/arch/arm/odp/api/cpu_arch.h 
> b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h
> index 22b1da2d..7c75a690 100644
> --- a/platform/linux-generic/arch/arm/odp/api/cpu_arch.h
> +++ b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h
> @@ -15,6 +15,12 @@ extern "C" {
>
>  static inline void odp_cpu_pause(void)
>  {
> +   /* YIELD hints the CPU to switch to another thread if possible
> +* and executes as a NOP otherwise.
> +* ISB flushes the pipeline, then restarts. This is guaranteed to
> +* stall the CPU a number of cycles.
> +*/
> +   __asm volatile("isb" ::: "memory");
>  }
>
>  #ifdef __cplusplus
> --
> 2.11.0
>


Re: [lng-odp] ODP install error with dpdk 16.07

2017-01-31 Thread Bill Fischofer
On Tue, Jan 31, 2017 at 9:30 AM, Elo, Matias (Nokia - FI/Espoo)
 wrote:
>
>> Thanks, with this configuration it is working.
>> My doubt here is:
>> Why we are not using shared lib, and abi-compat ??
>
> With --disable-shared and --disable-abi-compat you get the best performance 
> but they are not mandatory. I'm doing a lot of benchmarking, so I use them 
> always.

Thanks, Matias. For your benchmarking it would be good to get a
comparison run without those options to better quantify the overhead
of ABI compatibility mode. Right now we're taking a strict approach to
ABI so as to minimize the coordination requirements between
implementations supporting that ABI, however it's possible to tighten
things up by allowing certain inline function expansions if the
members of the ABI agree on some common aspects of their respective
internals. These sort of comparisons would be the sort of
justification needed for doing that extra spec work.

>
> -Matias


[lng-odp] [Bug 2865] odp helper table APIs are not documented

2017-01-31 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2865

--- Comment #1 from Bill Fischofer  ---
git bisect shows this is the offending patch:

88ed645e7378b955c580ec2b8ce9b846a5fb48f0 is the first bad commit
commit 88ed645e7378b955c580ec2b8ce9b846a5fb48f0
Author: Mike Holmes 
Date:   Mon Jan 23 14:46:06 2017 -0500

helper: use odph_api.h for test include for unexported files

Adding the previously missing table functions to the public helper api
allows the tests to use just odph_api.h

Signed-off-by: Mike Holmes 
Reviewed-by: Christophe Milard 
Signed-off-by: Maxim Uvarov 

:04 04 519f215bdff87c5374c85d16b27e9f7baee34743
65c0ab719e30826394f9af1fb1be6814155fc3cb M helper

On Tue, Jan 31, 2017 at 1:41 PM,   wrote:
> https://bugs.linaro.org/show_bug.cgi?id=2865
>
> Bug ID: 2865
>Summary: odp helper table APIs are not documented
>Product: OpenDataPlane - linux- generic reference
>Version: v1.13.0.0
>   Hardware: Other
> OS: Linux
> Status: UNCONFIRMED
>   Severity: enhancement
>   Priority: ---
>  Component: Helpers
>   Assignee: lng-odp@lists.linaro.org
>   Reporter: mike.hol...@linaro.org
> CC: lng-odp@lists.linaro.org
>   Target Milestone: ---
>
> mike@mike-desktop:~/work/git/odp$ make doxygen-doc
>   DXGEN  doc/application-api-guide/Doxyfile
>   DXGEN  doc/helper-guide/Doxyfile
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:27:
> warning: Compound odph_iplookup_prefix_t is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:55:
> warning: Member odph_cuckoo_table_create(const char *name, uint32_t capacity,
> uint32_t key_size, uint32_t value_size) (function) of file odph_cuckootable.h
> is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:61:
> warning: Member odph_cuckoo_table_lookup(const char *name) (function) of file
> odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:63:
> warning: Member odph_cuckoo_table_destroy(odph_table_t table) (function) of
> file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:65:
> warning: Member odph_cuckoo_table_put_value(odph_table_t table, void *key, 
> void
> *value) (function) of file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:69:
> warning: Member odph_cuckoo_table_get_value(odph_table_t table, void *key, 
> void
> *buffer, uint32_t buffer_size) (function) of file odph_cuckootable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:74:
> warning: Member odph_cuckoo_table_remove_value(odph_table_t table, void *key)
> (function) of file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:76:
> warning: Member odph_cuckoo_table_ops (variable) of file odph_cuckootable.h is
> not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:22: 
> warning:
> Member odph_hash_table_create(const char *name, uint32_t capacity, uint32_t
> key_size, uint32_t value_size) (function) of file odph_hashtable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:26: 
> warning:
> Member odph_hash_table_lookup(const char *name) (function) of file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:27: 
> warning:
> Member odph_hash_table_destroy(odph_table_t table) (function) of file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:28: 
> warning:
> Member odph_hash_put_value(odph_table_t table, void *key, void *value)
> (function) of file odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:29: 
> warning:
> Member odph_hash_get_value(odph_table_t table, void *key, void *buffer,
> uint32_t buffer_size) (function) of file odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:31: 
> warning:
> Member odph_hash_remove_value(odph_table_t table, void *key) (function) of 
> file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:33: 
> warning:
> Member odph_hash_table_ops (variable) of file odph_hashtable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:32:
> warning: Member odph_iplookup_table_create(const char *name, uint32_t
> ODP_IGNORED_1, uint32_t ODP_IGNORED_2, uint32_t value_size) (function) of file
> odph_iplookuptable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:38:
> warning: Member odph_iplookup_table_lookup(const char *name)

Re: [lng-odp] [Bug 2865] New: odp helper table APIs are not documented

2017-01-31 Thread Bill Fischofer
git bisect shows this is the offending patch:

88ed645e7378b955c580ec2b8ce9b846a5fb48f0 is the first bad commit
commit 88ed645e7378b955c580ec2b8ce9b846a5fb48f0
Author: Mike Holmes 
Date:   Mon Jan 23 14:46:06 2017 -0500

helper: use odph_api.h for test include for unexported files

Adding the previously missing table functions to the public helper api
allows the tests to use just odph_api.h

Signed-off-by: Mike Holmes 
Reviewed-by: Christophe Milard 
Signed-off-by: Maxim Uvarov 

:04 04 519f215bdff87c5374c85d16b27e9f7baee34743
65c0ab719e30826394f9af1fb1be6814155fc3cb M helper

On Tue, Jan 31, 2017 at 1:41 PM,   wrote:
> https://bugs.linaro.org/show_bug.cgi?id=2865
>
> Bug ID: 2865
>Summary: odp helper table APIs are not documented
>Product: OpenDataPlane - linux- generic reference
>Version: v1.13.0.0
>   Hardware: Other
> OS: Linux
> Status: UNCONFIRMED
>   Severity: enhancement
>   Priority: ---
>  Component: Helpers
>   Assignee: lng-odp@lists.linaro.org
>   Reporter: mike.hol...@linaro.org
> CC: lng-odp@lists.linaro.org
>   Target Milestone: ---
>
> mike@mike-desktop:~/work/git/odp$ make doxygen-doc
>   DXGEN  doc/application-api-guide/Doxyfile
>   DXGEN  doc/helper-guide/Doxyfile
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:27:
> warning: Compound odph_iplookup_prefix_t is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:55:
> warning: Member odph_cuckoo_table_create(const char *name, uint32_t capacity,
> uint32_t key_size, uint32_t value_size) (function) of file odph_cuckootable.h
> is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:61:
> warning: Member odph_cuckoo_table_lookup(const char *name) (function) of file
> odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:63:
> warning: Member odph_cuckoo_table_destroy(odph_table_t table) (function) of
> file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:65:
> warning: Member odph_cuckoo_table_put_value(odph_table_t table, void *key, 
> void
> *value) (function) of file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:69:
> warning: Member odph_cuckoo_table_get_value(odph_table_t table, void *key, 
> void
> *buffer, uint32_t buffer_size) (function) of file odph_cuckootable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:74:
> warning: Member odph_cuckoo_table_remove_value(odph_table_t table, void *key)
> (function) of file odph_cuckootable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:76:
> warning: Member odph_cuckoo_table_ops (variable) of file odph_cuckootable.h is
> not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:22: 
> warning:
> Member odph_hash_table_create(const char *name, uint32_t capacity, uint32_t
> key_size, uint32_t value_size) (function) of file odph_hashtable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:26: 
> warning:
> Member odph_hash_table_lookup(const char *name) (function) of file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:27: 
> warning:
> Member odph_hash_table_destroy(odph_table_t table) (function) of file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:28: 
> warning:
> Member odph_hash_put_value(odph_table_t table, void *key, void *value)
> (function) of file odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:29: 
> warning:
> Member odph_hash_get_value(odph_table_t table, void *key, void *buffer,
> uint32_t buffer_size) (function) of file odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:31: 
> warning:
> Member odph_hash_remove_value(odph_table_t table, void *key) (function) of 
> file
> odph_hashtable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:33: 
> warning:
> Member odph_hash_table_ops (variable) of file odph_hashtable.h is not
> documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:32:
> warning: Member odph_iplookup_table_create(const char *name, uint32_t
> ODP_IGNORED_1, uint32_t ODP_IGNORED_2, uint32_t value_size) (function) of file
> odph_iplookuptable.h is not documented.
> /home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:38:
> warning: Member odph_iplookup_table_lookup(const char *name) (function) of 
> file
> odph_iplookuptable.h is not documented.
> /home/mike/work/git

Re: [lng-odp] [PATCH v2] example: add IPv4 fragmentation/reassembly example

2017-01-31 Thread Bill Fischofer
On Mon, Jan 30, 2017 at 4:32 AM, Joe Savage  wrote:
> Add an example application implementing lock-free IPv4 fragmentation
> and reassembly functionality using ODP's packet "concat" and "split".
>
> Signed-off-by: Joe Savage 

Reviewed-and-tested-by: Bill Fischofer 

> ---
> (This code contribution is provided under the terms of agreement 
> LES-LTM-21309)
>
>  doc/application-api-guide/examples.dox   |   5 +
>  example/Makefile.am  |   1 +
>  example/ipfragreass/.gitignore   |   3 +
>  example/ipfragreass/Makefile.am  |  22 +
>  example/ipfragreass/odp_ipfragreass.c| 393 
>  example/ipfragreass/odp_ipfragreass_atomics.h| 124 
>  example/ipfragreass/odp_ipfragreass_fragment.c   |  99 +++
>  example/ipfragreass/odp_ipfragreass_fragment.h   |  28 +
>  example/ipfragreass/odp_ipfragreass_helpers.c| 121 
>  example/ipfragreass/odp_ipfragreass_helpers.h| 129 
>  example/ipfragreass/odp_ipfragreass_ip.h | 251 
>  example/ipfragreass/odp_ipfragreass_reassemble.c | 772 
> +++
>  example/ipfragreass/odp_ipfragreass_reassemble.h | 211 +++
>  example/m4/configure.m4  |   1 +
>  14 files changed, 2160 insertions(+)
>  create mode 100644 example/ipfragreass/.gitignore
>  create mode 100644 example/ipfragreass/Makefile.am
>  create mode 100644 example/ipfragreass/odp_ipfragreass.c
>  create mode 100644 example/ipfragreass/odp_ipfragreass_atomics.h
>  create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.c
>  create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.h
>  create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.c
>  create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.h
>  create mode 100644 example/ipfragreass/odp_ipfragreass_ip.h
>  create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.c
>  create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.h
>
> diff --git a/doc/application-api-guide/examples.dox 
> b/doc/application-api-guide/examples.dox
> index 60d4058..80fe467 100644
> --- a/doc/application-api-guide/examples.dox
> +++ b/doc/application-api-guide/examples.dox
> @@ -28,3 +28,8 @@
>   * @example odp_timer_test.c
>   * ODP timer example application
>   */
> +
> + /**
> +  * @example odp_ipfragreass.c
> +  * ODP IPv4 lock-free fragmentation and reassembly example application
> +  */
> diff --git a/example/Makefile.am b/example/Makefile.am
> index dfc07b6..9503a1b 100644
> --- a/example/Makefile.am
> +++ b/example/Makefile.am
> @@ -2,6 +2,7 @@ SUBDIRS = classifier \
>   generator \
>   hello \
>   ipsec \
> + ipfragreass \
>   l2fwd_simple \
>   l3fwd \
>   packet \
> diff --git a/example/ipfragreass/.gitignore b/example/ipfragreass/.gitignore
> new file mode 100644
> index 000..d25d758
> --- /dev/null
> +++ b/example/ipfragreass/.gitignore
> @@ -0,0 +1,3 @@
> +odp_ipfragreass
> +*.log
> +*.trs
> diff --git a/example/ipfragreass/Makefile.am b/example/ipfragreass/Makefile.am
> new file mode 100644
> index 000..d9abce9
> --- /dev/null
> +++ b/example/ipfragreass/Makefile.am
> @@ -0,0 +1,22 @@
> +include $(top_srcdir)/example/Makefile.inc
> +
> +bin_PROGRAMS = odp_ipfragreass$(EXEEXT)
> +odp_ipfragreass_LDFLAGS = $(AM_LDFLAGS) -static
> +odp_ipfragreass_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
> +
> +noinst_HEADERS = \
> + $(top_srcdir)/example/ipfragreass/odp_ipfragreass_atomics.h 
> \
> + 
> $(top_srcdir)/example/ipfragreass/odp_ipfragreass_fragment.h \
> + $(top_srcdir)/example/ipfragreass/odp_ipfragreass_helpers.h 
> \
> + $(top_srcdir)/example/ipfragreass/odp_ipfragreass_ip.h \
> + 
> $(top_srcdir)/example/ipfragreass/odp_ipfragreass_reassemble.h \
> + $(top_srcdir)/example/example_debug.h
> +
> +dist_odp_ipfragreass_SOURCES = odp_ipfragreass.c \
> +  odp_ipfragreass_fragment.c \
> +  odp_ipfragreass_helpers.c \
> +  odp_ipfragreass_reassemble.c
> +
> +if test_example
> +TESTS = odp_ipfragreass
> +endif
> diff --git a/example/ipfragreass/odp_ipfragreass.c 
> b/example/ipfragreass/odp_ipfragreass.c
> new file mode 100644
> index 000..8956703
> --- /dev/null
> +++ b/example/ipfragreass/odp_ipfragreass.c
> @@ -0,0 +1,393 @@
> +/* Copyright (c) 2017, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * @example odp_ipfragreass.c  ODP IPv4 lock-free fragmentation and 
> reassembly
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +#include "odp_ipfragreass_fragment.h"
> +#include "odp_ipfragreass_reassemble.h"
> +#include "odp_ipfragreass_helpers.h"
> +
> +#define NUM_PACKETS 200   /**< Number of packets 

Re: [lng-odp] [PATCH v2] example: add IPv4 fragmentation/reassembly example

2017-01-31 Thread Mike Holmes
checkpatch is only a tool to help reviewers so I would also say we accept
the warning in this case, an error maybe not.

On 31 January 2017 at 04:19, Joe Savage  wrote:

> > > Checkpatch still has some issues with this:
> > >
> > > ill at Ubuntu15:~/linaro/review$ ./scripts/checkpatch.pl
> > > 0001-example-add-IPv4-fragmentation-reassembly-example.patch
> > > WARNING: 'DONT' may be misspelled - perhaps 'DON'T'?
> > > #1056: FILE: example/ipfragreass/odp_ipfragreass_ip.h:20:
> > > +#define IP_FRAG_DONT 0x4000 /**< "Don't Fragment" (DF) fragment flag
> */
> >
> > Seems like a design problem in checkpatch, breaking apart symbolic
> > names and testing the individual word fragments. Do all versions of
> > checkpatch behave like this? "Your symbolic names must consist of
> > properly spelled English words!".
> >
> > I think we should ignore checkpatch. And IPv4 came before checkpatch.
>
> I did encounter these checkpatch warnings (not errors!) myself when running
> the script before submission, and came to exactly this conclusion. I think
> the identifiers and macros in question are clearer with "dont" in the name
> than without, and if we're allowing identifiers like "nbr", "pkts", and
> "val_sz" anyway, I'm not sure there's that much of a difference.
>
> I'll grant you that it is slightly annoying, though slight enough that it
> doesn't really bother me. Perhaps I could change "dont_assemble" to
> something
> like "no_assemble", but that doesn't exactly make for correct English
> either!
> Open to suggestions if this is considered an issue.
>



-- 
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] [Bug 2865] New: odp helper table APIs are not documented

2017-01-31 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2865

Bug ID: 2865
   Summary: odp helper table APIs are not documented
   Product: OpenDataPlane - linux- generic reference
   Version: v1.13.0.0
  Hardware: Other
OS: Linux
Status: UNCONFIRMED
  Severity: enhancement
  Priority: ---
 Component: Helpers
  Assignee: lng-odp@lists.linaro.org
  Reporter: mike.hol...@linaro.org
CC: lng-odp@lists.linaro.org
  Target Milestone: ---

mike@mike-desktop:~/work/git/odp$ make doxygen-doc 
  DXGEN  doc/application-api-guide/Doxyfile
  DXGEN  doc/helper-guide/Doxyfile
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:27:
warning: Compound odph_iplookup_prefix_t is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:55:
warning: Member odph_cuckoo_table_create(const char *name, uint32_t capacity,
uint32_t key_size, uint32_t value_size) (function) of file odph_cuckootable.h
is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:61:
warning: Member odph_cuckoo_table_lookup(const char *name) (function) of file
odph_cuckootable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:63:
warning: Member odph_cuckoo_table_destroy(odph_table_t table) (function) of
file odph_cuckootable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:65:
warning: Member odph_cuckoo_table_put_value(odph_table_t table, void *key, void
*value) (function) of file odph_cuckootable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:69:
warning: Member odph_cuckoo_table_get_value(odph_table_t table, void *key, void
*buffer, uint32_t buffer_size) (function) of file odph_cuckootable.h is not
documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:74:
warning: Member odph_cuckoo_table_remove_value(odph_table_t table, void *key)
(function) of file odph_cuckootable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_cuckootable.h:76:
warning: Member odph_cuckoo_table_ops (variable) of file odph_cuckootable.h is
not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:22: warning:
Member odph_hash_table_create(const char *name, uint32_t capacity, uint32_t
key_size, uint32_t value_size) (function) of file odph_hashtable.h is not
documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:26: warning:
Member odph_hash_table_lookup(const char *name) (function) of file
odph_hashtable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:27: warning:
Member odph_hash_table_destroy(odph_table_t table) (function) of file
odph_hashtable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:28: warning:
Member odph_hash_put_value(odph_table_t table, void *key, void *value)
(function) of file odph_hashtable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:29: warning:
Member odph_hash_get_value(odph_table_t table, void *key, void *buffer,
uint32_t buffer_size) (function) of file odph_hashtable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:31: warning:
Member odph_hash_remove_value(odph_table_t table, void *key) (function) of file
odph_hashtable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_hashtable.h:33: warning:
Member odph_hash_table_ops (variable) of file odph_hashtable.h is not
documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:32:
warning: Member odph_iplookup_table_create(const char *name, uint32_t
ODP_IGNORED_1, uint32_t ODP_IGNORED_2, uint32_t value_size) (function) of file
odph_iplookuptable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:38:
warning: Member odph_iplookup_table_lookup(const char *name) (function) of file
odph_iplookuptable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:40:
warning: Member odph_iplookup_table_destroy(odph_table_t table) (function) of
file odph_iplookuptable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:42:
warning: Member odph_iplookup_table_put_value(odph_table_t table, void *key,
void *value) (function) of file odph_iplookuptable.h is not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:45:
warning: Member odph_iplookup_table_get_value(odph_table_t table, void *key,
void *buffer, uint32_t buffer_size) (function) of file odph_iplookuptable.h is
not documented.
/home/mike/work/git/odp/helper/include/odp/helper/odph_iplookuptable.h:49:
warning: Member odph_iplookup_table_remove_value(odph_table_t table, void *key)
(function) of file odph_iplookupt

Re: [lng-odp] [PATCH] helper: iplookuptable: avoid potential null pointer dereferences

2017-01-31 Thread Maxim Uvarov
On 01/30/17 19:56, Mike Holmes wrote:
> Hi Bill
> 
> Did you run this in GitHub coverity_scan and did it clear the issue for you
> ?
> 
> I ran it, but I did not have a before view for that nice fuzzy feeling of
> seeing it dissapear, only that I did not get informed of anything new with
> your patch applied.
> I think my results should be public if you have a github login, and the
> change looks correct.
> 
> https://travis-ci.org/mike-holmes-linaro/odp/builds/196630581
> https://scan.coverity.com/projects/mike-holmes-linaro-odp/view_defects
> 
> Mike
> 
> On 30 January 2017 at 09:35, Bill Fischofer 
> wrote:
> 
>> Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2862 by checking
>> pointer validity before dereferencing.
>>
>> Signed-off-by: Bill Fischofer 
>>
> 
> Reviewed-by: Mike Holmes 
> 


Merged,
Maxim.

> 
> 
>> ---
>>  helper/iplookuptable.c | 20 ++--
>>  1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c
>> index aaebea3..845125b 100644
>> --- a/helper/iplookuptable.c
>> +++ b/helper/iplookuptable.c
>> @@ -666,12 +666,14 @@ odph_iplookup_table_put_value(odph_table_t tbl,
>> void *key, void *value)
>> odph_iplookup_table_impl *impl = (void *)tbl;
>> odph_iplookup_prefix_t *prefix = (odph_iplookup_prefix_t *)key;
>> prefix_entry_t *l1e = NULL;
>> -   odp_buffer_t nexthop = *((odp_buffer_t *)value);
>> +   odp_buffer_t nexthop;
>> int ret = 0;
>>
>> if ((tbl == NULL) || (key == NULL) || (value == NULL))
>> return -1;
>>
>> +   nexthop = *((odp_buffer_t *)value);
>> +
>> if (prefix->cidr == 0)
>> return -1;
>> prefix->ip = prefix->ip & (0x << (IP_LENGTH -
>> prefix->cidr));
>> @@ -708,13 +710,16 @@ int odph_iplookup_table_get_value(odph_table_t tbl,
>> void *key,
>>   uint32_t buffer_size ODP_UNUSED)
>>  {
>> odph_iplookup_table_impl *impl = (void *)tbl;
>> -   uint32_t ip = *((uint32_t *)key);
>> -   prefix_entry_t *entry = &impl->l1e[ip >> 16];
>> +   uint32_t ip;
>> +   prefix_entry_t *entry;
>> odp_buffer_t *buff = (odp_buffer_t *)buffer;
>>
>> if ((tbl == NULL) || (key == NULL) || (buffer == NULL))
>> return -EINVAL;
>>
>> +   ip = *((uint32_t *)key);
>> +   entry = &impl->l1e[ip >> 16];
>> +
>> if (entry == NULL) {
>> ODPH_DBG("failed to get L1 entry.\n");
>> return -1;
>> @@ -881,13 +886,16 @@ odph_iplookup_table_remove_value(odph_table_t tbl,
>> void *key)
>>  {
>> odph_iplookup_table_impl *impl = (void *)tbl;
>> odph_iplookup_prefix_t *prefix = (odph_iplookup_prefix_t *)key;
>> -   uint32_t ip = prefix->ip;
>> -   uint8_t cidr = prefix->cidr;
>> +   uint32_t ip;
>> +   uint8_t cidr;
>>
>> if ((tbl == NULL) || (key == NULL))
>> return -EINVAL;
>>
>> -   if (!prefix->cidr)
>> +   ip   = prefix->ip;
>> +   cidr = prefix->cidr;
>> +
>> +   if (cidr == 0)
>> return -EINVAL;
>>
>> prefix_entry_t *entry = &impl->l1e[ip >> 16];
>> --
>> 2.9.3
>>
>>
> 
> 



Re: [lng-odp] ODP install error with dpdk 16.07

2017-01-31 Thread Elo, Matias (Nokia - FI/Espoo)

> Thanks, with this configuration it is working.
> My doubt here is:
> Why we are not using shared lib, and abi-compat ??

With --disable-shared and --disable-abi-compat you get the best performance but 
they are not mandatory. I'm doing a lot of benchmarking, so I use them always.

-Matias 

Re: [lng-odp] ODP install error with dpdk 16.07

2017-01-31 Thread Gyanesh Patra
Thanks, with this configuration it is working.

My doubt here is:

Why we are not using shared lib, and abi-compat ??

P Gyanesh Patra

On Mon, 30 Jan 2017 at 05:37 Elo Matias (Nokia - FI/Espoo)

<
mailto:Elo Matias (Nokia - FI/Espoo) 
> wrote:

a, pre, code, a:link, body { word-wrap: break-word !important; }

> make: *** [all-recursive] Error 1

>

> I have tried with ODP master branch with DPDK 17 and DPDK 16.07 . I am facing 
> the same problem.

>

> This is the ODP repo, not the odp-dpdk repo.

>

> P Gyanesh Patra

Hi Gyanesh,

Odp-linux currently supports DPDK v16.07. With these steps everything is 
working for me:

# DPDK install

cd

git checkout v16.07

make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc

cd x86_64-native-linuxapp-gcc/

sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config

cd ..

make install T=x86_64-native-linuxapp-gcc DESTDIR=./install EXTRA_CFLAGS="-fPIC"

# odp-linux install

cd

./bootstrap

./configure --with-dpdk-path=

/x86_64-native-linuxapp-gcc --disable-shared -disable-abi-compat

make

Were you doing something differently?

Regards,

Matias


Re: [lng-odp] odp-dpdk gives error with "configure" command

2017-01-31 Thread Gyanesh Patra
Thank you.

It works fine now.

P Gyanesh Patra

On Mon, 30 Jan 2017 at 05:54 Elo Matias (Nokia - FI/Espoo)

<
mailto:Elo Matias (Nokia - FI/Espoo) 
> wrote:

a, pre, code, a:link, body { word-wrap: break-word !important; }

> On 28 Jan 2017, at 23:38, Gyanesh Patra <
mailto:pgyanesh.pa...@gmail.com
> wrote:

>

> odp-dpdk repo gives error for “configure” command when tried with dpdk 16.07 
> and dpdk 17. I am running on ubuntu16 LTS.

>

> ./configure --with-dpdk-path=./dpdk/x86_64-native-linuxapp-gcc

>

> checking rte_config.h usability... no

>

> checking rte_config.h presence... no

>

> checking for rte_config.h... no

>

> configure: error: in `/home/macsad/pktio/odp-dpdk':

>

> configure: error: "can't find DPDK headers"

>

> See `config.log' for more details

>

> macsad@india:~/pktio/odp-dpdk$

>

> P Gyanesh Patra

Hi Gyanesh,

I’m installing odp-dpdk as follows:

# DPDK install

cd

git checkout v16.07

make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc

cd x86_64-native-linuxapp-gcc/

sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config

cd ..

make install T=x86_64-native-linuxapp-gcc DESTDIR=./install EXTRA_CFLAGS="-fPIC"

# Odp-dpdk install

cd

./bootstrap

./configure --with-platform=linux-dpdk --with-sdk-install-path=

/x86_64-native-linuxapp-gcc

make

Did this help?

-Matias


Re: [lng-odp] [PATCH v2] example: add IPv4 fragmentation/reassembly example

2017-01-31 Thread Joe Savage
> > Checkpatch still has some issues with this:
> >
> > ill at Ubuntu15:~/linaro/review$ ./scripts/checkpatch.pl
> > 0001-example-add-IPv4-fragmentation-reassembly-example.patch
> > WARNING: 'DONT' may be misspelled - perhaps 'DON'T'?
> > #1056: FILE: example/ipfragreass/odp_ipfragreass_ip.h:20:
> > +#define IP_FRAG_DONT 0x4000 /**< "Don't Fragment" (DF) fragment flag */
> 
> Seems like a design problem in checkpatch, breaking apart symbolic
> names and testing the individual word fragments. Do all versions of
> checkpatch behave like this? "Your symbolic names must consist of
> properly spelled English words!".
> 
> I think we should ignore checkpatch. And IPv4 came before checkpatch.

I did encounter these checkpatch warnings (not errors!) myself when running
the script before submission, and came to exactly this conclusion. I think
the identifiers and macros in question are clearer with "dont" in the name
than without, and if we're allowing identifiers like "nbr", "pkts", and
"val_sz" anyway, I'm not sure there's that much of a difference.

I'll grant you that it is slightly annoying, though slight enough that it
doesn't really bother me. Perhaps I could change "dont_assemble" to something
like "no_assemble", but that doesn't exactly make for correct English either!
Open to suggestions if this is considered an issue.


[lng-odp] [PATCH v4 7/8] abi: queue: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase. Removed an unused type
definition, documentation of that need to be still removed
for API spec. Moved a TM specific define into TM source file.

Signed-off-by: Petri Savolainen 
---
 include/odp/arch/arm32-linux/odp/api/abi/queue.h   |  7 +
 include/odp/arch/arm64-linux/odp/api/abi/queue.h   |  7 +
 include/odp/arch/default/api/abi/queue.h   | 35 ++
 include/odp/arch/mips64-linux/odp/api/abi/queue.h  |  7 +
 include/odp/arch/power64-linux/odp/api/abi/queue.h |  7 +
 include/odp/arch/x86_32-linux/odp/api/abi/queue.h  |  7 +
 include/odp/arch/x86_64-linux/odp/api/abi/queue.h  |  7 +
 platform/Makefile.inc  |  6 ++--
 .../include/odp/api/plat/queue_types.h | 25 +---
 platform/linux-generic/include/odp/api/queue.h |  4 +++
 .../include/odp_classification_datamodel.h |  1 -
 platform/linux-generic/odp_queue.c |  5 
 platform/linux-generic/odp_traffic_mngr.c  |  5 +++-
 13 files changed, 102 insertions(+), 21 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/queue.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/queue.h
 create mode 100644 include/odp/arch/default/api/abi/queue.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/queue.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/queue.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/queue.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/queue.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/queue.h 
b/include/odp/arch/arm32-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/queue.h 
b/include/odp/arch/arm64-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/queue.h 
b/include/odp/arch/default/api/abi/queue.h
new file mode 100644
index 000..378b069
--- /dev/null
+++ b/include/odp/arch/default/api/abi/queue.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_QUEUE_H_
+#define ODP_ABI_QUEUE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_queue_t;
+
+/** @ingroup odp_queue
+ *  @{
+ */
+
+typedef _odp_abi_queue_t *odp_queue_t;
+
+#define ODP_QUEUE_INVALID   ((odp_queue_t)0)
+
+#define ODP_QUEUE_NAME_LEN  32
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/queue.h 
b/include/odp/arch/mips64-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/queue.h 
b/include/odp/arch/power64-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/queue.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/queue.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/queue.h
new file mode 100644
index 000..6027cee
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/queue.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index deeebff..3201d33 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -67,7 +67,8 @@ odpapiabidefaultinclude_HEADERS = \
$(top_srcdir)/include/odp

[lng-odp] [PATCH v4 5/8] abi: packet: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase.

Signed-off-by: Petri Savolainen 
---
 include/odp/arch/arm32-linux/odp/api/abi/packet.h  |  7 
 include/odp/arch/arm64-linux/odp/api/abi/packet.h  |  7 
 include/odp/arch/default/api/abi/packet.h  | 47 ++
 include/odp/arch/mips64-linux/odp/api/abi/packet.h |  7 
 .../odp/arch/power64-linux/odp/api/abi/packet.h|  7 
 include/odp/arch/x86_32-linux/odp/api/abi/packet.h |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/packet.h |  7 
 platform/Makefile.inc  |  6 ++-
 .../include/odp/api/plat/packet_types.h| 26 
 platform/linux-generic/odp_packet.c| 10 +
 10 files changed, 111 insertions(+), 20 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/packet.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/packet.h
 create mode 100644 include/odp/arch/default/api/abi/packet.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/packet.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/packet.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/packet.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/packet.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/packet.h 
b/include/odp/arch/arm32-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/packet.h 
b/include/odp/arch/arm64-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/packet.h 
b/include/odp/arch/default/api/abi/packet.h
new file mode 100644
index 000..60a41b8
--- /dev/null
+++ b/include/odp/arch/default/api/abi/packet.h
@@ -0,0 +1,47 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_PACKET_H_
+#define ODP_ABI_PACKET_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_packet_t;
+
+/** @ingroup odp_packet
+ *  @{
+ */
+
+typedef _odp_abi_packet_t *odp_packet_t;
+typedef uint8_todp_packet_seg_t;
+
+#define ODP_PACKET_INVALID((odp_packet_t)0x)
+#define ODP_PACKET_SEG_INVALID((odp_packet_seg_t)-1)
+#define ODP_PACKET_OFFSET_INVALID (0x0fff)
+
+typedef enum {
+   ODP_PACKET_GREEN = 0,
+   ODP_PACKET_YELLOW = 1,
+   ODP_PACKET_RED = 2,
+   ODP_PACKET_ALL_COLORS = 3,
+} odp_packet_color_t;
+
+#define ODP_NUM_PACKET_COLORS 3
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/packet.h 
b/include/odp/arch/mips64-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/packet.h 
b/include/odp/arch/power64-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/packet.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/packet.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/packet.h
new file mode 100644
index 000..f44cb53
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/packet.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 29ed347..03d9376 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -65,14 +65,16 @@ odpapiabidefaultinclud

[lng-odp] [PATCH v4 1/8] abi: event: added the first ABI spec file

2017-01-31 Thread Petri Savolainen
Used event API as the first example of an ABI spec file. Used
the same default architecture file initially for all
architectures. Default ABI files avoid multiple copies
of the same definition.

Signed-off-by: Petri Savolainen 
---
 configure.ac   | 22 
 example/Makefile.inc   |  1 +
 helper/Makefile.am |  1 +
 helper/test/Makefile.am|  1 +
 include/odp/arch/arm32-linux/odp/api/abi/event.h   |  7 
 include/odp/arch/arm64-linux/odp/api/abi/event.h   |  7 
 include/odp/arch/default/api/abi/event.h   | 42 ++
 include/odp/arch/mips64-linux/odp/api/abi/event.h  |  7 
 include/odp/arch/power64-linux/odp/api/abi/event.h |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/event.h  |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/event.h  |  7 
 platform/Makefile.inc  |  8 +
 platform/linux-generic/Makefile.am |  1 +
 .../include/odp/api/plat/event_types.h | 19 +-
 platform/linux-generic/odp_event.c |  5 +++
 test/Makefile.inc  |  1 +
 test/linux-generic/Makefile.inc|  1 +
 17 files changed, 133 insertions(+), 11 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/event.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/event.h
 create mode 100644 include/odp/arch/default/api/abi/event.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/event.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/event.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/event.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/event.h

diff --git a/configure.ac b/configure.ac
index daa9b31..6153efd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,26 @@ then
 fi
 
 ##
+# Architecture for ABI support
+##
+AS_CASE([$host],
+  [x86*], [ARCH_ABI=x86_64-linux],
+  [i686*],[ARCH_ABI=x86_32-linux],
+  [mips64*],  [ARCH_ABI=mips64-linux],
+  [powerpc*], [ARCH_ABI=power64-linux],
+  [aarch64*], [ARCH_ABI=arm64-linux],
+  [arm*], [ARCH_ABI=arm32-linux],
+  [ARCH_ABI=undefined]
+)
+AC_SUBST([ARCH_ABI])
+
+if test "${ARCH_ABI}" == "undefined";
+then
+echo "ARCH_ABI is undefined, please add your ARCH_ABI based on 
host=${host}"
+exit 1
+fi
+
+##
 # Set correct pkgconfig version
 ##
 PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
@@ -343,7 +363,9 @@ AC_MSG_RESULT([
Helper Library version: ${ODPHELPER_LIBSO_VERSION}
 
implementation_name:${IMPLEMENTATION_NAME}
+   host:   ${host}
ARCH_DIR${ARCH_DIR}
+   ARCH_ABI${ARCH_ABI}
with_platform:  ${with_platform}
with_helper_platform:   ${with_helper_platform}
helper_extn:${helper_extn}
diff --git a/example/Makefile.inc b/example/Makefile.inc
index ea596d5..854e8af 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -6,6 +6,7 @@ AM_CFLAGS += \
-I$(top_srcdir)/example \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/include/ \
+   -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/helper/include \
-I$(top_builddir)/platform/@with_platform@/include \
-I$(top_builddir)/include
diff --git a/helper/Makefile.am b/helper/Makefile.am
index d484679..6b65eb1 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -7,6 +7,7 @@ LIB   = $(top_builddir)/lib
 AM_CFLAGS += -I$(srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
+AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_builddir)/include
 
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 1c50282..1337657 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -12,6 +12,7 @@ INCFLAGS = \
-I$(top_srcdir)/helper/include \
-I$(top_srcdir)/helper/platform/@with_helper_platform@/include \
-I$(top_srcdir)/include \
+   -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/helper
diff --git a/include/odp/arch/arm32-linux/odp/api/abi/event.h 
b/include/odp/arch/arm32-linux/odp/api/abi/event.h
new file mode 100644
index 000..5d2ac75
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/event

[lng-odp] [PATCH v4 0/8] First ABI files

2017-01-31 Thread Petri Savolainen
Added initial version of couple of ABI specification files. These files define 
types/values that are implementation specific in the API spec. For ABI 
compatibility, application and implementation need to use these definitions 
(based on the target architecture). ABI is defined by CPU ISA (including 
version, endianism, etc) and SW environment (OS and compiler). Six different 
ABIs are initially defined - all are Linux based and assume the default 
endianism.

Some unused types were found for API spec. Those will be removed once this 
patch set is merged with api-next.

v2:
  * Use strong types as default handle types

v3:
  * Rebased. Updated helper test Makefile.

v4:
  * Rebased. Changed author mail address.

Petri Savolainen (8):
  abi: event: added the first ABI spec file
  abi: buffer: added initial definitions
  abi: classifier: added initial definitions
  abi: crypto: added initial definitions
  abi: packet: added initial definitions
  abi: pool: added initial definitions
  abi: queue: added initial definitions
  abi: shm: added initial definitions

 configure.ac   | 22 ++
 example/Makefile.inc   |  1 +
 example/timer/odp_timer_test.c |  2 +-
 helper/Makefile.am |  1 +
 helper/test/Makefile.am|  1 +
 include/odp/arch/arm32-linux/odp/api/abi/buffer.h  |  7 
 .../arch/arm32-linux/odp/api/abi/classification.h  |  7 
 include/odp/arch/arm32-linux/odp/api/abi/crypto.h  |  7 
 include/odp/arch/arm32-linux/odp/api/abi/event.h   |  7 
 include/odp/arch/arm32-linux/odp/api/abi/packet.h  |  7 
 include/odp/arch/arm32-linux/odp/api/abi/pool.h|  7 
 include/odp/arch/arm32-linux/odp/api/abi/queue.h   |  7 
 .../arch/arm32-linux/odp/api/abi/shared_memory.h   |  7 
 include/odp/arch/arm64-linux/odp/api/abi/buffer.h  |  7 
 .../arch/arm64-linux/odp/api/abi/classification.h  |  7 
 include/odp/arch/arm64-linux/odp/api/abi/crypto.h  |  7 
 include/odp/arch/arm64-linux/odp/api/abi/event.h   |  7 
 include/odp/arch/arm64-linux/odp/api/abi/packet.h  |  7 
 include/odp/arch/arm64-linux/odp/api/abi/pool.h|  7 
 include/odp/arch/arm64-linux/odp/api/abi/queue.h   |  7 
 .../arch/arm64-linux/odp/api/abi/shared_memory.h   |  7 
 include/odp/arch/default/api/abi/buffer.h  | 38 +
 include/odp/arch/default/api/abi/classification.h  | 40 ++
 include/odp/arch/default/api/abi/crypto.h  | 36 +
 include/odp/arch/default/api/abi/event.h   | 42 +++
 include/odp/arch/default/api/abi/packet.h  | 47 ++
 include/odp/arch/default/api/abi/pool.h| 43 
 include/odp/arch/default/api/abi/queue.h   | 35 
 include/odp/arch/default/api/abi/shared_memory.h   | 35 
 include/odp/arch/mips64-linux/odp/api/abi/buffer.h |  7 
 .../arch/mips64-linux/odp/api/abi/classification.h |  7 
 include/odp/arch/mips64-linux/odp/api/abi/crypto.h |  7 
 include/odp/arch/mips64-linux/odp/api/abi/event.h  |  7 
 include/odp/arch/mips64-linux/odp/api/abi/packet.h |  7 
 include/odp/arch/mips64-linux/odp/api/abi/pool.h   |  7 
 include/odp/arch/mips64-linux/odp/api/abi/queue.h  |  7 
 .../arch/mips64-linux/odp/api/abi/shared_memory.h  |  7 
 .../odp/arch/power64-linux/odp/api/abi/buffer.h|  7 
 .../power64-linux/odp/api/abi/classification.h |  7 
 .../odp/arch/power64-linux/odp/api/abi/crypto.h|  7 
 include/odp/arch/power64-linux/odp/api/abi/event.h |  7 
 .../odp/arch/power64-linux/odp/api/abi/packet.h|  7 
 include/odp/arch/power64-linux/odp/api/abi/pool.h  |  7 
 include/odp/arch/power64-linux/odp/api/abi/queue.h |  7 
 .../arch/power64-linux/odp/api/abi/shared_memory.h |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/buffer.h |  7 
 .../arch/x86_32-linux/odp/api/abi/classification.h |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/crypto.h |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/event.h  |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/packet.h |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/pool.h   |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/queue.h  |  7 
 .../arch/x86_32-linux/odp/api/abi/shared_memory.h  |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/buffer.h |  7 
 .../arch/x86_64-linux/odp/api/abi/classification.h |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/crypto.h |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/event.h  |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/packet.h |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/pool.h   |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/queue.h  |  7 
 .../arch/x86_64-linux/odp/api/abi/shared_memory.h  |  7 
 platform/Makefile.inc

[lng-odp] [PATCH v4 8/8] abi: shm: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase.

Signed-off-by: Petri Savolainen 
---
 .../arch/arm32-linux/odp/api/abi/shared_memory.h   |  7 +
 .../arch/arm64-linux/odp/api/abi/shared_memory.h   |  7 +
 include/odp/arch/default/api/abi/shared_memory.h   | 35 ++
 .../arch/mips64-linux/odp/api/abi/shared_memory.h  |  7 +
 .../arch/power64-linux/odp/api/abi/shared_memory.h |  7 +
 .../arch/x86_32-linux/odp/api/abi/shared_memory.h  |  7 +
 .../arch/x86_64-linux/odp/api/abi/shared_memory.h  |  7 +
 platform/Makefile.inc  |  6 ++--
 .../include/odp/api/plat/shared_memory_types.h | 16 +-
 platform/linux-generic/include/odp_pool_internal.h |  1 +
 platform/linux-generic/odp_shared_memory.c |  6 
 11 files changed, 96 insertions(+), 10 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/default/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/shared_memory.h 
b/include/odp/arch/default/api/abi/shared_memory.h
new file mode 100644
index 000..5805f95
--- /dev/null
+++ b/include/odp/arch/default/api/abi/shared_memory.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_SHM_H_
+#define ODP_ABI_SHM_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_shm_t;
+
+/** @ingroup odp_shared_memory
+ *  @{
+ */
+
+typedef _odp_abi_shm_t *odp_shm_t;
+
+#define ODP_SHM_INVALID   ((odp_shm_t)0)
+#define ODP_SHM_NULL  ODP_SHM_INVALID
+#define ODP_SHM_NAME_LEN  32
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h
new file mode 100644
index 000..d203678
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 3201d33..7059d91 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -68,7 +68,8 @@ odpapiabidefaultinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/default/api

[lng-odp] [PATCH v4 3/8] abi: classifier: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase. Removed unused type
definitions, documentation of those need to be still removed
for API spec.

Signed-off-by: Petri Savolainen 
---
 .../arch/arm32-linux/odp/api/abi/classification.h  |  7 
 .../arch/arm64-linux/odp/api/abi/classification.h  |  7 
 include/odp/arch/default/api/abi/classification.h  | 40 ++
 .../arch/mips64-linux/odp/api/abi/classification.h |  7 
 .../power64-linux/odp/api/abi/classification.h |  7 
 .../arch/x86_32-linux/odp/api/abi/classification.h |  7 
 .../arch/x86_64-linux/odp/api/abi/classification.h |  7 
 platform/Makefile.inc  |  2 ++
 .../linux-generic/include/odp/api/classification.h |  9 +++--
 .../include/odp/api/plat/classification_types.h| 34 +++---
 .../include/odp_classification_datamodel.h |  3 --
 platform/linux-generic/odp_classification.c| 12 +--
 12 files changed, 114 insertions(+), 28 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/classification.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/classification.h
 create mode 100644 include/odp/arch/default/api/abi/classification.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/classification.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/classification.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/classification.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/classification.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/classification.h 
b/include/odp/arch/arm32-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/classification.h 
b/include/odp/arch/arm64-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/classification.h 
b/include/odp/arch/default/api/abi/classification.h
new file mode 100644
index 000..771907a
--- /dev/null
+++ b/include/odp/arch/default/api/abi/classification.h
@@ -0,0 +1,40 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_CLASSIFICATION_H_
+#define ODP_ABI_CLASSIFICATION_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_cos_t;
+
+/** Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_pmr_t;
+
+/** @ingroup odp_classification
+ *  @{
+ */
+
+typedef _odp_abi_cos_t *odp_cos_t;
+typedef _odp_abi_pmr_t *odp_pmr_t;
+
+#define ODP_COS_INVALID   ((odp_cos_t)~0)
+#define ODP_PMR_INVAL ((odp_pmr_t)~0)
+
+#define ODP_COS_NAME_LEN  32
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/classification.h 
b/include/odp/arch/mips64-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/classification.h 
b/include/odp/arch/power64-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/classification.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/classification.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/classification.h
new file mode 100644
index 000..d48a473
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/classification.h
@@ -0,0 +1,7 @@
+/* Copyright (c)

[lng-odp] [PATCH v4 6/8] abi: pool: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase.

Signed-off-by: Petri Savolainen 
---
 example/timer/odp_timer_test.c |  2 +-
 include/odp/arch/arm32-linux/odp/api/abi/pool.h|  7 
 include/odp/arch/arm64-linux/odp/api/abi/pool.h|  7 
 include/odp/arch/default/api/abi/pool.h| 43 ++
 include/odp/arch/mips64-linux/odp/api/abi/pool.h   |  7 
 include/odp/arch/power64-linux/odp/api/abi/pool.h  |  7 
 include/odp/arch/x86_32-linux/odp/api/abi/pool.h   |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/pool.h   |  7 
 platform/Makefile.inc  |  6 ++-
 .../include/odp/api/plat/pool_types.h  | 21 ++-
 10 files changed, 102 insertions(+), 12 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/pool.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/pool.h
 create mode 100644 include/odp/arch/default/api/abi/pool.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/pool.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/pool.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/pool.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/pool.h

diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 1088a74..2196b8c 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -520,7 +520,7 @@ err:
if (gbls != NULL && gbls->tp != ODP_TIMER_POOL_INVALID)
odp_timer_pool_destroy(gbls->tp);
 
-   if (gbls != NULL && gbls->pool != ODP_TIMER_POOL_INVALID)
+   if (gbls != NULL && gbls->pool != ODP_POOL_INVALID)
if (odp_pool_destroy(gbls->pool))
err = 1;
 
diff --git a/include/odp/arch/arm32-linux/odp/api/abi/pool.h 
b/include/odp/arch/arm32-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/pool.h 
b/include/odp/arch/arm64-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/pool.h 
b/include/odp/arch/default/api/abi/pool.h
new file mode 100644
index 000..4637d19
--- /dev/null
+++ b/include/odp/arch/default/api/abi/pool.h
@@ -0,0 +1,43 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_POOL_H_
+#define ODP_ABI_POOL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_pool_t;
+
+/** @ingroup odp_pool
+ *  @{
+ */
+
+typedef _odp_abi_pool_t *odp_pool_t;
+
+#define ODP_POOL_INVALID   ((odp_pool_t)0x)
+
+#define ODP_POOL_NAME_LEN  32
+
+typedef enum odp_pool_type_t {
+   ODP_POOL_BUFFER  = ODP_EVENT_BUFFER,
+   ODP_POOL_PACKET  = ODP_EVENT_PACKET,
+   ODP_POOL_TIMEOUT = ODP_EVENT_TIMEOUT
+} odp_pool_type_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/pool.h 
b/include/odp/arch/mips64-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/pool.h 
b/include/odp/arch/power64-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/pool.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/pool.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/pool.h
new file mode 100644
index 000..b354afb
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/pool.h
@@ -0,0 +1,7 

[lng-odp] [PATCH v4 2/8] abi: buffer: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase.

Signed-off-by: Petri Savolainen 
---
 include/odp/arch/arm32-linux/odp/api/abi/buffer.h  |  7 
 include/odp/arch/arm64-linux/odp/api/abi/buffer.h  |  7 
 include/odp/arch/default/api/abi/buffer.h  | 38 ++
 include/odp/arch/mips64-linux/odp/api/abi/buffer.h |  7 
 .../odp/arch/power64-linux/odp/api/abi/buffer.h|  7 
 include/odp/arch/x86_32-linux/odp/api/abi/buffer.h |  7 
 include/odp/arch/x86_64-linux/odp/api/abi/buffer.h |  7 
 platform/Makefile.inc  |  2 ++
 .../include/odp/api/plat/buffer_types.h| 23 -
 platform/linux-generic/odp_buffer.c|  5 +++
 10 files changed, 101 insertions(+), 9 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/buffer.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/buffer.h
 create mode 100644 include/odp/arch/default/api/abi/buffer.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/buffer.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/buffer.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/buffer.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/buffer.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/buffer.h 
b/include/odp/arch/arm32-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/buffer.h 
b/include/odp/arch/arm64-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/buffer.h 
b/include/odp/arch/default/api/abi/buffer.h
new file mode 100644
index 000..eec6f01
--- /dev/null
+++ b/include/odp/arch/default/api/abi/buffer.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_BUFFER_H_
+#define ODP_ABI_BUFFER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_buffer_t;
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_buffer_seg_t;
+
+/** @ingroup odp_buffer
+ *  @{
+ */
+
+typedef _odp_abi_buffer_t *odp_buffer_t;
+typedef _odp_abi_buffer_seg_t *odp_buffer_seg_t;
+
+#define ODP_BUFFER_INVALID   ((odp_buffer_t)0x)
+#define ODP_SEGMENT_INVALID  ((odp_buffer_seg_t)0x)
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/buffer.h 
b/include/odp/arch/mips64-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/buffer.h 
b/include/odp/arch/power64-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/buffer.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/buffer.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/buffer.h
new file mode 100644
index 000..d9c3193
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/buffer.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index a24accb..b078df8 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -62,10 +62,12 @@ odpapispecinclude_HEADERS = \
 
 odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
 odpapiabidefaultinclude_HEADERS = \
+   $(top_srcdi

[lng-odp] [PATCH v4 4/8] abi: crypto: added initial definitions

2017-01-31 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures.
Default values match those defined in odp-linux implementation
to minimize changes in this phase.

Signed-off-by: Petri Savolainen 
---
 include/odp/arch/arm32-linux/odp/api/abi/crypto.h  |  7 +
 include/odp/arch/arm64-linux/odp/api/abi/crypto.h  |  7 +
 include/odp/arch/default/api/abi/crypto.h  | 36 ++
 include/odp/arch/mips64-linux/odp/api/abi/crypto.h |  7 +
 .../odp/arch/power64-linux/odp/api/abi/crypto.h|  7 +
 include/odp/arch/x86_32-linux/odp/api/abi/crypto.h |  7 +
 include/odp/arch/x86_64-linux/odp/api/abi/crypto.h |  7 +
 platform/Makefile.inc  |  2 ++
 .../include/odp/api/plat/crypto_types.h| 21 +
 platform/linux-generic/odp_crypto.c| 10 ++
 10 files changed, 98 insertions(+), 13 deletions(-)
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/crypto.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/crypto.h
 create mode 100644 include/odp/arch/default/api/abi/crypto.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/crypto.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/crypto.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/crypto.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/crypto.h

diff --git a/include/odp/arch/arm32-linux/odp/api/abi/crypto.h 
b/include/odp/arch/arm32-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/arm32-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/arm64-linux/odp/api/abi/crypto.h 
b/include/odp/arch/arm64-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/arm64-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/default/api/abi/crypto.h 
b/include/odp/arch/default/api/abi/crypto.h
new file mode 100644
index 000..f0793a1
--- /dev/null
+++ b/include/odp/arch/default/api/abi/crypto.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_CRYPTO_H_
+#define ODP_ABI_CRYPTO_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_crypto_compl_t;
+
+/** @ingroup odp_crypto
+ *  @{
+ */
+
+#define ODP_CRYPTO_SESSION_INVALID (0xULL)
+
+typedef uint64_t  odp_crypto_session_t;
+typedef _odp_abi_crypto_compl_t *odp_crypto_compl_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/odp/arch/mips64-linux/odp/api/abi/crypto.h 
b/include/odp/arch/mips64-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/mips64-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/power64-linux/odp/api/abi/crypto.h 
b/include/odp/arch/power64-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/power64-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/crypto.h 
b/include/odp/arch/x86_32-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/x86_32-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/crypto.h 
b/include/odp/arch/x86_64-linux/odp/api/abi/crypto.h
new file mode 100644
index 000..9a9d2dc
--- /dev/null
+++ b/include/odp/arch/x86_64-linux/odp/api/abi/crypto.h
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index bb40692..29ed347 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -64,12 +64,14 @@ odpapiabidefaultincludedir= 
$(includedir)/odp/arch/default/api/abi
 odpapiabidefaultinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/default/api/abi/buffer.h \
$(top_srcdir)/include/odp/arch/default/api/abi/classification.h \
+   $(top_srcdir)/include/odp/arch/default/api/abi/crypto.h \