[lng-odp] [PATCH] test: tm: use script instead of binary when calling traffic manager test

2017-04-19 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Since 51e3b8776b78180741fa57a621f9d13b9ae8bbfb tm test received wrapper
script checking if it is run under Travis CI. However linux-generic
testsuite was not updated to call script instead of binary, resulting in
test failures.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 15 (lumag:fix-tmgr)
 ** https://github.com/Linaro/odp/pull/15
 ** Patch: https://github.com/Linaro/odp/pull/15.patch
 ** Base sha: 5622f689653013b317842386a1aed81dd81fe749
 ** Merge commit sha: d52fad48d4e87f9a79fadb0d6dc217f5bed9b187
 **/
 test/linux-generic/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am
index 0522550..38516a4 100644
--- a/test/linux-generic/Makefile.am
+++ b/test/linux-generic/Makefile.am
@@ -30,7 +30,7 @@ TESTS = validation/api/pktio/pktio_run.sh \
$(ALL_API_VALIDATION_DIR)/thread/thread_main$(EXEEXT) \
$(ALL_API_VALIDATION_DIR)/time/time_main$(EXEEXT) \
$(ALL_API_VALIDATION_DIR)/timer/timer_main$(EXEEXT) \
-   $(ALL_API_VALIDATION_DIR)/traffic_mngr/traffic_mngr_main$(EXEEXT) \
+   $(ALL_API_VALIDATION_DIR)/traffic_mngr/traffic_mngr.sh \
$(ALL_API_VALIDATION_DIR)/shmem/shmem_main$(EXEEXT) \
$(ALL_API_VALIDATION_DIR)/system/system_main$(EXEEXT) \
ring/ring_main$(EXEEXT)



Re: [lng-odp] [API-NEXT v5] api: ipsec: factor out definitions for feature support levels

2017-04-19 Thread Bill Fischofer
On Wed, Apr 19, 2017 at 8:52 AM, Maxim Uvarov 
wrote:

> Dmitry, please name patches as API-NEXT PATH v5, not as API-NEXT.
>

API-NEXT PATCH v5


>
> Maxim.
>
>
> On 19.04.2017 16:41, Dmitry Eremin-Solenikov wrote:
> > Instead of having magic 0-1-2 numbers, let's have the special enum for
> > feature support levels (unsupported/supported/preferred).
> >
> > Signed-off-by: Dmitry Eremin-Solenikov  linaro.org>
> > ---
> >  include/odp/api/spec/ipsec.h | 39 +---
> >  include/odp/api/spec/support.h   | 57
> 
> >  include/odp_api.h|  1 +
> >  platform/Makefile.inc|  1 +
> >  platform/linux-generic/Makefile.am   |  1 +
> >  platform/linux-generic/include/odp/api/support.h | 34 ++
> >  6 files changed, 106 insertions(+), 27 deletions(-)
> >  create mode 100644 include/odp/api/spec/support.h
> >  create mode 100644 platform/linux-generic/include/odp/api/support.h
> >
> > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
> > index a0ceb11a..ecbf38c6 100644
> > --- a/include/odp/api/spec/ipsec.h
> > +++ b/include/odp/api/spec/ipsec.h
> > @@ -19,6 +19,7 @@ extern "C" {
> >  #endif
> >
> >  #include 
> > +#include 
> >  #include 
> >  #include 
> >
> > @@ -230,38 +231,22 @@ typedef struct odp_ipsec_capability_t {
> >   /** Maximum number of IPSEC SAs */
> >   uint32_t max_num_sa;
> >
> > - /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC)
> support
> > -  *
> > -  *  0: Synchronous mode is not supported
> > -  *  1: Synchronous mode is supported
> > -  *  2: Synchronous mode is supported and preferred
> > -  */
> > - uint8_t op_mode_sync;
> > + /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC)
> support */
> > + odp_support_t op_mode_sync;
> >
> > - /** Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC)
> support
> > -  *
> > -  *  0: Asynchronous mode is not supported
> > -  *  1: Asynchronous mode is supported
> > -  *  2: Asynchronous mode is supported and preferred
> > + /**
> > +  * Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC)
> support
> >*/
> > - uint8_t op_mode_async;
> > + odp_support_t op_mode_async;
> >
> > - /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support
> > -  *
> > -  *  0: Inline IPSEC operation is not supported
> > -  *  1: Inline IPSEC operation is supported
> > -  *  2: Inline IPSEC operation is supported and preferred
> > -  */
> > - uint8_t op_mode_inline;
> > + /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support
> */
> > + odp_support_t op_mode_inline;
> >
> > - /** Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
> > -  *  resulting inbound packets.
> > -  *
> > -  *  0: Classification of resulting packets is not supported
> > -  *  1: Classification of resulting packets is supported
> > -  *  2: Classification of resulting packets is supported and
> preferred
> > + /**
> > +  * Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
> > +  *  resulting inbound packets
> >*/
> > - uint8_t pipeline_cls;
> > + odp_support_t pipeline_cls;
> >
> >   /** Soft expiry limit in seconds support
> >*
> > diff --git a/include/odp/api/spec/support.h b/include/odp/api/spec/
> support.h
> > new file mode 100644
> > index ..cc43b6f0
> > --- /dev/null
> > +++ b/include/odp/api/spec/support.h
> > @@ -0,0 +1,57 @@
> > +/* Copyright (c) 2017, Linaro Limited
> > + * All rights reserved.
> > + *
> > + * SPDX-License-Identifier: BSD-3-Clause
> > + */
> > +
> > +/**
> > + * @file
> > + *
> > + * ODP support API
> > + */
> > +
> > +#ifndef ODP_API_SUPPORT_H_
> > +#define ODP_API_SUPPORT_H_
> > +#include 
> > +
> > +#ifdef __cplusplus
> > +extern "C" {
> > +#endif
> > +
> > +/** @defgroup odp_support ODP support
> > + *  Common API
> > + *  @{
> > + */
> > +
> > +/**
> > + * ODP support support
> > + *
> > + * Support levels are specified in the relative order, where
> ODP_SUPPORT_NO is
> > + * the lowest level. E.g. if the examined support level is greater than
> > + * ODP_SUPPORT_NO, the feature is supported in some form.
> > + */
> > +typedef enum odp_support_t {
> > + /**
> > +  * Feature is not supported
> > +  */
> > + ODP_SUPPORT_NO = 0,
> > + /**
> > +  * Feature is supported
> > +  */
> > + ODP_SUPPORT_YES,
> > + /**
> > +  * Feature is supported and preferred
> > +  */
> > + ODP_SUPPORT_PREFERRED
> > +} odp_support_t;
> > +
> > +/**
> > + * @}
> > + */
> > +
> > +#ifdef __cplusplus
> > +}
> > +#endif
> > +
> > +#include 
> > +#endif
> > diff --git a/include/odp_api.h b/include/odp_api.h
> > index 73e5309a..e3ffcb1e 100644
> > --- 

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

Bill Fischofer  changed:

   What|Removed |Added

 Status|IN_PROGRESS |RESOLVED
 Resolution|--- |FIXED

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

[lng-odp] [Bug 2940] odp_packet_seg_t fails ABI compatibility between odp-linux and odp-dpdk

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2940

Bill Fischofer  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|IN_PROGRESS |RESOLVED

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

[lng-odp] [Bug 2952] doxygen errors and travis does not catch them

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2952

Bill Fischofer  changed:

   What|Removed |Added

 Status|CONFIRMED   |IN_PROGRESS

--- Comment #2 from Bill Fischofer  ---
Patch series http://patches.opendataplane.org/project/lng-odp/list/?series=134
posted to address this problem.

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

[lng-odp] [API-NEXT PATCHv2 1/6] api: classification: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/classification.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/include/odp/api/spec/classification.h 
b/include/odp/api/spec/classification.h
index 0e1addd6..39831b24 100644
--- a/include/odp/api/spec/classification.h
+++ b/include/odp/api/spec/classification.h
@@ -366,7 +366,9 @@ typedef struct odp_pmr_param_t {
/** True if the value is range and false if match */
odp_bool_t range_term;
 
+   /** Variant mappings for types of matches */
union {
+   /** Parameters for single-valued matches */
struct {
/** Value to be matched */
const void  *value;
@@ -374,6 +376,8 @@ typedef struct odp_pmr_param_t {
/** Masked set of bits to be matched */
const void  *mask;
} match;
+
+   /** Parameter for range value matches */
struct {
/** Start and End values are included in the range */
/** start value of range */
-- 
2.11.0



[lng-odp] [API-NEXT PATCHv2 4/6] api: tm: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/traffic_mngr.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/odp/api/spec/traffic_mngr.h 
b/include/odp/api/spec/traffic_mngr.h
index 71198bbd..3a748cef 100644
--- a/include/odp/api/spec/traffic_mngr.h
+++ b/include/odp/api/spec/traffic_mngr.h
@@ -471,9 +471,10 @@ typedef enum {
 typedef struct {
odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
 
+   /** Variant parameters for different TM outputs */
union {
-   odp_pktio_t pktio;
-   odp_tm_egress_fcn_t egress_fcn;
+   odp_pktio_t pktio;  /**< Output to PktIO */
+   odp_tm_egress_fcn_t egress_fcn; /**< Output to user func */
};
 } odp_tm_egress_t;
 
-- 
2.11.0



[lng-odp] [API-NEXT PATCHv2 2/6] api: ipsec: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/ipsec.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index a0ceb11a..3521d2f8 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -157,6 +157,7 @@ typedef struct odp_ipsec_inbound_config_t {
/** Flags to control IPSEC payload data checks up to the selected parse
 *  level. */
union {
+   /** Mapping for individual bits */
struct {
/** Check IPv4 header checksum in IPSEC payload.
 *  Default value is 0. */
@@ -195,6 +196,7 @@ typedef struct odp_ipsec_outbound_config_t {
 *  metadata flag to disable checksum insertion per packet bases.
 */
union {
+   /** Mapping for individual bits */
struct {
/** Insert IPv4 header checksum on the payload packet
 *  before IPSEC transformation. Default value is 0. */
@@ -393,6 +395,7 @@ typedef struct odp_ipsec_tunnel_param_t {
/** Tunnel type: IPv4 or IPv6 */
odp_ipsec_tunnel_type_t type;
 
+   /** Variant mappings for tunnel parameters */
union {
/** IPv4 header parameters */
struct {
@@ -850,6 +853,7 @@ typedef struct odp_ipsec_op_opt_t {
 
 /** IPSEC operation status */
 typedef struct odp_ipsec_op_status_t {
+   /** Variant mappings for op status */
union {
/** Error flags */
struct {
@@ -901,6 +905,7 @@ typedef struct odp_ipsec_op_status_t {
uint32_t all_error;
};
 
+   /** Variant mappings for status flags */
union {
/** Status flags */
struct {
-- 
2.11.0



[lng-odp] [PATCH 4/5] linux-generic: types: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 platform/linux-generic/include/odp/api/debug.h   | 8 
 platform/linux-generic/include/odp/api/plat/packet_types.h   | 1 +
 platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/platform/linux-generic/include/odp/api/debug.h 
b/platform/linux-generic/include/odp/api/debug.h
index b0f91b1c..bef2fd0e 100644
--- a/platform/linux-generic/include/odp/api/debug.h
+++ b/platform/linux-generic/include/odp/api/debug.h
@@ -25,17 +25,23 @@ extern "C" {
  * versions.
  */
 #define _odp_merge(a, b) a##b
+/** @internal */
 #define _odp_label(a) _odp_merge(_ODP_SASSERT_, a)
+/** @internal */
 #define _ODP_SASSERT _odp_label(__COUNTER__)
+/** @internal */
 #define _ODP_SASSERT_ENUM(e) { _ODP_SASSERT = 1 / !!(e) }
+/** @internal */
 #define _odp_static_assert(e, s) enum _ODP_SASSERT_ENUM(e)
 
 #if defined(__clang__)
 #if defined(__cplusplus)
 #if !__has_feature(cxx_static_assert) && !defined(static_assert)
+/** @internal */
 #definestatic_assert(e, s) _odp_static_assert(e, s)
 #endif
 #elif !__has_feature(c_static_assert) && !defined(_Static_assert)
+/** @internal */
 #define _Static_assert(e, s) _odp_static_assert(e, s)
 #endif
 
@@ -44,9 +50,11 @@ extern "C" {
(__GNUC__ < 6 && defined(__cplusplus))
 #if defined(__cplusplus)
 #if !defined(static_assert)
+/** @intenral */
 #definestatic_assert(e, s) _odp_static_assert(e, s)
 #endif
 #elif !defined(_Static_assert)
+/** @internal */
 #define _Static_assert(e, s) _odp_static_assert(e, s)
 #endif
 #endif
diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h 
b/platform/linux-generic/include/odp/api/plat/packet_types.h
index 7e3c51e6..95cba5eb 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_types.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_types.h
@@ -105,6 +105,7 @@ typedef union {
/** All input flags */
uint64_t all;
 
+   /** Individual input flags */
struct {
uint64_t parsed_l2:1; /**< L2 parsed */
uint64_t dst_queue:1; /**< Dst queue present */
diff --git a/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h 
b/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h
index b766afec..f47a13f6 100644
--- a/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h
+++ b/platform/linux-generic/include/odp/api/plat/traffic_mngr_types.h
@@ -168,7 +168,7 @@ typedef odp_tm_handle_t odp_tm_wred_t;
  */
 #define ODP_TM_ROOT  ((odp_tm_handle_t)-1)
 
-/** Get printable format of odp_queue_t */
+/** @internal Get printable format of odp_tm_handle_t @param hdl @return */
 static inline uint64_t odp_tm_handle_to_u64(odp_tm_handle_t hdl)
 {
return hdl;
-- 
2.11.0



[lng-odp] [PATCH 1/5] api: classification: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/classification.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/include/odp/api/spec/classification.h 
b/include/odp/api/spec/classification.h
index 0e1addd6..39831b24 100644
--- a/include/odp/api/spec/classification.h
+++ b/include/odp/api/spec/classification.h
@@ -366,7 +366,9 @@ typedef struct odp_pmr_param_t {
/** True if the value is range and false if match */
odp_bool_t range_term;
 
+   /** Variant mappings for types of matches */
union {
+   /** Parameters for single-valued matches */
struct {
/** Value to be matched */
const void  *value;
@@ -374,6 +376,8 @@ typedef struct odp_pmr_param_t {
/** Masked set of bits to be matched */
const void  *mask;
} match;
+
+   /** Parameter for range value matches */
struct {
/** Start and End values are included in the range */
/** start value of range */
-- 
2.11.0



[lng-odp] [PATCH 5/5] helper: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 helper/include/odp/helper/icmp.h | 11 ++
 helper/include/odp/helper/strong_types.h |  3 ++-
 helper/include/odp/helper/table.h|  2 +-
 helper/include/odp/helper/tcp.h  | 35 
 helper/include/odp/helper/threads.h  |  7 +--
 5 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/helper/include/odp/helper/icmp.h b/helper/include/odp/helper/icmp.h
index e25646ad..bef96784 100644
--- a/helper/include/odp/helper/icmp.h
+++ b/helper/include/odp/helper/icmp.h
@@ -32,15 +32,18 @@ typedef struct ODP_PACKED {
uint8_t type;   /**< message type */
uint8_t code;   /**< type sub-code */
odp_u16sum_t chksum;/**< checksum of icmp header */
+   /** Variant mappings of ICMP fields */
union {
+   /** Fields used for ICMP echo msgs */
struct {
-   odp_u16be_t id;
-   odp_u16be_t sequence;
+   odp_u16be_t id;   /**< id */
+   odp_u16be_t sequence; /**< sequence */
} echo; /**< echo datagram */
odp_u32be_t gateway;/**< gateway address */
+   /** Fields used for ICMP frag msgs */
struct {
-   odp_u16be_t __unused;
-   odp_u16be_t mtu;
+   odp_u16be_t __unused; /**< @internal */
+   odp_u16be_t mtu;  /**< mtu */
} frag; /**< path mtu discovery */
} un;   /**< icmp sub header */
 } odph_icmphdr_t;
diff --git a/helper/include/odp/helper/strong_types.h 
b/helper/include/odp/helper/strong_types.h
index 13e35a43..501d0f28 100644
--- a/helper/include/odp/helper/strong_types.h
+++ b/helper/include/odp/helper/strong_types.h
@@ -20,10 +20,11 @@
 
 /** Use strong typing for ODP types */
 #ifdef __cplusplus
+/** @internal C++ helper macro for strong typing  @param type @return */
 #define ODPH_HANDLE_T(type) struct _##type { uint8_t unused_dummy_var; } *type
 #else
 #define odph_handle_t struct { uint8_t unused_dummy_var; } *
-/** C/C++ helper macro for strong typing */
+/** @internal C helper macro for strong typing @param type @return */
 #define ODPH_HANDLE_T(type) odph_handle_t type
 #endif
 
diff --git a/helper/include/odp/helper/table.h 
b/helper/include/odp/helper/table.h
index b3440ef5..96c9c5fe 100644
--- a/helper/include/odp/helper/table.h
+++ b/helper/include/odp/helper/table.h
@@ -94,7 +94,7 @@ extern "C" {
 #define ODPH_TABLE_NAME_LEN  32
 
 #include 
-/** ODP table handle */
+/** @internal ODPH table handle @return */
 typedef ODPH_HANDLE_T(odph_table_t);
 
 /**
diff --git a/helper/include/odp/helper/tcp.h b/helper/include/odp/helper/tcp.h
index fd234e58..e91b52e2 100644
--- a/helper/include/odp/helper/tcp.h
+++ b/helper/include/odp/helper/tcp.h
@@ -32,8 +32,9 @@ typedef struct ODP_PACKED {
odp_u16be_t dst_port; /**< Destination port */
odp_u32be_t seq_no;   /**< Sequence number */
odp_u32be_t ack_no;   /**< Acknowledgment number */
+   /** Variant maps for TCP header fields */
union {
-   odp_u16be_t doffset_flags;
+   odp_u16be_t doffset_flags; /**< TCP Flags aggregate */
 #if ODP_BIG_ENDIAN_BITFIELD
struct {
odp_u16be_t rsvd1:8;
@@ -42,14 +43,14 @@ typedef struct ODP_PACKED {
struct {
odp_u16be_t hl:4;/**< Hdr len, in words */
odp_u16be_t rsvd3:4; /**< Reserved */
-   odp_u16be_t cwr:1;
-   odp_u16be_t ece:1;
-   odp_u16be_t urg:1;
-   odp_u16be_t ack:1;
-   odp_u16be_t psh:1;
-   odp_u16be_t rst:1;
-   odp_u16be_t syn:1;
-   odp_u16be_t fin:1;
+   odp_u16be_t cwr:1;   /**< cwr bit */
+   odp_u16be_t ece:1;   /**< ece bit */
+   odp_u16be_t urg:1;   /**< urg bit */
+   odp_u16be_t ack:1;   /**< ack bit */
+   odp_u16be_t psh:1;   /**< psh bit */
+   odp_u16be_t rst:1;   /**< rst bit */
+   odp_u16be_t syn:1;   /**< syn bit */
+   odp_u16be_t fin:1;   /**< fin bit */
};
 #elif ODP_LITTLE_ENDIAN_BITFIELD
struct {
@@ -59,14 +60,14 @@ typedef struct ODP_PACKED {
struct {
odp_u16be_t rsvd3:4; /**< Reserved */
odp_u16be_t hl:4;/**< Hdr len, in words */
-   

[lng-odp] [PATCH 2/5] api: pool: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/pool.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h
index c0de195a..6fc5b6b4 100644
--- a/include/odp/api/spec/pool.h
+++ b/include/odp/api/spec/pool.h
@@ -166,7 +166,9 @@ typedef struct odp_pool_param_t {
/** Pool type */
int type;
 
+   /** Variant parameters for different pool types */
union {
+   /** Parameters for buffer pools */
struct {
/** Number of buffers in the pool */
uint32_t num;
@@ -180,6 +182,8 @@ typedef struct odp_pool_param_t {
Default will always be a multiple of 8. */
uint32_t align;
} buf;
+
+   /** Parameters for packet pools */
struct {
/** The number of packets that the pool must provide
that are packet length 'len' bytes or smaller.
@@ -211,6 +215,8 @@ typedef struct odp_pool_param_t {
Specify as 0 if no user area is needed. */
uint32_t uarea_size;
} pkt;
+
+   /** Parameters for timeout pools */
struct {
/** Number of timeouts in the pool */
uint32_t num;
-- 
2.11.0



[lng-odp] [PATCH 3/5] api: tm: add additional doxygen documentation

2017-04-19 Thread Bill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding
additional field documentation to avoid problems with doxygen 1.8.13
and higher.

Signed-off-by: Bill Fischofer 
---
 include/odp/api/spec/traffic_mngr.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/odp/api/spec/traffic_mngr.h 
b/include/odp/api/spec/traffic_mngr.h
index 71198bbd..3a748cef 100644
--- a/include/odp/api/spec/traffic_mngr.h
+++ b/include/odp/api/spec/traffic_mngr.h
@@ -471,9 +471,10 @@ typedef enum {
 typedef struct {
odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
 
+   /** Variant parameters for different TM outputs */
union {
-   odp_pktio_t pktio;
-   odp_tm_egress_fcn_t egress_fcn;
+   odp_pktio_t pktio;  /**< Output to PktIO */
+   odp_tm_egress_fcn_t egress_fcn; /**< Output to user func */
};
 } odp_tm_egress_t;
 
-- 
2.11.0



[lng-odp] [Linaro/odp] 2e8f02: example: generator: fix stop criteria - number of ...

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 2e8f024440a1e770068b1e9a9d50770ab166e40d
  
https://github.com/Linaro/odp/commit/2e8f024440a1e770068b1e9a9d50770ab166e40d
  Author: Bogdan Pricope 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M example/generator/odp_generator.c

  Log Message:
  ---
  example: generator: fix stop criteria - number of packets sent

Signed-off-by: Bogdan Pricope 
Reviewed-and-tested-by: Yi He 
Signed-off-by: Maxim Uvarov 




[lng-odp] [Linaro/odp] 5622f6: example: generator: flush output messages

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 5622f689653013b317842386a1aed81dd81fe749
  
https://github.com/Linaro/odp/commit/5622f689653013b317842386a1aed81dd81fe749
  Author: Bogdan Pricope 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M example/generator/odp_generator.c

  Log Message:
  ---
  example: generator: flush output messages

Signed-off-by: Bogdan Pricope 
Reviewed-and-tested-by: Yi He 
Signed-off-by: Maxim Uvarov 




[lng-odp] [Bug 2881] load sensitive tests fail on CI

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2881

--- Comment #2 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/51e3b8776b78180741fa57a621f9d13b9ae8bbfb
2017-04-19T21:40:50+03:00
Maxim Uvarov maxim.uva...@linaro.org
test: tm: skip tm result under travis run

tm test fails time to time in Travis environment. Because
of we can not control that machine we can not do things like
taskset and core isolation there. So simple run test and ignore
it's result. Threat only segfault as actual error. Linaro CI
will still do full test.
https://bugs.linaro.org/show_bug.cgi?id=2881

Signed-off-by: Maxim Uvarov 
Reviewed-by: Bill Fischofer 

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

[lng-odp] [Linaro/odp] 51e3b8: test: tm: skip tm result under travis run

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 51e3b8776b78180741fa57a621f9d13b9ae8bbfb
  
https://github.com/Linaro/odp/commit/51e3b8776b78180741fa57a621f9d13b9ae8bbfb
  Author: Maxim Uvarov 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M test/common_plat/validation/api/traffic_mngr/Makefile.am
A test/common_plat/validation/api/traffic_mngr/traffic_mngr.sh

  Log Message:
  ---
  test: tm: skip tm result under travis run

tm test fails time to time in Travis environment. Because
of we can not control that machine we can not do things like
taskset and core isolation there. So simple run test and ignore
it's result. Threat only segfault as actual error. Linaro CI
will still do full test.
https://bugs.linaro.org/show_bug.cgi?id=2881

Signed-off-by: Maxim Uvarov 
Reviewed-by: Bill Fischofer 




[lng-odp] [Bug 2952] doxygen errors and travis does not catch them

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2952

Bill Fischofer  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |CONFIRMED

--- Comment #1 from Bill Fischofer  ---
It's actually worse than this. Ubuntu 17.04 upgrades doxygen to 1.8.13 and that
flags a bunch of other stuff in the existing spec files. I'll investigate and
post an update patch.

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

[lng-odp] [Bug 2881] load sensitive tests fail on CI

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2881

--- Comment #1 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/51e3b8776b78180741fa57a621f9d13b9ae8bbfb
2017-04-19T21:40:50+03:00
Maxim Uvarov maxim.uva...@linaro.org
test: tm: skip tm result under travis run

tm test fails time to time in Travis environment. Because
of we can not control that machine we can not do things like
taskset and core isolation there. So simple run test and ignore
it's result. Threat only segfault as actual error. Linaro CI
will still do full test.
https://bugs.linaro.org/show_bug.cgi?id=2881

Signed-off-by: Maxim Uvarov 
Reviewed-by: Bill Fischofer 

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

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

2017-04-19 Thread Maxim Uvarov
On 04/19/17 19:15, Joe Savage wrote:
>> Joe,
>>
>> can you please make it work with clang? I sent a patch to ml before. It
>> might still apply, so you can review it.
>> https://travis-ci.org/muvarov/odp/jobs/223572921
>>
>> the goal is to find good combination of -mcx16 and -latomic flags. And
>> we need to test that it still works on arm due to there is no mcx16 flag.
>>
>> Maxim.
> 
> Hey Maxim,
> 
> As we discussed previously, from my end the example should work perfectly
> with clang, it is just a matter of passing the right flags to the compiler
> through the project infrastructure. As such, you should be in a much better
> position to evaluate this than I. Looking at the descriptions of the patches
> alone, however, it looks like your patch combined with Brian Brooks'
> "configure.ac: fix native Clang build on ARMv8" should resolve any
> compilation issues here.
> 
> Joe
> 

Ok, than if you want I can update my patch and send together with yours
as patchset.

Maxim.


[lng-odp] [Bug 2940] odp_packet_seg_t fails ABI compatibility between odp-linux and odp-dpdk

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2940

--- Comment #5 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/8c0df898b6f90564037fba43b1e9e6224e4ee740
2017-04-13T22:54:41+03:00
Bill Fischofer bill.fischo...@linaro.org
abi: packet: restore abi compatibility for odp_packet_seg_t type

When running in --enable-abi-compat=yes mode, all ODP types need to be
of pointer width in the default ABI definition. The optimization of the
odp_packet_seg_t type to uint8_t can only be supported when running in
--enable-abi-compate=no mode. Change the ODP packet routines to use
type converter routines that have varying definitions based on whether
we're running in ABI compatibility mode and provide these variant
definitions to enable proper ABI compatibility while still supporting an
optimized typedef for non-ABI mode.

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2940

Reported-by: Krishna Garapati 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2933] Miss to call unlock if there are some errors happen in loopback_send() function.

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2933

--- Comment #4 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/8eba3e76f32bb2d17b88ba13f633606fef61efe8
2017-04-19T18:58:11+03:00
Kevin Wang kevin.w...@arm.com
linux-gen: pktio: miss an unlock operation before exit if error happens

Just set the return value, and remove the return() function at the
failure branch.
https://bugs.linaro.org/show_bug.cgi?id=2933

Signed-off-by: Kevin Wang 
Reviewed-by: Ola Liljedahl 
Reviewed-by: Brian Brooks 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #14 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Linaro/odp] ce6133: validation: packet: do assert on newly created pkt...

2017-04-19 Thread GitHub
  Branch: refs/heads/api-next
  Home:   https://github.com/Linaro/odp
  Commit: ce61337e6a7e955913fa64412c75d2066e0f121c
  
https://github.com/Linaro/odp/commit/ce61337e6a7e955913fa64412c75d2066e0f121c
  Author: Balakrishna Garapati 
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
M test/common_plat/validation/api/packet/packet.c

  Log Message:
  ---
  validation: packet: do assert on newly created pkt reference

Signed-off-by: Balakrishna Garapati 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 0955fbb395dc1651a8bcd473beae2154d39f4a69
  
https://github.com/Linaro/odp/commit/0955fbb395dc1651a8bcd473beae2154d39f4a69
  Author: Balakrishna Garapati 
  Date:   2017-04-06 (Thu, 06 Apr 2017)

  Changed paths:
M platform/linux-generic/Makefile.am
A platform/linux-generic/include/odp_errno_define.h
M platform/linux-generic/include/odp_internal.h

  Log Message:
  ---
  linux-generic: decouple odp_errno define from odp-linux

makes it easy to define odp_errno to dpdk rteerrno and fixes
linking issues.

Signed-off-by: Balakrishna Garapati 
Reviewed-and-tested-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: c9417b862f7df0213b5135f0aa364761cb23cec6
  
https://github.com/Linaro/odp/commit/c9417b862f7df0213b5135f0aa364761cb23cec6
  Author: Matias Elo 
  Date:   2017-04-13 (Thu, 13 Apr 2017)

  Changed paths:
M test/common_plat/validation/api/packet/packet.c

  Log Message:
  ---
  validation: packet: increase test pool size

Previously packet_test_concatsplit() could fail on some pool
implementations as the pool ran out of buffers. Increase default pools size
and use capability to make sure the value is valid.

Signed-off-by: Matias Elo 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Maxim Uvarov 


  Commit: 66869dae3b8cce7ed020d6922bd68ed30542f753
  
https://github.com/Linaro/odp/commit/66869dae3b8cce7ed020d6922bd68ed30542f753
  Author: Matias Elo 
  Date:   2017-04-13 (Thu, 13 Apr 2017)

  Changed paths:
M test/common_plat/validation/api/packet/packet.c

  Log Message:
  ---
  validation: packet: remove invalid check from packet_test_alloc_segmented()

One can't assume that the packet should be segmented as this test is using
a different pool with different parameters than the default test pool.

Signed-off-by: Matias Elo 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Maxim Uvarov 


  Commit: 077b6c427cac9687349a56ebf5602bb953348440
  
https://github.com/Linaro/odp/commit/077b6c427cac9687349a56ebf5602bb953348440
  Author: Matias Elo 
  Date:   2017-04-13 (Thu, 13 Apr 2017)

  Changed paths:
M test/common_plat/validation/api/packet/packet.c

  Log Message:
  ---
  validation: packet: use common define for test pool sizes

Signed-off-by: Matias Elo 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Maxim Uvarov 


  Commit: 8c0df898b6f90564037fba43b1e9e6224e4ee740
  
https://github.com/Linaro/odp/commit/8c0df898b6f90564037fba43b1e9e6224e4ee740
  Author: Bill Fischofer 
  Date:   2017-04-13 (Thu, 13 Apr 2017)

  Changed paths:
M include/odp/arch/default/api/abi/packet.h
M platform/linux-generic/include/odp/api/plat/packet_inlines.h
M platform/linux-generic/include/odp/api/plat/packet_types.h
M platform/linux-generic/odp_packet.c

  Log Message:
  ---
  abi: packet: restore abi compatibility for odp_packet_seg_t type

When running in --enable-abi-compat=yes mode, all ODP types need to be
of pointer width in the default ABI definition. The optimization of the
odp_packet_seg_t type to uint8_t can only be supported when running in
--enable-abi-compate=no mode. Change the ODP packet routines to use
type converter routines that have varying definitions based on whether
we're running in ABI compatibility mode and provide these variant
definitions to enable proper ABI compatibility while still supporting an
optimized typedef for non-ABI mode.

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2940

Reported-by: Krishna Garapati 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 3e5a07edf190614e739c8dba76cf165330e1b035
  
https://github.com/Linaro/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
  Author: Bill 

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #13 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2933] Miss to call unlock if there are some errors happen in loopback_send() function.

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2933

--- Comment #3 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/8eba3e76f32bb2d17b88ba13f633606fef61efe8
2017-04-19T18:58:11+03:00
Kevin Wang kevin.w...@arm.com
linux-gen: pktio: miss an unlock operation before exit if error happens

Just set the return value, and remove the return() function at the
failure branch.
https://bugs.linaro.org/show_bug.cgi?id=2933

Signed-off-by: Kevin Wang 
Reviewed-by: Ola Liljedahl 
Reviewed-by: Brian Brooks 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2940] odp_packet_seg_t fails ABI compatibility between odp-linux and odp-dpdk

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2940

--- Comment #4 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/8c0df898b6f90564037fba43b1e9e6224e4ee740
2017-04-13T22:54:41+03:00
Bill Fischofer bill.fischo...@linaro.org
abi: packet: restore abi compatibility for odp_packet_seg_t type

When running in --enable-abi-compat=yes mode, all ODP types need to be
of pointer width in the default ABI definition. The optimization of the
odp_packet_seg_t type to uint8_t can only be supported when running in
--enable-abi-compate=no mode. Change the ODP packet routines to use
type converter routines that have varying definitions based on whether
we're running in ABI compatibility mode and provide these variant
definitions to enable proper ABI compatibility while still supporting an
optimized typedef for non-ABI mode.

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2940

Reported-by: Krishna Garapati 
Reviewed-by: Balakrishna Garapati 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Linaro/odp] d20f3a: test: odp_scheduling: handle dequeueing from a con...

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: d20f3a639d236066cbd76514df5c4faaa0ae17e9
  
https://github.com/Linaro/odp/commit/d20f3a639d236066cbd76514df5c4faaa0ae17e9
  Author: Brian Brooks 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M test/common_plat/performance/odp_scheduling.c

  Log Message:
  ---
  test: odp_scheduling: handle dequeueing from a concurrent queue

Signed-off-by: Ola Liljedahl 
Reviewed-by: Brian Brooks 
Reviewed-by: Honnappa Nagarahalli 
Reviewed-by: Kevin Wang 
Signed-off-by: Maxim Uvarov 




[lng-odp] [Bug 2952] New: doxygen errors and travis does not catch them

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2952

Bug ID: 2952
   Summary: doxygen errors and travis does not catch them
   Product: OpenDataPlane - linux- generic reference
   Version: v1.14.0.0
  Hardware: Other
OS: Linux
Status: UNCONFIRMED
  Severity: enhancement
  Priority: ---
 Component: API
  Assignee: bill.fischo...@linaro.org
  Reporter: maxim.uva...@linaro.org
CC: lng-odp@lists.linaro.org
  Target Milestone: ---

https://travis-ci.org/muvarov/odp/jobs/223616250
23.81s$ make doxygen-doc |tee doxygen.log

  DXGEN  doc/application-api-guide/Doxyfile

  DXGEN  doc/helper-guide/Doxyfile

  DXGEN  doc/platform-api-guide/Doxyfile

/home/travis/build/muvarov/odp/platform/linux-generic/include/odp/api/debug.h:28:
warning: Member _odp_label(a) (macro definition) of file
platform/linux-generic/include/odp/api/debug.h is not documented.

/home/travis/build/muvarov/odp/platform/linux-generic/include/odp/api/debug.h:29:
warning: Member _ODP_SASSERT (macro definition) of file
platform/linux-generic/include/odp/api/debug.h is not documented.

/home/travis/build/muvarov/odp/platform/linux-generic/include/odp/api/debug.h:30:
warning: Member _ODP_SASSERT_ENUM(e) (macro definition) of file
platform/linux-generic/include/odp/api/debug.h is not documented.

/home/travis/build/muvarov/odp/platform/linux-generic/include/odp/api/debug.h:31:
warning: Member _odp_static_assert(e, s) (macro definition) of file
platform/linux-generic/include/odp/api/debug.h is not documented.

/home/travis/build/muvarov/odp/platform/linux-generic/include/odp/api/debug.h:50:
warning: Member _Static_assert(e, s) (macro definition) of file
platform/linux-generic/include/odp/api/debug.h is not documented.

  DXGEN  doc/driver-api-guide/Doxyfile

The command "make doxygen-doc |tee doxygen.log" exited with 0.

0.01s$ fgrep -rvq warning ./doxygen.log

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

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

2017-04-19 Thread Joe Savage
> Joe,
> 
> can you please make it work with clang? I sent a patch to ml before. It
> might still apply, so you can review it.
> https://travis-ci.org/muvarov/odp/jobs/223572921
> 
> the goal is to find good combination of -mcx16 and -latomic flags. And
> we need to test that it still works on arm due to there is no mcx16 flag.
> 
> Maxim.

Hey Maxim,

As we discussed previously, from my end the example should work perfectly
with clang, it is just a matter of passing the right flags to the compiler
through the project infrastructure. As such, you should be in a much better
position to evaluate this than I. Looking at the descriptions of the patches
alone, however, it looks like your patch combined with Brian Brooks'
"configure.ac: fix native Clang build on ARMv8" should resolve any
compilation issues here.

Joe


[lng-odp] [Bug 2933] Miss to call unlock if there are some errors happen in loopback_send() function.

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2933

--- Comment #2 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/8eba3e76f32bb2d17b88ba13f633606fef61efe8
2017-04-19T18:58:11+03:00
Kevin Wang kevin.w...@arm.com
linux-gen: pktio: miss an unlock operation before exit if error happens

Just set the return value, and remove the return() function at the
failure branch.
https://bugs.linaro.org/show_bug.cgi?id=2933

Signed-off-by: Kevin Wang 
Reviewed-by: Ola Liljedahl 
Reviewed-by: Brian Brooks 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Linaro/odp] 8eba3e: linux-gen: pktio: miss an unlock operation before ...

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 8eba3e76f32bb2d17b88ba13f633606fef61efe8
  
https://github.com/Linaro/odp/commit/8eba3e76f32bb2d17b88ba13f633606fef61efe8
  Author: Kevin Wang 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M platform/linux-generic/pktio/loop.c

  Log Message:
  ---
  linux-gen: pktio: miss an unlock operation before exit if error happens

Just set the return value, and remove the return() function at the
failure branch.
https://bugs.linaro.org/show_bug.cgi?id=2933

Signed-off-by: Kevin Wang 
Reviewed-by: Ola Liljedahl 
Reviewed-by: Brian Brooks 
Signed-off-by: Maxim Uvarov 




[lng-odp] [Linaro/odp] 39be95: configure.ac: fix native Clang build on ARMv8

2017-04-19 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 39be9572056ee715468214ad6d2d5c01054456d7
  
https://github.com/Linaro/odp/commit/39be9572056ee715468214ad6d2d5c01054456d7
  Author: Brian Brooks 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
M configure.ac

  Log Message:
  ---
  configure.ac: fix native Clang build on ARMv8

The build is broken when using clang on ARM. -mcx16 is being passed to
clang when building natively on ARM. This combined with -Werror causes
the breakage. Fix it by skipping anything related to -mcx16 when not
building for x86-based architectures. See [1] for details.

Signed-off-by: Brian Brooks 
Reviewed-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 




[lng-odp] [API-NEXT PATCH v2] api: ipsec: change semantics of odp_ipsec_result function

2017-04-19 Thread Dmitry Eremin-Solenikov
 - Move packets from the event instead of copying them. This simplifies
   event handling/freeing code, which now does not have to track, which
   packets were copied from the event and which packets should be freed.

 - Do not require to free the event before processing packets. This
   allows one to copy packets from the event in small batches and
   process them accordingly.

 - Freeing the event in odp_ipsec_result() leaves space for optimized
   implementations, where an event is actually a packet with additional
   metadata.

Signed-off-by: Dmitry Eremin-Solenikov 
---
 include/odp/api/spec/ipsec.h | 22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index a0ceb11a..78645567 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -1278,17 +1278,23 @@ int odp_ipsec_out_inline(const odp_ipsec_op_param_t 
*op_param,
  * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event
  *
  * Copies IPSEC operation results from an event. The event must be of
- * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes
- * any resulting packet handles to other ODP calls.
+ * type ODP_EVENT_IPSEC_RESULT. The event will be freed automatically if
+ * odp_ipsec_result() returns 0.  In all other case it must be freed via
+ * odp_event_free().
  *
- * @param[out]result  Pointer to operation result for output. Maybe NULL, 
if
- *application is interested only on the number of
- *packets.
+ * @param[out]result  Pointer to operation result for output. May be
+ *NULL, if application is interested only on the
+ *number of packets.
  * @param event   An ODP_EVENT_IPSEC_RESULT event
  *
- * @return Number of packets in the event. If this is larger than
- * 'result.num_pkt', all packets did not fit into result struct and
- * application must call the function again with a larger result 
struct.
+ * @return Number of packets remaining in the event.
+ * @retval > 0All packets did not fit into result struct and
+ *application must call the function again. Packets
+ *returned during previous calls will not be returned
+ *again in subsequent calls.
+ * @retval 0  All packets were returned. The event was freed during
+ *this call. Application should not access the event
+ *afterwards.
  * @retval <0 On failure
  *
  * @see odp_ipsec_in_enq(), odp_ipsec_out_enq()
-- 
2.11.0



Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

2017-04-19 Thread Dmitry Eremin-Solenikov
On 19.04.2017 17:02, Verma, Shally wrote:
> 
> 
> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Verma, 
> Shally
> Sent: 19 April 2017 19:30
> To: Dmitry Eremin-Solenikov ; Shally Verma 
> ; lng-odp@lists.linaro.org
> Cc: Challa, Mahipal ; Masood, Faisal 
> ; Narayana, Prasad Athreya 
> 
> Subject: Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface
> 
> 
> 
> -Original Message-
> From: Dmitry Eremin-Solenikov [mailto:dmitry.ereminsoleni...@linaro.org]
> Sent: 19 April 2017 17:36
> To: Shally Verma ; lng-odp@lists.linaro.org
> Cc: Challa, Mahipal ; Masood, Faisal 
> ; Narayana, Prasad Athreya 
> ; Verma, Shally 
> Subject: Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface
> 
> On 19.04.2017 13:00, Shally Verma wrote:
>> An API set to add compression/decompression support in ODP interface.
>>
>> Signed-off-by: Shally Verma 
>> Signed-off-by: Mahipal Challa 
>> ---
>>  include/odp/api/spec/comp.h | 748
>> 
>>  1 file changed, 748 insertions(+)
>>
>> diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h 
>> new file mode 100644 index 000..65feacf
>> --- /dev/null
>> +++ b/include/odp/api/spec/comp.h
>> @@ -0,0 +1,748 @@
>> +/*
>> + */
>> +
>> +/**
>> + * @file
>> + *
>> + * ODP Compression
>> + */
>> +
>> +#ifndef ODP_API_COMP_H_
>> +#define ODP_API_COMP_H_
>> +#include 
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +/** @defgroup odp_compression ODP COMP
>> + *  ODP Compression defines interface to compress/decompress and 
>> +authenticate
>> + *  data.
>> + *
>> + *  Compression here implicilty refer to both compression and decompression.
>> + *  Example, compression algo 'deflate' mean both 'deflate' and 'inflate'.
>> + *
>> + *  if opcode = ODP_COMP_COMPRESS, then it will Compress,
>> + *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress.
>> + *
>> + *  Current version of Interface allow Compression 
>> +ONLY,Authentication ONLY or
>> + *  both Compression + Auth ONLY sessions.
>> + *
>> + *  Macros, enums, types and operations to utilise compression.
>> + *  @{
>> + */
>> +
>> +/**
>> + * @def ODP_COMP_SESSION_INVALID
>> + * Invalid session handle
>> + */
>> +
>> +/**
>> + * @typedef odp_comp_session_t (platform dependent)
>> + * Comp API opaque session handle
>> + */
>> +
>> +/**
>> + * @typedef odp_comp_compl_t
>> +* Compression API completion event (platform dependent) */
>> +
>> +/**
>> + * Compression API operation mode
>> + */
>> +typedef enum {
>> +/** Synchronous, return results immediately */
>> +ODP_COMP_SYNC,
>> +/** Asynchronous, return results via queue event */
>> +ODP_COMP_ASYNC,
>> +} odp_comp_op_mode_t;
>> +
>> +/**
>> + * Comp API operation type.
>> + * Ignored for Authentication ONLY.
>> + *
>> + */
>> +typedef enum {
>> +/** Compress and/or Compute digest  */
>> +ODP_COMP_OP_COMPRESS,
>> +/** Decompress and/or Compute digest */
>> +ODP_COMP_OP_DECOMPRESS,
>> +} odp_comp_op_t;
>> +
>> +/**
>> + * Comp API authentication algorithm
>> + *
>> + */
>> +typedef enum {
>> +/** No authentication algorithm specified */
>> +ODP_COMP_AUTH_ALG_NULL,
>> +/** ODP_COMP_AUTH_ALG_SHA1*/
>> +ODP_COMP_AUTH_ALG_SHA1,
>> +/**  ODP_COMP_AUTH_ALG_SHA256*/
>> +ODP_COMP_AUTH_ALG_SHA256
>> +} odp_comp_auth_alg_t;
> 
> Why do you need special comp_auth_alg instead of just odp_auth_alg_t?
> Shally - To differentiate that these algorithm are specifically part of 
> compression interface as crypto also has them enumerated.
> Correction - Crypto doesn't enumerate them "as is" in current api-next as I 
> see it.

So, what is particularly 'compression' in them, which is not 'crypto'?

>
>> +/**
>> +* Comp API enumeration for preferred compression level/speed.
>> +*
>> +* trade-off between speed and compression ratio.
>> +*
>> +* Please note this enumeration is only a peferential selection
>> +* but may not guarantee operation to committed level depending
>> +* on implementation support. Ex. SPEED_FASTEST and SPEED_FAST may
>> +* give same result on some platforms.
>> +*
>> +*/
>> +typedef enum {
>> +/* Use implementaion default between ratio and speed */
>> +ODP_COMP_SPEED_DEFAULT = 0,
>> +/** fastest speed, lowest compression */
>> +ODP_COMP_SPEED_FASTEST,
>> +/** fast speed, lower compression */
>> +ODP_COMP_SPEED_FAST,
>> +/** medium speed, medium compression  */
>> +ODP_COMP_SPEED_MED,
>> +/** slowest speed, maximum compression */
>> +ODP_COMP_SPEED_SLOWEST,
>> +
>> +} odp_comp_speed_t;
> 
> It might be easier to specify this 

Re: [lng-odp] [PATCHv2] validation: scheduler: modify the queue size for atomic queue

2017-04-19 Thread Honnappa Nagarahalli
Reviewed-by: Honnappa Nagarahalli 

On 10 April 2017 at 21:38, Kevin Wang  wrote:
> Signed-off-by: Kevin Wang 
> ---
>  test/common_plat/validation/api/scheduler/scheduler.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/test/common_plat/validation/api/scheduler/scheduler.c 
> b/test/common_plat/validation/api/scheduler/scheduler.c
> index 952561c..f46d391 100644
> --- a/test/common_plat/validation/api/scheduler/scheduler.c
> +++ b/test/common_plat/validation/api/scheduler/scheduler.c
> @@ -1388,6 +1388,7 @@ static int create_queues(void)
>
> snprintf(name, sizeof(name), "sched_%d_%d_a", i, j);
> p.sched.sync = ODP_SCHED_SYNC_ATOMIC;
> +   p.size = BUFS_PER_QUEUE_EXCL;
> q = odp_queue_create(name, );
>
> if (q == ODP_QUEUE_INVALID) {
> @@ -1423,6 +1424,7 @@ static int create_queues(void)
> snprintf(name, sizeof(name), "sched_%d_%d_o", i, j);
> p.sched.sync = ODP_SCHED_SYNC_ORDERED;
> p.sched.lock_count = capa.max_ordered_locks;
> +   p.size = 0;
> q = odp_queue_create(name, );
>
> if (q == ODP_QUEUE_INVALID) {
> --
> 2.7.4
>


Re: [lng-odp] [PATCHv2] validation: scheduler: release context according to scheduler sync type

2017-04-19 Thread Honnappa Nagarahalli
Reviewed-by: Honnappa Nagarahalli 

On 13 April 2017 at 21:57, Kevin Wang  wrote:
> For different scheduler sync type, need to call different release
> function.
>
> Signed-off-by: Kevin Wang 
> ---
>  test/common_plat/validation/api/scheduler/scheduler.c | 18 ++
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/test/common_plat/validation/api/scheduler/scheduler.c 
> b/test/common_plat/validation/api/scheduler/scheduler.c
> index 952561c..2c669a1 100644
> --- a/test/common_plat/validation/api/scheduler/scheduler.c
> +++ b/test/common_plat/validation/api/scheduler/scheduler.c
> @@ -129,6 +129,14 @@ static int exit_schedule_loop(void)
> return ret;
>  }
>
> +static void release_context(odp_schedule_sync_t sync)
> +{
> +   if (sync == ODP_SCHED_SYNC_ATOMIC)
> +   odp_schedule_release_atomic();
> +   else if (sync == ODP_SCHED_SYNC_ORDERED)
> +   odp_schedule_release_ordered();
> +}
> +
>  void scheduler_test_wait_time(void)
>  {
> int i;
> @@ -251,8 +259,7 @@ void scheduler_test_queue_destroy(void)
> CU_ASSERT_FATAL(u32[0] == MAGIC);
>
> odp_buffer_free(buf);
> -   odp_schedule_release_ordered();
> -
> +   release_context(qp.sched.sync);
> CU_ASSERT_FATAL(odp_queue_destroy(queue) == 0);
> }
>
> @@ -820,12 +827,7 @@ static int schedule_common_(void *arg)
> }
> }
>
> -   if (sync == ODP_SCHED_SYNC_ATOMIC)
> -   odp_schedule_release_atomic();
> -
> -   if (sync == ODP_SCHED_SYNC_ORDERED)
> -   odp_schedule_release_ordered();
> -
> +   release_context(sync);
> odp_ticketlock_lock(>lock);
>
> globals->buf_count -= num;
> --
> 2.7.4
>


[lng-odp] [Bug 2951] Traffic manager test fails during make distcheck

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2951

Bill Fischofer  changed:

   What|Removed |Added

 CC||bill.fischo...@linaro.org
   Assignee|lng-odp@lists.linaro.org|maxim.uva...@linaro.org

--- Comment #1 from Bill Fischofer  ---
Maxim has a patch http://patches.opendataplane.org/patch/8424/ that skips this
test under Travis to handle these glitches. I've reviewed it so I'd expect it
to merge shortly and that should resolve this issue.

-- 
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 2951] New: Traffic manager test fails during make distcheck

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2951

Bug ID: 2951
   Summary: Traffic manager test fails during make distcheck
   Product: OpenDataPlane - linux- generic reference
   Version: api-next
  Hardware: Other
OS: Linux
Status: UNCONFIRMED
  Severity: enhancement
  Priority: ---
 Component: Traffic Manager
  Assignee: lng-odp@lists.linaro.org
  Reporter: dmitry.ereminsoleni...@linaro.org
CC: lng-odp@lists.linaro.org
  Target Milestone: ---

Created attachment 723
  --> https://bugs.linaro.org/attachment.cgi?id=723=edit
full test log

During make distcheck traffic manager main test fails with the following
messages:

  Test: traffic_mngr_test_shaper
./../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2528:test_shaper_bw():min=0
avg_rcv_gap=371 max=2360 std_dev_gap=749
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2531:test_shaper_bw():
 expected_rcv_gap=2500 acceptable rcv_gap range=1998..3127
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2528:test_shaper_bw():min=0
avg_rcv_gap=36 max=952 std_dev_gap=165
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2531:test_shaper_bw():
 expected_rcv_gap=1000 acceptable rcv_gap range=798..1252
FAILED
1.
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2546
 - (min_rcv_gap <= avg_rcv_gap) && (avg_rcv_gap <= max_rcv_gap)
2.
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:3822
 - test_shaper_bw("bw4", "node_1_1_1", 1, 4 * MBPS) == 0
3.
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:2546
 - (min_rcv_gap <= avg_rcv_gap) && (avg_rcv_gap <= max_rcv_gap)
4.
../../../../../../../test/common_plat/validation/api/traffic_mngr/traffic_mngr.c:3823
 - test_shaper_bw("bw10", "node_1_1_1", 2, 10 * MBPS) == 0


Full test log is attached

-- 
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] example: add IPv4 fragmentation/reassembly example

2017-04-19 Thread Maxim Uvarov
Joe,

can you please make it work with clang? I sent a patch to ml before. It
might still apply, so you can review it.
https://travis-ci.org/muvarov/odp/jobs/223572921

the goal is to find good combination of -mcx16 and -latomic flags. And
we need to test that it still works on arm due to there is no mcx16 flag.

Maxim.

On 13.04.2017 17:46, 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   |  23 +
>  example/ipfragreass/odp_ipfragreass.c | 376 +++
>  example/ipfragreass/odp_ipfragreass_atomics.h |  55 ++
>  example/ipfragreass/odp_ipfragreass_atomics_arm.h | 120 
>  example/ipfragreass/odp_ipfragreass_fragment.c|  99 +++
>  example/ipfragreass/odp_ipfragreass_fragment.h|  28 +
>  example/ipfragreass/odp_ipfragreass_helpers.c | 124 
>  example/ipfragreass/odp_ipfragreass_helpers.h |  79 +++
>  example/ipfragreass/odp_ipfragreass_ip.h  | 251 +++
>  example/ipfragreass/odp_ipfragreass_reassemble.c  | 771 
> ++
>  example/ipfragreass/odp_ipfragreass_reassemble.h  | 211 ++
>  example/m4/configure.m4   |   1 +
>  15 files changed, 2147 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_atomics_arm.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..f805a69
> --- /dev/null
> +++ b/example/ipfragreass/Makefile.am
> @@ -0,0 +1,23 @@
> +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_atomics_arm.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..6ad0db9
> --- /dev/null
> +++ b/example/ipfragreass/odp_ipfragreass.c
> @@ 

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #11 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #12 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

2017-04-19 Thread Verma, Shally


-Original Message-
From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Verma, 
Shally
Sent: 19 April 2017 19:30
To: Dmitry Eremin-Solenikov ; Shally Verma 
; lng-odp@lists.linaro.org
Cc: Challa, Mahipal ; Masood, Faisal 
; Narayana, Prasad Athreya 

Subject: Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface



-Original Message-
From: Dmitry Eremin-Solenikov [mailto:dmitry.ereminsoleni...@linaro.org]
Sent: 19 April 2017 17:36
To: Shally Verma ; lng-odp@lists.linaro.org
Cc: Challa, Mahipal ; Masood, Faisal 
; Narayana, Prasad Athreya 
; Verma, Shally 
Subject: Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

On 19.04.2017 13:00, Shally Verma wrote:
> An API set to add compression/decompression support in ODP interface.
> 
> Signed-off-by: Shally Verma 
> Signed-off-by: Mahipal Challa 
> ---
>  include/odp/api/spec/comp.h | 748
> 
>  1 file changed, 748 insertions(+)
> 
> diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h 
> new file mode 100644 index 000..65feacf
> --- /dev/null
> +++ b/include/odp/api/spec/comp.h
> @@ -0,0 +1,748 @@
> +/*
> + */
> +
> +/**
> + * @file
> + *
> + * ODP Compression
> + */
> +
> +#ifndef ODP_API_COMP_H_
> +#define ODP_API_COMP_H_
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_compression ODP COMP
> + *  ODP Compression defines interface to compress/decompress and 
> +authenticate
> + *  data.
> + *
> + *  Compression here implicilty refer to both compression and decompression.
> + *  Example, compression algo 'deflate' mean both 'deflate' and 'inflate'.
> + *
> + *  if opcode = ODP_COMP_COMPRESS, then it will Compress,
> + *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress.
> + *
> + *  Current version of Interface allow Compression 
> +ONLY,Authentication ONLY or
> + *  both Compression + Auth ONLY sessions.
> + *
> + *  Macros, enums, types and operations to utilise compression.
> + *  @{
> + */
> +
> +/**
> + * @def ODP_COMP_SESSION_INVALID
> + * Invalid session handle
> + */
> +
> +/**
> + * @typedef odp_comp_session_t (platform dependent)
> + * Comp API opaque session handle
> + */
> +
> +/**
> + * @typedef odp_comp_compl_t
> +* Compression API completion event (platform dependent) */
> +
> +/**
> + * Compression API operation mode
> + */
> +typedef enum {
> + /** Synchronous, return results immediately */
> + ODP_COMP_SYNC,
> + /** Asynchronous, return results via queue event */
> + ODP_COMP_ASYNC,
> +} odp_comp_op_mode_t;
> +
> +/**
> + * Comp API operation type.
> + * Ignored for Authentication ONLY.
> + *
> + */
> +typedef enum {
> + /** Compress and/or Compute digest  */
> + ODP_COMP_OP_COMPRESS,
> + /** Decompress and/or Compute digest */
> + ODP_COMP_OP_DECOMPRESS,
> +} odp_comp_op_t;
> +
> +/**
> + * Comp API authentication algorithm
> + *
> + */
> +typedef enum {
> + /** No authentication algorithm specified */
> + ODP_COMP_AUTH_ALG_NULL,
> + /** ODP_COMP_AUTH_ALG_SHA1*/
> + ODP_COMP_AUTH_ALG_SHA1,
> + /**  ODP_COMP_AUTH_ALG_SHA256*/
> + ODP_COMP_AUTH_ALG_SHA256
> +} odp_comp_auth_alg_t;

Why do you need special comp_auth_alg instead of just odp_auth_alg_t?
Shally - To differentiate that these algorithm are specifically part of 
compression interface as crypto also has them enumerated.
Correction - Crypto doesn't enumerate them "as is" in current api-next as I see 
it.
> +
> +/**
> + * Comp API compression algorithm
> + *
> + */
> +typedef enum {
> + /** No algorithm specified.
> + * Means no compression, no output provided.
> + */
> + ODP_COMP_ALG_NULL,
> + /** DEFLATE -
> + * implicit Inflate in case of decode operation.
> + */
> + ODP_COMP_ALG_DEFLATE,
> + /** ZLIB-RFC1950 */
> + ODP_COMP_ALG_ZLIB,
> + /** LZS*/
> + ODP_COMP_ALG_LZS,
> +} odp_comp_alg_t;
> +
> +/**
> + * Comp API session creation return code
> + *
> + */
> +typedef enum {
> + /** Session created */
> + ODP_COMP_SES_CREATE_ERR_NONE,
> + /** Creation failed, no resources */
> + ODP_COMP_SES_CREATE_ERR_ENOMEM,
> + /** Creation failed, bad compression params */
> + ODP_COMP_SES_CREATE_ERR_INV_COMP,
> + /** Creation failed, bad auth params */
> + ODP_COMP_SES_CREATE_ERR_INV_AUTH,
> + /** Creation failed,requested configuration not supported*/
> + ODP_COMP_SES_CREATE_ERR_NOT_SUPPORTED
> +} odp_comp_ses_create_err_t;
> +
> +/**
> + * Comp API operation return codes
> + *
> + */
> +typedef enum {
> + /** Operation completed successfully*/
> + 

[lng-odp] [PATCH] linux-generic: crypto: properly handle errors in packet copy

2017-04-19 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add proper handling for errors returned by odp_packet_copy_from_pkt().

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 14 (lumag:crypto-copy)
 ** https://github.com/Linaro/odp/pull/14
 ** Patch: https://github.com/Linaro/odp/pull/14.patch
 ** Base sha: 3e5a07edf190614e739c8dba76cf165330e1b035
 ** Merge commit sha: 0e582f4a02782a2c90ee8f93117e549ca09ab55e
 **/
 platform/linux-generic/odp_crypto.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 54b222f..675b3e2 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -886,11 +886,17 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
}
 
if (param->pkt != param->out_pkt) {
-   (void)odp_packet_copy_from_pkt(param->out_pkt,
+   int ret;
+
+   ret = odp_packet_copy_from_pkt(param->out_pkt,
   0,
   param->pkt,
   0,
   odp_packet_len(param->pkt));
+   if (odp_unlikely(ret < 0)) {
+   ODP_DBG("Copy failed.\n");
+   return -1;
+   }
_odp_packet_copy_md_to_packet(param->pkt, param->out_pkt);
odp_packet_free(param->pkt);
param->pkt = ODP_PACKET_INVALID;



Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

2017-04-19 Thread Verma, Shally


-Original Message-
From: Dmitry Eremin-Solenikov [mailto:dmitry.ereminsoleni...@linaro.org] 
Sent: 19 April 2017 17:36
To: Shally Verma ; lng-odp@lists.linaro.org
Cc: Challa, Mahipal ; Masood, Faisal 
; Narayana, Prasad Athreya 
; Verma, Shally 
Subject: Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

On 19.04.2017 13:00, Shally Verma wrote:
> An API set to add compression/decompression support in ODP interface.
> 
> Signed-off-by: Shally Verma 
> Signed-off-by: Mahipal Challa 
> ---
>  include/odp/api/spec/comp.h | 748 
> 
>  1 file changed, 748 insertions(+)
> 
> diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h 
> new file mode 100644 index 000..65feacf
> --- /dev/null
> +++ b/include/odp/api/spec/comp.h
> @@ -0,0 +1,748 @@
> +/*
> + */
> +
> +/**
> + * @file
> + *
> + * ODP Compression
> + */
> +
> +#ifndef ODP_API_COMP_H_
> +#define ODP_API_COMP_H_
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_compression ODP COMP
> + *  ODP Compression defines interface to compress/decompress and 
> +authenticate
> + *  data.
> + *
> + *  Compression here implicilty refer to both compression and decompression.
> + *  Example, compression algo 'deflate' mean both 'deflate' and 'inflate'.
> + *
> + *  if opcode = ODP_COMP_COMPRESS, then it will Compress,
> + *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress.
> + *
> + *  Current version of Interface allow Compression 
> +ONLY,Authentication ONLY or
> + *  both Compression + Auth ONLY sessions.
> + *
> + *  Macros, enums, types and operations to utilise compression.
> + *  @{
> + */
> +
> +/**
> + * @def ODP_COMP_SESSION_INVALID
> + * Invalid session handle
> + */
> +
> +/**
> + * @typedef odp_comp_session_t (platform dependent)
> + * Comp API opaque session handle
> + */
> +
> +/**
> + * @typedef odp_comp_compl_t
> +* Compression API completion event (platform dependent) */
> +
> +/**
> + * Compression API operation mode
> + */
> +typedef enum {
> + /** Synchronous, return results immediately */
> + ODP_COMP_SYNC,
> + /** Asynchronous, return results via queue event */
> + ODP_COMP_ASYNC,
> +} odp_comp_op_mode_t;
> +
> +/**
> + * Comp API operation type.
> + * Ignored for Authentication ONLY.
> + *
> + */
> +typedef enum {
> + /** Compress and/or Compute digest  */
> + ODP_COMP_OP_COMPRESS,
> + /** Decompress and/or Compute digest */
> + ODP_COMP_OP_DECOMPRESS,
> +} odp_comp_op_t;
> +
> +/**
> + * Comp API authentication algorithm
> + *
> + */
> +typedef enum {
> + /** No authentication algorithm specified */
> + ODP_COMP_AUTH_ALG_NULL,
> + /** ODP_COMP_AUTH_ALG_SHA1*/
> + ODP_COMP_AUTH_ALG_SHA1,
> + /**  ODP_COMP_AUTH_ALG_SHA256*/
> + ODP_COMP_AUTH_ALG_SHA256
> +} odp_comp_auth_alg_t;

Why do you need special comp_auth_alg instead of just odp_auth_alg_t?
Shally - To differentiate that these algorithm are specifically part of 
compression interface as crypto also has them enumerated.
> +
> +/**
> + * Comp API compression algorithm
> + *
> + */
> +typedef enum {
> + /** No algorithm specified.
> + * Means no compression, no output provided.
> + */
> + ODP_COMP_ALG_NULL,
> + /** DEFLATE -
> + * implicit Inflate in case of decode operation.
> + */
> + ODP_COMP_ALG_DEFLATE,
> + /** ZLIB-RFC1950 */
> + ODP_COMP_ALG_ZLIB,
> + /** LZS*/
> + ODP_COMP_ALG_LZS,
> +} odp_comp_alg_t;
> +
> +/**
> + * Comp API session creation return code
> + *
> + */
> +typedef enum {
> + /** Session created */
> + ODP_COMP_SES_CREATE_ERR_NONE,
> + /** Creation failed, no resources */
> + ODP_COMP_SES_CREATE_ERR_ENOMEM,
> + /** Creation failed, bad compression params */
> + ODP_COMP_SES_CREATE_ERR_INV_COMP,
> + /** Creation failed, bad auth params */
> + ODP_COMP_SES_CREATE_ERR_INV_AUTH,
> + /** Creation failed,requested configuration not supported*/
> + ODP_COMP_SES_CREATE_ERR_NOT_SUPPORTED
> +} odp_comp_ses_create_err_t;
> +
> +/**
> + * Comp API operation return codes
> + *
> + */
> +typedef enum {
> + /** Operation completed successfully*/
> + ODP_COMP_ERR_NONE,
> + /** Invalid user data pointers*/
> + ODP_COMP_ERR_DATA_PTR,
> + /** Invalid input data size*/
> + ODP_COMP_ERR_DATA_SIZE,
> + /**  Compression and/or Auth Algo failure*/
> + ODP_COMP_ERR_ALGO_FAIL,
> + /** Error detected during DMA of data*/
> + ODP_COMP_ERR_DMA,
> + /** Operation paused due to insufficient output buffer
> + *
> + * This is not an error condition. On seeing this error, caller
> + * should call odp_comp_operation() again with valid output buffer
> + * with no-more input or altercation to other 

Re: [lng-odp] [API-NEXT v5] api: ipsec: factor out definitions for feature support levels

2017-04-19 Thread Maxim Uvarov
Dmitry, please name patches as API-NEXT PATH v5, not as API-NEXT.

Maxim.


On 19.04.2017 16:41, Dmitry Eremin-Solenikov wrote:
> Instead of having magic 0-1-2 numbers, let's have the special enum for
> feature support levels (unsupported/supported/preferred).
> 
> Signed-off-by: Dmitry Eremin-Solenikov 
> ---
>  include/odp/api/spec/ipsec.h | 39 +---
>  include/odp/api/spec/support.h   | 57 
> 
>  include/odp_api.h|  1 +
>  platform/Makefile.inc|  1 +
>  platform/linux-generic/Makefile.am   |  1 +
>  platform/linux-generic/include/odp/api/support.h | 34 ++
>  6 files changed, 106 insertions(+), 27 deletions(-)
>  create mode 100644 include/odp/api/spec/support.h
>  create mode 100644 platform/linux-generic/include/odp/api/support.h
> 
> diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
> index a0ceb11a..ecbf38c6 100644
> --- a/include/odp/api/spec/ipsec.h
> +++ b/include/odp/api/spec/ipsec.h
> @@ -19,6 +19,7 @@ extern "C" {
>  #endif
>  
>  #include 
> +#include 
>  #include 
>  #include 
>  
> @@ -230,38 +231,22 @@ typedef struct odp_ipsec_capability_t {
>   /** Maximum number of IPSEC SAs */
>   uint32_t max_num_sa;
>  
> - /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC) support
> -  *
> -  *  0: Synchronous mode is not supported
> -  *  1: Synchronous mode is supported
> -  *  2: Synchronous mode is supported and preferred
> -  */
> - uint8_t op_mode_sync;
> + /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC) support */
> + odp_support_t op_mode_sync;
>  
> - /** Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC) support
> -  *
> -  *  0: Asynchronous mode is not supported
> -  *  1: Asynchronous mode is supported
> -  *  2: Asynchronous mode is supported and preferred
> + /**
> +  * Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC) support
>*/
> - uint8_t op_mode_async;
> + odp_support_t op_mode_async;
>  
> - /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support
> -  *
> -  *  0: Inline IPSEC operation is not supported
> -  *  1: Inline IPSEC operation is supported
> -  *  2: Inline IPSEC operation is supported and preferred
> -  */
> - uint8_t op_mode_inline;
> + /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support */
> + odp_support_t op_mode_inline;
>  
> - /** Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
> -  *  resulting inbound packets.
> -  *
> -  *  0: Classification of resulting packets is not supported
> -  *  1: Classification of resulting packets is supported
> -  *  2: Classification of resulting packets is supported and preferred
> + /**
> +  * Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
> +  *  resulting inbound packets
>*/
> - uint8_t pipeline_cls;
> + odp_support_t pipeline_cls;
>  
>   /** Soft expiry limit in seconds support
>*
> diff --git a/include/odp/api/spec/support.h b/include/odp/api/spec/support.h
> new file mode 100644
> index ..cc43b6f0
> --- /dev/null
> +++ b/include/odp/api/spec/support.h
> @@ -0,0 +1,57 @@
> +/* Copyright (c) 2017, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP support API
> + */
> +
> +#ifndef ODP_API_SUPPORT_H_
> +#define ODP_API_SUPPORT_H_
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_support ODP support
> + *  Common API
> + *  @{
> + */
> +
> +/**
> + * ODP support support
> + *
> + * Support levels are specified in the relative order, where ODP_SUPPORT_NO 
> is
> + * the lowest level. E.g. if the examined support level is greater than
> + * ODP_SUPPORT_NO, the feature is supported in some form.
> + */
> +typedef enum odp_support_t {
> + /**
> +  * Feature is not supported
> +  */
> + ODP_SUPPORT_NO = 0,
> + /**
> +  * Feature is supported
> +  */
> + ODP_SUPPORT_YES,
> + /**
> +  * Feature is supported and preferred
> +  */
> + ODP_SUPPORT_PREFERRED
> +} odp_support_t;
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#include 
> +#endif
> diff --git a/include/odp_api.h b/include/odp_api.h
> index 73e5309a..e3ffcb1e 100644
> --- a/include/odp_api.h
> +++ b/include/odp_api.h
> @@ -57,6 +57,7 @@ extern "C" {
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #ifdef __cplusplus
> diff --git a/platform/Makefile.inc b/platform/Makefile.inc
> index 874cf887..b4cc2433 100644
> --- a/platform/Makefile.inc
> +++ b/platform/Makefile.inc
> @@ -31,6 +31,7 @@ odpapispecinclude_HEADERS = \
> 

[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #10 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [API-NEXT v5] api: ipsec: factor out definitions for feature support levels

2017-04-19 Thread Dmitry Eremin-Solenikov
Instead of having magic 0-1-2 numbers, let's have the special enum for
feature support levels (unsupported/supported/preferred).

Signed-off-by: Dmitry Eremin-Solenikov 
---
 include/odp/api/spec/ipsec.h | 39 +---
 include/odp/api/spec/support.h   | 57 
 include/odp_api.h|  1 +
 platform/Makefile.inc|  1 +
 platform/linux-generic/Makefile.am   |  1 +
 platform/linux-generic/include/odp/api/support.h | 34 ++
 6 files changed, 106 insertions(+), 27 deletions(-)
 create mode 100644 include/odp/api/spec/support.h
 create mode 100644 platform/linux-generic/include/odp/api/support.h

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index a0ceb11a..ecbf38c6 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -19,6 +19,7 @@ extern "C" {
 #endif
 
 #include 
+#include 
 #include 
 #include 
 
@@ -230,38 +231,22 @@ typedef struct odp_ipsec_capability_t {
/** Maximum number of IPSEC SAs */
uint32_t max_num_sa;
 
-   /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC) support
-*
-*  0: Synchronous mode is not supported
-*  1: Synchronous mode is supported
-*  2: Synchronous mode is supported and preferred
-*/
-   uint8_t op_mode_sync;
+   /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC) support */
+   odp_support_t op_mode_sync;
 
-   /** Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC) support
-*
-*  0: Asynchronous mode is not supported
-*  1: Asynchronous mode is supported
-*  2: Asynchronous mode is supported and preferred
+   /**
+* Asynchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_ASYNC) support
 */
-   uint8_t op_mode_async;
+   odp_support_t op_mode_async;
 
-   /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support
-*
-*  0: Inline IPSEC operation is not supported
-*  1: Inline IPSEC operation is supported
-*  2: Inline IPSEC operation is supported and preferred
-*/
-   uint8_t op_mode_inline;
+   /** Inline IPSEC operation mode (ODP_IPSEC_OP_MODE_INLINE) support */
+   odp_support_t op_mode_inline;
 
-   /** Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
-*  resulting inbound packets.
-*
-*  0: Classification of resulting packets is not supported
-*  1: Classification of resulting packets is supported
-*  2: Classification of resulting packets is supported and preferred
+   /**
+* Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of
+*  resulting inbound packets
 */
-   uint8_t pipeline_cls;
+   odp_support_t pipeline_cls;
 
/** Soft expiry limit in seconds support
 *
diff --git a/include/odp/api/spec/support.h b/include/odp/api/spec/support.h
new file mode 100644
index ..cc43b6f0
--- /dev/null
+++ b/include/odp/api/spec/support.h
@@ -0,0 +1,57 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP support API
+ */
+
+#ifndef ODP_API_SUPPORT_H_
+#define ODP_API_SUPPORT_H_
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @defgroup odp_support ODP support
+ *  Common API
+ *  @{
+ */
+
+/**
+ * ODP support support
+ *
+ * Support levels are specified in the relative order, where ODP_SUPPORT_NO is
+ * the lowest level. E.g. if the examined support level is greater than
+ * ODP_SUPPORT_NO, the feature is supported in some form.
+ */
+typedef enum odp_support_t {
+   /**
+* Feature is not supported
+*/
+   ODP_SUPPORT_NO = 0,
+   /**
+* Feature is supported
+*/
+   ODP_SUPPORT_YES,
+   /**
+* Feature is supported and preferred
+*/
+   ODP_SUPPORT_PREFERRED
+} odp_support_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include 
+#endif
diff --git a/include/odp_api.h b/include/odp_api.h
index 73e5309a..e3ffcb1e 100644
--- a/include/odp_api.h
+++ b/include/odp_api.h
@@ -57,6 +57,7 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #ifdef __cplusplus
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 874cf887..b4cc2433 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -31,6 +31,7 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/debug.h \
  $(top_srcdir)/include/odp/api/spec/errno.h \
  $(top_srcdir)/include/odp/api/spec/event.h \
+ $(top_srcdir)/include/odp/api/spec/support.h \
  $(top_srcdir)/include/odp/api/spec/hash.h \
  

Re: [lng-odp] [PATCH v3] build: fix native Clang build on ARMv8

2017-04-19 Thread Brian Brooks
On Wed, Apr 19, 2017 at 2:42 AM, Maxim Uvarov  wrote:
> Brian, where I can take arm clang to test this patch?

>From the distro's package manager, e.g. 'apt-get install clang' when
running Ubuntu on an ARMv8 machine.

> Thanks,
> Maxim.
>
> On 19 April 2017 at 00:09, Brian Brooks  wrote:
>
>> The build is broken when using clang on ARM. -mcx16 is being passed to
>> clang when building natively on ARM. This combined with -Werror causes
>> the breakage. Fix it by skipping anything related to -mcx16 when not
>> building for x86-based architectures. See [1] for details.
>>
>> [1] https://lists.linaro.org/pipermail/lng-odp/2017-April/029684.html
>>
>> Signed-off-by: Brian Brooks 
>> Reviewed-by: Dmitry Eremin-Solenikov 
>> ---
>>
>> v3
>> - Move changes delta underneath the commit message (Petri)
>> v2
>> - Add more description to commit message (Dmitry)
>>
>>  configure.ac | 30 --
>>  1 file changed, 16 insertions(+), 14 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 9320f360..d364b8dd 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -303,20 +303,22 @@ ODP_CFLAGS="$ODP_CFLAGS -std=c99"
>>  # Extra flags for example to suppress certain warning types
>>  ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
>>
>> -#
>> -# Check if compiler supports cmpxchng16
>> -###
>> ###
>> -if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
>> -   my_save_cflags="$CFLAGS"
>> -
>> -   CFLAGS=-mcx16
>> -   AC_MSG_CHECKING([whether CC supports -mcx16])
>> -   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
>> -   [AC_MSG_RESULT([yes])]
>> -   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
>> -   [AC_MSG_RESULT([no])]
>> -   )
>> -   CFLAGS="$my_save_cflags"
>> +###
>> ###
>> +# Check if compiler supports cmpxchng16 on x86-based architectures
>> +###
>> ###
>> +if "${host}" == i?86* -o "${host}" == x86*; then
>> +  if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
>> + my_save_cflags="$CFLAGS"
>> +
>> + CFLAGS=-mcx16
>> + AC_MSG_CHECKING([whether CC supports -mcx16])
>> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
>> +   [AC_MSG_RESULT([yes])]
>> +   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
>> +   [AC_MSG_RESULT([no])]
>> +   )
>> + CFLAGS="$my_save_cflags"
>> +  fi
>>  fi
>>
>>  
>> ##
>> --
>> 2.12.2
>>
>>


Re: [lng-odp] [API-NEXT PATCH v2 00/16] A scalable software scheduler

2017-04-19 Thread Peltonen, Janne (Nokia - FI/Espoo)

Ola Liljedahl [mailto:ola.liljed...@linaro.org] wrote:
> 
> On 10 April 2017 at 10:56, Peltonen, Janne (Nokia - FI/Espoo)
>  wrote:
> > Hi,
> >
> > Ola Liljedahl  wrote:
> >> Peltonen, Janne (Nokia - FI/Espoo)  wrote:
> >> > In an IPsec GW (as a use case example) one might want to do all
> >> > stateless processing (like ingress and egress IP processing and the
> >> > crypto operations) in ordered contexts to get parallelism, but the
> >> > stateful part (replay-check and sequence number generation) in
> >> > an atomic context (or holding an ordered lock) so that not only
> >> > the packets are output in ingress order but also their sequence
> >> > numbers are in the same order.
> >>
> >> To what extent does IPsec sequence number ordering have to equal actual
> >> transmission order? If an IPsec GW preserves ingress-to-egress packet 
> >> order,
> >> does it matter that this order might not be the same as the IPsec sequence
> >> number order? If IPsec SN's are not used for reordering, just for replay
> >> protection, I don't see why the two number series have to match.
> >
> > The sequence numbers of course do not need to fully match the transmission
> > order because the anti-replay window mechanism can tolerate out-of-sequence
> > packets (caused either by packet reordering in the network or by sequence
> > number assignment not quite following the transmission order.
> >
> > But assigning sequence numbers out of order with respect to the packet
> > order (which hopefully stays the same between the ingress and egress of
> > an SGW) eats into the out-of-sequence tolerance budget (i.e. the window
> > size at the other end) and leaves less of the budget for actual
> > reordering in the network.
> >
> > Whether out-of-sequence sequence number assignment is ok or problematic
> > depends on the peer configuration, network, possible QoS induced
> > packet reordering and the magnitude of the possible sequence number
> > (not packet) reordering with respect to transmission order in the sender.
> >
> > Often the antireplay window is something like 32 or 64 packets
> That seems like very small window(s). I understand the simplicity enabled
> by such small windows but is it really enough for modern high speed networks
> with multiple L2/L3 switch/router hops (possibly with some link aggregation
> in there as well).

Maybe it is, maybe it isn't. But in the spirit of being conservative
in what one sends to the network, it would not be so nice to have an
implementation that puts additional requirements like bigger
windows to the peers compared to an implementation that does not.

> 
> > and maybe
> > not all of that can be used by the IPsec sender for relaxed ordering of
> > the sequence number assignment. One issue is that the size of the replay
> > window is not negotiated so the sender cannot tell the receiver that
> > a bigger window than normal is needed.
> The receiver should be able to adapt the size of antireplay window by 
> monitoring
> the amount of (supposedly) stale packets (SN's). Has such a design been tried?

I am not aware of any such implementation (which does not mean that
they do not exist).

> Do you have any "quality" requirements here, how large proportion of packets 
> is
> allowed to be dropped due to limited size of antireplay window? I assume there
> are higher level SLA's that control packet loss, perhaps it is up to
> the service provider
> to use that packet loss budget as it sees fit.
> 
> >
> >> > That said, some might argue that IPsec replay window can take care
> >> > not only of packet reordering in the network but also of reordering
> >> > inside an IPsec GW and therefore the atomic context (or ordered lock)
> >> > is not necessarily needed in all implementations.
> >>
> >> Do you mean that the replay protection also should be responsible for
> >> end-to-end (IPsec GW to GW) order restoration?
> >
> > No, I do not mean that and I think it is not in general correct for
> > an IPsec GW to reorder received packets to the sequence number order.
> If order restoration adds latency, it can definitively do harm. And even if it
> could be done without adding latency (e.g. in some queue), we don't know if
> the SN order is the "real" order and order restoration actually is beneficial.
> 
> >
> > What I mean (but formulated sloppily) is that the window mechanism of
> > replay protection can tolerate out-of-sequence sequence numbers to some
> > extent even when the cause is not the network but the sending IPsec GW.
> Well you could consider (parts of) the IPsec GW itself to be part of
> the network...
> Where does the network start? You can consider the transmitting NIC or the
> cables the start of the network but what if you have link aggregation with
> independent NIC's? The network must have started at some earlier shared
> point where there is an unambiguous packet order. Is there always such a 
> 

Re: [lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

2017-04-19 Thread Dmitry Eremin-Solenikov
On 19.04.2017 13:00, Shally Verma wrote:
> An API set to add compression/decompression support in ODP
> interface.
> 
> Signed-off-by: Shally Verma 
> Signed-off-by: Mahipal Challa 
> ---
>  include/odp/api/spec/comp.h | 748 
> 
>  1 file changed, 748 insertions(+)
> 
> diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
> new file mode 100644
> index 000..65feacf
> --- /dev/null
> +++ b/include/odp/api/spec/comp.h
> @@ -0,0 +1,748 @@
> +/*
> + */
> +
> +/**
> + * @file
> + *
> + * ODP Compression
> + */
> +
> +#ifndef ODP_API_COMP_H_
> +#define ODP_API_COMP_H_
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_compression ODP COMP
> + *  ODP Compression defines interface to compress/decompress and authenticate
> + *  data.
> + *
> + *  Compression here implicilty refer to both compression and decompression.
> + *  Example, compression algo 'deflate' mean both 'deflate' and 'inflate'.
> + *
> + *  if opcode = ODP_COMP_COMPRESS, then it will Compress,
> + *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress.
> + *
> + *  Current version of Interface allow Compression ONLY,Authentication ONLY 
> or
> + *  both Compression + Auth ONLY sessions.
> + *
> + *  Macros, enums, types and operations to utilise compression.
> + *  @{
> + */
> +
> +/**
> + * @def ODP_COMP_SESSION_INVALID
> + * Invalid session handle
> + */
> +
> +/**
> + * @typedef odp_comp_session_t (platform dependent)
> + * Comp API opaque session handle
> + */
> +
> +/**
> + * @typedef odp_comp_compl_t
> +* Compression API completion event (platform dependent)
> +*/
> +
> +/**
> + * Compression API operation mode
> + */
> +typedef enum {
> + /** Synchronous, return results immediately */
> + ODP_COMP_SYNC,
> + /** Asynchronous, return results via queue event */
> + ODP_COMP_ASYNC,
> +} odp_comp_op_mode_t;
> +
> +/**
> + * Comp API operation type.
> + * Ignored for Authentication ONLY.
> + *
> + */
> +typedef enum {
> + /** Compress and/or Compute digest  */
> + ODP_COMP_OP_COMPRESS,
> + /** Decompress and/or Compute digest */
> + ODP_COMP_OP_DECOMPRESS,
> +} odp_comp_op_t;
> +
> +/**
> + * Comp API authentication algorithm
> + *
> + */
> +typedef enum {
> + /** No authentication algorithm specified */
> + ODP_COMP_AUTH_ALG_NULL,
> + /** ODP_COMP_AUTH_ALG_SHA1*/
> + ODP_COMP_AUTH_ALG_SHA1,
> + /**  ODP_COMP_AUTH_ALG_SHA256*/
> + ODP_COMP_AUTH_ALG_SHA256
> +} odp_comp_auth_alg_t;

Why do you need special comp_auth_alg instead of just odp_auth_alg_t?

> +
> +/**
> + * Comp API compression algorithm
> + *
> + */
> +typedef enum {
> + /** No algorithm specified.
> + * Means no compression, no output provided.
> + */
> + ODP_COMP_ALG_NULL,
> + /** DEFLATE -
> + * implicit Inflate in case of decode operation.
> + */
> + ODP_COMP_ALG_DEFLATE,
> + /** ZLIB-RFC1950 */
> + ODP_COMP_ALG_ZLIB,
> + /** LZS*/
> + ODP_COMP_ALG_LZS,
> +} odp_comp_alg_t;
> +
> +/**
> + * Comp API session creation return code
> + *
> + */
> +typedef enum {
> + /** Session created */
> + ODP_COMP_SES_CREATE_ERR_NONE,
> + /** Creation failed, no resources */
> + ODP_COMP_SES_CREATE_ERR_ENOMEM,
> + /** Creation failed, bad compression params */
> + ODP_COMP_SES_CREATE_ERR_INV_COMP,
> + /** Creation failed, bad auth params */
> + ODP_COMP_SES_CREATE_ERR_INV_AUTH,
> + /** Creation failed,requested configuration not supported*/
> + ODP_COMP_SES_CREATE_ERR_NOT_SUPPORTED
> +} odp_comp_ses_create_err_t;
> +
> +/**
> + * Comp API operation return codes
> + *
> + */
> +typedef enum {
> + /** Operation completed successfully*/
> + ODP_COMP_ERR_NONE,
> + /** Invalid user data pointers*/
> + ODP_COMP_ERR_DATA_PTR,
> + /** Invalid input data size*/
> + ODP_COMP_ERR_DATA_SIZE,
> + /**  Compression and/or Auth Algo failure*/
> + ODP_COMP_ERR_ALGO_FAIL,
> + /** Error detected during DMA of data*/
> + ODP_COMP_ERR_DMA,
> + /** Operation paused due to insufficient output buffer
> + *
> + * This is not an error condition. On seeing this error, caller
> + * should call odp_comp_operation() again with valid output buffer
> + * with no-more input or altercation to other input
> + * operation parameters.
> + *
> + * for applications, considering this an error condition should destroy
> + * and re-create session to start afresh.
> + *
> + * Implementation should maintain context in this condition.
> + */
> + ODP_COMP_ERR_OUT_OF_SPACE,
> + /** Error if operation has been requested in an invalid state */
> + ODP_COMP_ERR_INV_STATE
> +} odp_comp_err_t;
> +
> +/**
> +* Comp API enumeration for preferred compression level/speed.
> +*
> +* trade-off between speed and compression ratio.
> +*
> +* Please note this enumeration 

[lng-odp] [RFC, API-NEXT v2 1/1] comp:compression interface

2017-04-19 Thread Shally Verma
An API set to add compression/decompression support in ODP
interface.

Signed-off-by: Shally Verma 
Signed-off-by: Mahipal Challa 
---
 include/odp/api/spec/comp.h | 748 
 1 file changed, 748 insertions(+)

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
new file mode 100644
index 000..65feacf
--- /dev/null
+++ b/include/odp/api/spec/comp.h
@@ -0,0 +1,748 @@
+/*
+ */
+
+/**
+ * @file
+ *
+ * ODP Compression
+ */
+
+#ifndef ODP_API_COMP_H_
+#define ODP_API_COMP_H_
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @defgroup odp_compression ODP COMP
+ *  ODP Compression defines interface to compress/decompress and authenticate
+ *  data.
+ *
+ *  Compression here implicilty refer to both compression and decompression.
+ *  Example, compression algo 'deflate' mean both 'deflate' and 'inflate'.
+ *
+ *  if opcode = ODP_COMP_COMPRESS, then it will Compress,
+ *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress.
+ *
+ *  Current version of Interface allow Compression ONLY,Authentication ONLY or
+ *  both Compression + Auth ONLY sessions.
+ *
+ *  Macros, enums, types and operations to utilise compression.
+ *  @{
+ */
+
+/**
+ * @def ODP_COMP_SESSION_INVALID
+ * Invalid session handle
+ */
+
+/**
+ * @typedef odp_comp_session_t (platform dependent)
+ * Comp API opaque session handle
+ */
+
+/**
+ * @typedef odp_comp_compl_t
+* Compression API completion event (platform dependent)
+*/
+
+/**
+ * Compression API operation mode
+ */
+typedef enum {
+   /** Synchronous, return results immediately */
+   ODP_COMP_SYNC,
+   /** Asynchronous, return results via queue event */
+   ODP_COMP_ASYNC,
+} odp_comp_op_mode_t;
+
+/**
+ * Comp API operation type.
+ * Ignored for Authentication ONLY.
+ *
+ */
+typedef enum {
+   /** Compress and/or Compute digest  */
+   ODP_COMP_OP_COMPRESS,
+   /** Decompress and/or Compute digest */
+   ODP_COMP_OP_DECOMPRESS,
+} odp_comp_op_t;
+
+/**
+ * Comp API authentication algorithm
+ *
+ */
+typedef enum {
+   /** No authentication algorithm specified */
+   ODP_COMP_AUTH_ALG_NULL,
+   /** ODP_COMP_AUTH_ALG_SHA1*/
+   ODP_COMP_AUTH_ALG_SHA1,
+   /**  ODP_COMP_AUTH_ALG_SHA256*/
+   ODP_COMP_AUTH_ALG_SHA256
+} odp_comp_auth_alg_t;
+
+/**
+ * Comp API compression algorithm
+ *
+ */
+typedef enum {
+   /** No algorithm specified.
+   * Means no compression, no output provided.
+   */
+   ODP_COMP_ALG_NULL,
+   /** DEFLATE -
+   * implicit Inflate in case of decode operation.
+   */
+   ODP_COMP_ALG_DEFLATE,
+   /** ZLIB-RFC1950 */
+   ODP_COMP_ALG_ZLIB,
+   /** LZS*/
+   ODP_COMP_ALG_LZS,
+} odp_comp_alg_t;
+
+/**
+ * Comp API session creation return code
+ *
+ */
+typedef enum {
+   /** Session created */
+   ODP_COMP_SES_CREATE_ERR_NONE,
+   /** Creation failed, no resources */
+   ODP_COMP_SES_CREATE_ERR_ENOMEM,
+   /** Creation failed, bad compression params */
+   ODP_COMP_SES_CREATE_ERR_INV_COMP,
+   /** Creation failed, bad auth params */
+   ODP_COMP_SES_CREATE_ERR_INV_AUTH,
+   /** Creation failed,requested configuration not supported*/
+   ODP_COMP_SES_CREATE_ERR_NOT_SUPPORTED
+} odp_comp_ses_create_err_t;
+
+/**
+ * Comp API operation return codes
+ *
+ */
+typedef enum {
+   /** Operation completed successfully*/
+   ODP_COMP_ERR_NONE,
+   /** Invalid user data pointers*/
+   ODP_COMP_ERR_DATA_PTR,
+   /** Invalid input data size*/
+   ODP_COMP_ERR_DATA_SIZE,
+   /**  Compression and/or Auth Algo failure*/
+   ODP_COMP_ERR_ALGO_FAIL,
+   /** Error detected during DMA of data*/
+   ODP_COMP_ERR_DMA,
+   /** Operation paused due to insufficient output buffer
+   *
+   * This is not an error condition. On seeing this error, caller
+   * should call odp_comp_operation() again with valid output buffer
+   * with no-more input or altercation to other input
+   * operation parameters.
+   *
+   * for applications, considering this an error condition should destroy
+   * and re-create session to start afresh.
+   *
+   * Implementation should maintain context in this condition.
+   */
+   ODP_COMP_ERR_OUT_OF_SPACE,
+   /** Error if operation has been requested in an invalid state */
+   ODP_COMP_ERR_INV_STATE
+} odp_comp_err_t;
+
+/**
+* Comp API enumeration for preferred compression level/speed.
+*
+* trade-off between speed and compression ratio.
+*
+* Please note this enumeration is only a peferential selection
+* but may not guarantee operation to committed level depending
+* on implementation support. Ex. SPEED_FASTEST and SPEED_FAST may
+* give same result on some platforms.
+*
+*/
+typedef enum {
+   /* Use implementaion default between ratio and speed */
+   ODP_COMP_SPEED_DEFAULT = 0,
+   /** 

[lng-odp] [RFC, API-NEXT v2 0/1] comp:compression interface

2017-04-19 Thread Shally Verma
This series adds an API set to support compression/decompression in ODP 
interface.
Changes from patch v1:
make compression and authentication algorithms as seperate enumerations, 
dedicate session to be either as synchronous or asynchronous, 
indicate interface support for sync/async in capability struct

Shally Verma (1):
  odp compression interface api set

 include/odp/api/spec/comp.h | 748 
 1 file changed, 748 insertions(+)
 create mode 100644 include/odp/api/spec/comp.h

-- 
1.9.1



Re: [lng-odp] [Linaro/odp] 6ce267: Revert "api: ipsec: factor out definitions for fea...

2017-04-19 Thread Verma, Shally
I was preparing for compression patch2 and updated it today again to use 
odp_feature_t to indicate sync/async in capability (as per last but one 
check-in).

So what is the proposal meanwhile? Should we instead use odp_bool_t to indicate 
feature (like async/sync mode) support until it is finalized?

Thanks
Shally

-Original Message-
From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of GitHub
Sent: 19 April 2017 13:32
To: lng-odp@lists.linaro.org
Subject: [lng-odp] [Linaro/odp] 6ce267: Revert "api: ipsec: factor out 
definitions for fea...

  Branch: refs/heads/api-next
  Home:   https://github.com/Linaro/odp
  Commit: 6ce267197a66180042916368a469ed9dcc33eaa7
  
https://github.com/Linaro/odp/commit/6ce267197a66180042916368a469ed9dcc33eaa7
  Author: Maxim Uvarov 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
R include/odp/api/spec/feature.h
M include/odp/api/spec/ipsec.h
M include/odp_api.h
M platform/Makefile.inc
M platform/linux-generic/Makefile.am
R platform/linux-generic/include/odp/api/feature.h

  Log Message:
  ---
  Revert "api: ipsec: factor out definitions for feature support levels"

This reverts
commit d025907602c5 ("api: ipsec: factor out definitions for feature
  support levels")
Petri rejected this patch and plan write some common solution

Signed-off-by: Maxim Uvarov 




[lng-odp] [Bug 2852] ODP_STATIC_ASSERT() fails when used by C++

2017-04-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2852

--- Comment #9 from Maxim Uvarov  ---
https://github.com/muvarov/odp/commit/3e5a07edf190614e739c8dba76cf165330e1b035
2017-04-17T19:37:43+03:00
Bill Fischofer bill.fischo...@linaro.org
linux-generic: debug: enable helper use from c++ programs

The ODP_STATIC_ASSERT() macro expands to _Static_assert(), however when
used in C++ programs this needs to expand to static_assert().

This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2852

Reported-by: Moshe Tubul 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Linaro/odp] 6ce267: Revert "api: ipsec: factor out definitions for fea...

2017-04-19 Thread GitHub
  Branch: refs/heads/api-next
  Home:   https://github.com/Linaro/odp
  Commit: 6ce267197a66180042916368a469ed9dcc33eaa7
  
https://github.com/Linaro/odp/commit/6ce267197a66180042916368a469ed9dcc33eaa7
  Author: Maxim Uvarov 
  Date:   2017-04-19 (Wed, 19 Apr 2017)

  Changed paths:
R include/odp/api/spec/feature.h
M include/odp/api/spec/ipsec.h
M include/odp_api.h
M platform/Makefile.inc
M platform/linux-generic/Makefile.am
R platform/linux-generic/include/odp/api/feature.h

  Log Message:
  ---
  Revert "api: ipsec: factor out definitions for feature support levels"

This reverts
commit d025907602c5 ("api: ipsec: factor out definitions for feature
  support levels")
Petri rejected this patch and plan write some common solution

Signed-off-by: Maxim Uvarov 




Re: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions for feature support levels

2017-04-19 Thread Maxim Uvarov
On 19 April 2017 at 10:42, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolai...@nokia-bell-labs.com> wrote:

> Maxim,
>
> Why this API change is now in api-next *without* by review?
>
>

We discussed that on meeting and everybody said that it is good improvement
and we need to apply that.



> I did OBJECT to it yesterday. See under. Please revert it.
>
>
> -Petri
>
>
Yes, will be reverted shortly.

Sorry Petri, I did not understand that it was objection. I read it as that
you will have plans to do future work. If possible be more exact saying
"NACK. ".

Thank you,
Maxim.



>
> > -Original Message-
> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> > Savolainen, Petri (Nokia - FI/Espoo)
> > Sent: Tuesday, April 18, 2017 2:46 PM
> > To: Dmitry Eremin-Solenikov ; lng-
> > o...@lists.linaro.org
> > Subject: Re: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions
> > for feature support levels
> >
> >
> >
> > > -Original Message-
> > > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> > > Dmitry Eremin-Solenikov
> > > Sent: Tuesday, April 18, 2017 12:03 AM
> > > To: lng-odp@lists.linaro.org
> > > Subject: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions for
> > > feature support levels
> > >
> > > Instead of having magic 0-1-2 numbers, let's have the special enum for
> > > feature support levels (unsupported/supported/preferred).
> > >
> > > Signed-off-by: Dmitry Eremin-Solenikov
> > 
> > > ---
> > >  include/odp/api/spec/feature.h   | 53
> > > 
> > >  include/odp/api/spec/ipsec.h | 39
> ++---
> > >  include/odp_api.h|  1 +
> > >  platform/Makefile.inc|  1 +
> > >  platform/linux-generic/Makefile.am   |  1 +
> > >  platform/linux-generic/include/odp/api/feature.h | 34 +++
> > >  6 files changed, 102 insertions(+), 27 deletions(-)
> > >  create mode 100644 include/odp/api/spec/feature.h
> > >  create mode 100644 platform/linux-generic/include/odp/api/feature.h
> > >
> > > diff --git a/include/odp/api/spec/feature.h
> > > b/include/odp/api/spec/feature.h
> > > new file mode 100644
> > > index ..7ee2ae04
> > > --- /dev/null
> > > +++ b/include/odp/api/spec/feature.h
> > > @@ -0,0 +1,53 @@
> > > +/* Copyright (c) 2017, Linaro Limited
> > > + * All rights reserved.
> > > + *
> > > + * SPDX-License-Identifier: BSD-3-Clause
> > > + */
> > > +
> > > +/**
> > > + * @file
> > > + *
> > > + * ODP feature API
> > > + */
> > > +
> > > +#ifndef ODP_API_FEATURE_H_
> > > +#define ODP_API_FEATURE_H_
> > > +#include 
> > > +
> > > +#ifdef __cplusplus
> > > +extern "C" {
> > > +#endif
> > > +
> > > +/** @defgroup odp_feature ODP feature
> > > + *  Common API
> > > + *  @{
> > > + */
> > > +
> > > +/**
> > > + * ODP feature support
> > > + */
> > > +typedef enum odp_feature_t {
> > > +   /**
> > > +* Feature is not supported
> > > +*/
> > > +   ODP_FEATURE_UNSUPPORTED,
> > > +   /**
> > > +* Feature is supported
> > > +*/
> > > +   ODP_FEATURE_SUPPORTED,
> > > +   /**
> > > +* Feature is supported and preferred
> > > +*/
> > > +   ODP_FEATURE_PREFERRED
> > > +} odp_feature_t;
> >
> >
> > I'm going to introduce odp_feature_t for list of ODP features - e.g. a
> bit
> > field listing all major ODP features (timer, tm, plain queue, scheduled
> > queued, etc). It can be used e.g. in global init phase to list which APIs
> > / API features the application is going to use.
> >
> >
> > This one is support level. No support should be zero (good default for
> > memset 0). The relative order must be documented, so that application can
> > simply compare between levels.
> >
> > /**
> >  * ODP feature support level
> >  *
> >  * Support levels are specified in the relative order, where
> >  * ODP_SUPPORT_NO is the lowest level. E.g. if the examined support
> >  * level is greater than ODP_SUPPORT_NO, the feature is supported
> >  * in some form.
> >  */
> > typedef enum odp_support_t {
> >   /**
> >* Feature is not supported
> >*/
> >   ODP_SUPPORT_NO = 0,
> >
> >   /**
> >* Feature is supported
> >*/
> >   ODP_SUPPORT_YES,
> >
> >   /**
> >* Feature is supported and preferred
> >*/
> >   ODP_SUPPORT_PREFERRED
> >
> > } odp_support_t;
> >
> >
> >
> >
> > >
> > > @@ -230,38 +231,22 @@ typedef struct odp_ipsec_capability_t {
> > > /** Maximum number of IPSEC SAs */
> > > uint32_t max_num_sa;
> > >
> > > -   /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC)
> > > support
> > > -*
> > > -*  0: Synchronous mode is not supported
> > > -*  1: Synchronous mode is supported
> > > -*  2: Synchronous mode is supported and preferred
> > > -*/
> > > -   uint8_t op_mode_sync;
> > > +   /** Synchronous 

Re: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions for feature support levels

2017-04-19 Thread Savolainen, Petri (Nokia - FI/Espoo)
Maxim,

Why this API change is now in api-next *without* by review?

I did OBJECT to it yesterday. See under. Please revert it.


-Petri


> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Savolainen, Petri (Nokia - FI/Espoo)
> Sent: Tuesday, April 18, 2017 2:46 PM
> To: Dmitry Eremin-Solenikov ; lng-
> o...@lists.linaro.org
> Subject: Re: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions
> for feature support levels
> 
> 
> 
> > -Original Message-
> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> > Dmitry Eremin-Solenikov
> > Sent: Tuesday, April 18, 2017 12:03 AM
> > To: lng-odp@lists.linaro.org
> > Subject: [lng-odp] [API-NEXT v4] api: ipsec: factor out definitions for
> > feature support levels
> >
> > Instead of having magic 0-1-2 numbers, let's have the special enum for
> > feature support levels (unsupported/supported/preferred).
> >
> > Signed-off-by: Dmitry Eremin-Solenikov
> 
> > ---
> >  include/odp/api/spec/feature.h   | 53
> > 
> >  include/odp/api/spec/ipsec.h | 39 ++---
> >  include/odp_api.h|  1 +
> >  platform/Makefile.inc|  1 +
> >  platform/linux-generic/Makefile.am   |  1 +
> >  platform/linux-generic/include/odp/api/feature.h | 34 +++
> >  6 files changed, 102 insertions(+), 27 deletions(-)
> >  create mode 100644 include/odp/api/spec/feature.h
> >  create mode 100644 platform/linux-generic/include/odp/api/feature.h
> >
> > diff --git a/include/odp/api/spec/feature.h
> > b/include/odp/api/spec/feature.h
> > new file mode 100644
> > index ..7ee2ae04
> > --- /dev/null
> > +++ b/include/odp/api/spec/feature.h
> > @@ -0,0 +1,53 @@
> > +/* Copyright (c) 2017, Linaro Limited
> > + * All rights reserved.
> > + *
> > + * SPDX-License-Identifier: BSD-3-Clause
> > + */
> > +
> > +/**
> > + * @file
> > + *
> > + * ODP feature API
> > + */
> > +
> > +#ifndef ODP_API_FEATURE_H_
> > +#define ODP_API_FEATURE_H_
> > +#include 
> > +
> > +#ifdef __cplusplus
> > +extern "C" {
> > +#endif
> > +
> > +/** @defgroup odp_feature ODP feature
> > + *  Common API
> > + *  @{
> > + */
> > +
> > +/**
> > + * ODP feature support
> > + */
> > +typedef enum odp_feature_t {
> > +   /**
> > +* Feature is not supported
> > +*/
> > +   ODP_FEATURE_UNSUPPORTED,
> > +   /**
> > +* Feature is supported
> > +*/
> > +   ODP_FEATURE_SUPPORTED,
> > +   /**
> > +* Feature is supported and preferred
> > +*/
> > +   ODP_FEATURE_PREFERRED
> > +} odp_feature_t;
> 
> 
> I'm going to introduce odp_feature_t for list of ODP features - e.g. a bit
> field listing all major ODP features (timer, tm, plain queue, scheduled
> queued, etc). It can be used e.g. in global init phase to list which APIs
> / API features the application is going to use.
> 
> 
> This one is support level. No support should be zero (good default for
> memset 0). The relative order must be documented, so that application can
> simply compare between levels.
> 
> /**
>  * ODP feature support level
>  *
>  * Support levels are specified in the relative order, where
>  * ODP_SUPPORT_NO is the lowest level. E.g. if the examined support
>  * level is greater than ODP_SUPPORT_NO, the feature is supported
>  * in some form.
>  */
> typedef enum odp_support_t {
>   /**
>* Feature is not supported
>*/
>   ODP_SUPPORT_NO = 0,
> 
>   /**
>* Feature is supported
>*/
>   ODP_SUPPORT_YES,
> 
>   /**
>* Feature is supported and preferred
>*/
>   ODP_SUPPORT_PREFERRED
> 
> } odp_support_t;
> 
> 
> 
> 
> >
> > @@ -230,38 +231,22 @@ typedef struct odp_ipsec_capability_t {
> > /** Maximum number of IPSEC SAs */
> > uint32_t max_num_sa;
> >
> > -   /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC)
> > support
> > -*
> > -*  0: Synchronous mode is not supported
> > -*  1: Synchronous mode is supported
> > -*  2: Synchronous mode is supported and preferred
> > -*/
> > -   uint8_t op_mode_sync;
> > +   /** Synchronous IPSEC operation mode (ODP_IPSEC_OP_MODE_SYNC)
> > support */
> > +   odp_feature_t op_mode_sync;
> 
> 
> Enum takes 4x the space of uint8_t. Maybe that's not a problem on these
> structs.
> 
> 
> -Petri
> 



Re: [lng-odp] [PATCH v3] build: fix native Clang build on ARMv8

2017-04-19 Thread Maxim Uvarov
Brian, where I can take arm clang to test this patch?

Thanks,
Maxim.

On 19 April 2017 at 00:09, Brian Brooks  wrote:

> The build is broken when using clang on ARM. -mcx16 is being passed to
> clang when building natively on ARM. This combined with -Werror causes
> the breakage. Fix it by skipping anything related to -mcx16 when not
> building for x86-based architectures. See [1] for details.
>
> [1] https://lists.linaro.org/pipermail/lng-odp/2017-April/029684.html
>
> Signed-off-by: Brian Brooks 
> Reviewed-by: Dmitry Eremin-Solenikov 
> ---
>
> v3
> - Move changes delta underneath the commit message (Petri)
> v2
> - Add more description to commit message (Dmitry)
>
>  configure.ac | 30 --
>  1 file changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 9320f360..d364b8dd 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -303,20 +303,22 @@ ODP_CFLAGS="$ODP_CFLAGS -std=c99"
>  # Extra flags for example to suppress certain warning types
>  ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
>
> -#
> -# Check if compiler supports cmpxchng16
> -###
> ###
> -if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
> -   my_save_cflags="$CFLAGS"
> -
> -   CFLAGS=-mcx16
> -   AC_MSG_CHECKING([whether CC supports -mcx16])
> -   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
> -   [AC_MSG_RESULT([yes])]
> -   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
> -   [AC_MSG_RESULT([no])]
> -   )
> -   CFLAGS="$my_save_cflags"
> +###
> ###
> +# Check if compiler supports cmpxchng16 on x86-based architectures
> +###
> ###
> +if "${host}" == i?86* -o "${host}" == x86*; then
> +  if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
> + my_save_cflags="$CFLAGS"
> +
> + CFLAGS=-mcx16
> + AC_MSG_CHECKING([whether CC supports -mcx16])
> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
> +   [AC_MSG_RESULT([yes])]
> +   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
> +   [AC_MSG_RESULT([no])]
> +   )
> + CFLAGS="$my_save_cflags"
> +  fi
>  fi
>
>  
> ##
> --
> 2.12.2
>
>