Re: [lng-odp] [API-NEXT PATCH 0/4] Clean up scheduler interface

2017-07-06 Thread Savolainen, Petri (Nokia - FI/Espoo)
This is the first step to clean up queue / scheduler dependencies. Could we 
merge this now and continue towards the next steps. Master and api-next should 
be synced soon otherwise the code base delta just increases for no real reason 
(API is the same).

-Petri

> -Original Message-
> From: Bill Fischofer [mailto:bill.fischo...@linaro.org]
> Sent: Friday, June 30, 2017 6:51 PM
> To: Petri Savolainen 
> Cc: lng-odp-forward 
> Subject: Re: [lng-odp] [API-NEXT PATCH 0/4] Clean up scheduler interface
> 
> For this series:
> 
> Reviewed-and-tested-by: Bill Fischofer 
> 
> On Fri, Jun 30, 2017 at 9:10 AM, Petri Savolainen
>  wrote:
> > First removed dependency to queue internals from scheduler interface.
> Then
> > removed almost all references to queue internals from default and iquery
> > schedulers. This required move of ordered queue data structure from
> queue to
> > scheduler files. The last references require queue / pktio interface
> change and
> > thus is left as the next step. Scheduler performance increased couple of
> > percents.
> >
> >
> > Petri Savolainen (4):
> >   linux-gen: sched: remove schedule interface depedency to qentry
> >   linux-gen: sched: use config max ordered locks
> >   linux-gen: sched: remove most dependecies to qentry
> >   linux-gen: sched: remove unused sched interface functions
> >
> >  .../linux-generic/include/odp_config_internal.h|   2 +-
> >  .../linux-generic/include/odp_queue_internal.h |   7 -
> >  platform/linux-generic/include/odp_schedule_if.h   |  13 +-
> >  platform/linux-generic/odp_queue.c |  68 +
> >  platform/linux-generic/odp_schedule.c  | 161 +-
> ---
> >  platform/linux-generic/odp_schedule_iquery.c   | 158 --
> --
> >  platform/linux-generic/odp_schedule_sp.c   |  18 +--
> >  7 files changed, 211 insertions(+), 216 deletions(-)
> >
> > --
> > 2.13.0
> >


Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove schedule interface depedency to qentry

2017-07-06 Thread Savolainen, Petri (Nokia - FI/Espoo)
> >>  typedef struct schedule_fn_t {
> >> +   int status_sync;
> >
> > this structure should contain functions that are provided by scheduler
> > to other components of ODP. 'status_sync' seems to be an internal
> > mechanism between the default scheduler and default queue. Hence it
> > should not be here.
> >
> Any update on this comment?

I did answer it already.


Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove schedule interface depedency to qentry

2017-07-06 Thread Savolainen, Petri (Nokia - FI/Espoo)


> -Original Message-
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@linaro.org]
> Sent: Thursday, July 06, 2017 11:07 PM
> To: Savolainen, Petri (Nokia - FI/Espoo) 
> Cc: lng-odp-forward 
> Subject: Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove
> schedule interface depedency to qentry
> 
> On 5 July 2017 at 01:31, Savolainen, Petri (Nokia - FI/Espoo)
>  wrote:
> >
> >
> >> -Original Message-
> >> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@linaro.org]
> >> Sent: Wednesday, July 05, 2017 7:04 AM
> >> To: Petri Savolainen 
> >> Cc: lng-odp-forward 
> >> Subject: Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove
> >> schedule interface depedency to qentry
> >>
> >> On 30 June 2017 at 09:10, Petri Savolainen
> 
> >> wrote:
> >> > Do not use queue internal type in schedule interface.
> >> >
> >> > Signed-off-by: Petri Savolainen 
> >> > ---
> >> >  platform/linux-generic/include/odp_schedule_if.h |  8 +++--
> >> >  platform/linux-generic/odp_queue.c   |  9 --
> >> >  platform/linux-generic/odp_schedule.c| 18 ---
> >> >  platform/linux-generic/odp_schedule_iquery.c | 41 +-
> ---
> >> ---
> >> >  platform/linux-generic/odp_schedule_sp.c | 18 +++
> >> >  5 files changed, 45 insertions(+), 49 deletions(-)
> >> >
> >> > diff --git a/platform/linux-generic/include/odp_schedule_if.h
> >> b/platform/linux-generic/include/odp_schedule_if.h
> >> > index 5877a1cd..5abbb732 100644
> >> > --- a/platform/linux-generic/include/odp_schedule_if.h
> >> > +++ b/platform/linux-generic/include/odp_schedule_if.h
> >> > @@ -35,9 +35,10 @@ typedef int (*schedule_term_local_fn_t)(void);
> >> >  typedef void (*schedule_order_lock_fn_t)(void);
> >> >  typedef void (*schedule_order_unlock_fn_t)(void);
> >> >  typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
> >> > -typedef void (*schedule_save_context_fn_t)(queue_entry_t *queue);
> >> > +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index,
> void
> >> *ptr);
> >> >
> >> >  typedef struct schedule_fn_t {
> >> > +   int status_sync;
> >>
> >> this structure should contain functions that are provided by scheduler
> >> to other components of ODP. 'status_sync' seems to be an internal
> >> mechanism between the default scheduler and default queue. Hence it
> >> should not be here.
> >
> > This flags if unsched_queue() and save_context() needs to be called.
> Those calls are only needed by iquery scheduler. With this flag, queue
> needs to check only single variable if those calls are needed or not.
> Today, these calls are made always, which hurt performance.
> >
> >>
> >> > schedule_pktio_start_fn_t   pktio_start;
> >> > schedule_thr_add_fn_t   thr_add;
> >> > schedule_thr_rem_fn_t   thr_rem;
> >> > @@ -45,7 +46,6 @@ typedef struct schedule_fn_t {
> >> > schedule_init_queue_fn_tinit_queue;
> >> > schedule_destroy_queue_fn_t destroy_queue;
> >> > schedule_sched_queue_fn_t   sched_queue;
> >> > -   schedule_unsched_queue_fn_t unsched_queue;
> >> these queue related functions are not used by other components within
> >> ODP. These are specific to default queue and default schedulers. These
> >> should not be part of this file.
> >
> > Didn't add or remove those functions in this patch set. This discussion
> can be done in context of another patch set.
> >
> Are you just cleaning up the scheduler and queue interface in this
> patch? If not this change can be taken up in this patch.

This patch set cleans odp_schedule_if.h interface, which currently defines 
input and output interfaces for the scheduler. This set does not redesign the 
interface but cleans and optimizes the usage. The main point is to remove type 
dependencies, functions and function calls that are not needed.

These functions above are needed only by iquery. This change removes empty 
function defines and extra calls when iquery is not used. One option to get 
rid-off these functions is to remove iquery if it's not developed anymore.

-Petri




Re: [lng-odp] [API-NEXT PATCH 2/4] linux-gen: sched: use config max ordered locks

2017-07-06 Thread Savolainen, Petri (Nokia - FI/Espoo)


> -Original Message-
> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@linaro.org]
> Sent: Thursday, July 06, 2017 11:00 PM
> To: Savolainen, Petri (Nokia - FI/Espoo) 
> Cc: lng-odp-forward 
> Subject: Re: [lng-odp] [API-NEXT PATCH 2/4] linux-gen: sched: use config
> max ordered locks
> 
> On 5 July 2017 at 01:35, Savolainen, Petri (Nokia - FI/Espoo)
>  wrote:
> >
> >> > diff --git a/platform/linux-generic/include/odp_config_internal.h
> >> b/platform/linux-generic/include/odp_config_internal.h
> >> > index 3cff0045..469396df 100644
> >> > --- a/platform/linux-generic/include/odp_config_internal.h
> >> > +++ b/platform/linux-generic/include/odp_config_internal.h
> >> > @@ -27,7 +27,7 @@
> >> >  /*
> >> >   * Maximum number of ordered locks per queue
> >> >   */
> >> > -#define CONFIG_QUEUE_MAX_ORD_LOCKS 4
> >> > +#define CONFIG_QUEUE_MAX_ORD_LOCKS 2
> >>
> >> This is unnecessary change for this patch. This patch does not need
> this
> >> change.
> >
> > With this value (2), the current situation does not change. Internal
> defines limited the number into 2, so this keeps it 2.
> 
> This change affects other implementations of the scheduler. If the
> default scheduler is implemented independent of what the value of
> CONFIG_QUEUE_MAX_ORD_LOCKS is, this change is not required.
> This change should not be necessary for this patch.

I try to keep properties as they were before the patch. I have not heard 
anybody complaining that 2 locks is not sufficient. Have you? We can later 
expand the value if needed. Your scheduler is not widely used yet (it's been in 
api-next a week or so), so people using this feature have not been exposed to 
number of locks being 4.

It was 2, I keep it 2 and we can increase it later if someone needs a larger 
value.

-Petri



[lng-odp] [PATCH API-NEXT v1 10/10] linux-gen: build: do not fail on __atomic_exchange_8 check

2017-07-06 Thread Github ODP bot
From: Maxim Uvarov 

checking whether -latomic is needed for 64-bit atomic built-ins... yes
checking for __atomic_exchange_8 in -latomic... no
configure: error: __atomic_exchange_8 is not available

Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 platform/linux-generic/m4/configure.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platform/linux-generic/m4/configure.m4 
b/platform/linux-generic/m4/configure.m4
index bd2ca88e..e0c4d983 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -58,7 +58,7 @@ AC_LINK_IFELSE(
AC_CHECK_LIB(
  [atomic], [__atomic_exchange_8],
  [use_libatomic=yes],
- [AC_MSG_FAILURE([__atomic_exchange_8 is not available])])
+ [AC_MSG_CHECKING([__atomic_exchange_8 is not available])])
   ])
 
 AC_MSG_CHECKING(whether -latomic is needed for 128-bit atomic built-ins)



[lng-odp] [PATCH API-NEXT v1 9/10] travis: pass proper path to make distcheck

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

On Travis CI gems are installed into user home directory. If make
distcheck is run under sudo, PATH will be reset and configure won't be
able to find asciidoctor. So let's pass full user's path  to make
distcheck.

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f0567e59..c0a08838 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -209,7 +209,7 @@ jobs:
   script:
   - ./bootstrap
   - ./configure --prefix=$HOME/odp-install 
--enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf 
--enable-user-guides --enable-test-perf-proc --enable-test-example
-  - sudo 
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
+  - sudo PATH="$PATH" 
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
 - stage: test
   env: TEST=doxygen
   compiler: gcc



[lng-odp] [PATCH API-NEXT v1 8/10] build: enable user guides during distcheck

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index fff1276a..76ceb851 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-test-cpp\
   --enable-test-perf   \
   --enable-test-perf-proc  \
   --enable-test-vald   \
+  --enable-user-guides \
   --with-testdir
 
 #@with_platform@ works alone in subdir but not as part of a path???



[lng-odp] [PATCH API-NEXT v1 7/10] doc: include sources of generated images into distribution

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/users-guide/Makefile.am | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index cce62e8d..55fe7e92 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -43,7 +43,13 @@ if HAVE_MSCGEN
 IMAGES += $(IMAGES_DIR)/resource_management.svg
 endif
 
-EXTRA_DIST = $(SRC) $(IMAGES)
+IMAGES_SRCS = \
+$(IMAGES_DIR)/pktio_fsm.gv \
+$(IMAGES_DIR)/resource_management.msc \
+$(IMAGES_DIR)/timeout_fsm.gv \
+$(IMAGES_DIR)/timer_fsm.gv
+
+EXTRA_DIST = $(SRC) $(IMAGES) $(IMAGES_SRCS)
 
 doc_DATA = $(TARGET)
 $(TARGET): $(SRC) $(IMAGES)



[lng-odp] [PATCH API-NEXT v1 6/10] doc: drop images full paths, we have imagesdir properly set

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/users-guide/users-guide-pktio.adoc | 14 +++---
 doc/users-guide/users-guide-tm.adoc|  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/users-guide/users-guide-pktio.adoc 
b/doc/users-guide/users-guide-pktio.adoc
index 9ca91f76..80a58d2f 100644
--- a/doc/users-guide/users-guide-pktio.adoc
+++ b/doc/users-guide/users-guide-pktio.adoc
@@ -10,7 +10,7 @@ PktIO objects are manipulated through various state 
transitions via
 `odp_pktio_xxx()` API calls as shown below:
 
 .ODP PktIO Finite State Machine
-image::../images/pktio_fsm.svg[align="center"]
+image::pktio_fsm.svg[align="center"]
 
 PktIOs begin in the *Unallocated* state. From here a call `odp_pktio_open()`
 is used to create an *odp_pktio_t* handle that is used in all subsequent calls
@@ -159,7 +159,7 @@ maximum flexibility to the data plane application writer.
 The processing of DIRECT input is shown below:
 
 .PktIO DIRECT Mode Receive Processing
-image::../images/pktin_direct_recv.svg[align="center"]
+image::pktin_direct_recv.svg[align="center"]
 
 In DIRECT mode, received packets are stored in one or more special PktIO queues
 of type *odp_pktin_queue_t* and are retrieved by threads calling the
@@ -376,7 +376,7 @@ to structure itself.
 A PktIO operating in DIRECT mode performs TX processing as shown here:
 
 .PktIO DIRECT Mode Transmit Processing
-image::../images/pktout_direct_send.svg[align="center"]
+image::pktout_direct_send.svg[align="center"]
 
 Direct TX processing operates similarly to Direct RX processing. Following
 open, the `odp_pktout_queue_config()` API is used to create and configure
@@ -501,7 +501,7 @@ QUEUE mode uses standard ODP event queues to service 
packets.
 The processing for QUEUE input processing is shown below:
 
 .PktIO QUEUE Mode Receive Processing
-image::../images/pktin_queue_recv.svg[align="center"]
+image::pktin_queue_recv.svg[align="center"]
 
 In QUEUE mode, received packets are stored in one or more standard ODP queues.
 The difference is that these queues are not created directly by the
@@ -550,7 +550,7 @@ with the PktIO.
 Transmit processing for PktIOs operating in QUEUE mode is shown below:
 
 .PktIO QUEUE Mode Transmit Processing
-image::../images/pktout_queue_send.svg[align="center]
+image::pktout_queue_send.svg[align="center]
 
 For TX processing QUEUE mode behaves similar to DIRECT mode except that
 output queues are regular ODP event queues that receive packets via
@@ -578,7 +578,7 @@ input queues created by a subsequent 
`odp_pktin_queue_config()` call are to
 be used as input to the *ODP Scheduler*.
 
 .PktIO SCHED Mode Receive Processing
-image::../images/pktin_sched_recv.svg[align="center']
+image::pktin_sched_recv.svg[align="center']
 
 For basic use, SCHED mode simply associates the PktIO input event queues
 created by `odp_pktin_queue_config()` with the scheduler. Hashing may still be
@@ -593,7 +593,7 @@ In its fullest form, PktIOs operating in SCHED mode use the 
*ODP Classifier*
 to permit fine-grained flow separation on *Class of Service (CoS)* boundaries.
 
 .PktIO SCHED Mode Receive Processing with Classification
-image::../images/pktin_sched_cls.svg[align="center"]
+image::pktin_sched_cls.svg[align="center"]
 
 In this mode of operation, the hash function of `odp_pktin_queue_config()` is
 typically not used. Instead, the event queues created by this call,
diff --git a/doc/users-guide/users-guide-tm.adoc 
b/doc/users-guide/users-guide-tm.adoc
index 36fa9ece..25129733 100644
--- a/doc/users-guide/users-guide-tm.adoc
+++ b/doc/users-guide/users-guide-tm.adoc
@@ -162,7 +162,7 @@ into one fan-in of a subsequent tm_node or egresss object - 
forming a proper
 tree.
 
 .Hierarchical Scheduling
-image::../images/tm_hierarchy.svg[align="center"]
+image::tm_hierarchy.svg[align="center"]
 
 Multi-level/hierarchical scheduling adds both great control and significant
 complexity.  Logically, despite the implication of the tm_node tree diagrams,
@@ -183,7 +183,7 @@ some very sophisticated behaviours. Each tm_node can 
contain a set of scheduler
 shaper and a WRED component - or a subset of these.
 
 .Traffic Manager Node
-image::../images/tm_node.svg[align="center"]
+image::tm_node.svg[align="center"]
 
 In its full generality an tm_node consists of a set of "fan-in" connections to
 preceding tm_queues or tm_nodes.  The fan-in for a single tm_node can range



[lng-odp] [PATCH API-NEXT v1 5/10] doc: fix user-guide.doc permissions

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/users-guide/users-guide.adoc | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 doc/users-guide/users-guide.adoc

diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc
old mode 100755
new mode 100644



[lng-odp] [PATCH API-NEXT v1 4/10] doc: use CLEANFILES instead of handcoding clean rules

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/implementers-guide/Makefile.am |  3 +--
 doc/process-guide/Makefile.am  | 15 ++-
 doc/users-guide/Makefile.am|  3 +--
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/doc/implementers-guide/Makefile.am 
b/doc/implementers-guide/Makefile.am
index 2d48d840..07ee141c 100644
--- a/doc/implementers-guide/Makefile.am
+++ b/doc/implementers-guide/Makefile.am
@@ -8,5 +8,4 @@ EXTRA_DIST = $(SRC)
 doc_DATA = $(TARGET)
 $(TARGET): $(SRC)
 
-clean-local:
-   rm -f  $(builddir)/$(TARGET)
+CLEANFILES = $(doc_DATA)
diff --git a/doc/process-guide/Makefile.am b/doc/process-guide/Makefile.am
index 6db7c867..5c2afb8c 100644
--- a/doc/process-guide/Makefile.am
+++ b/doc/process-guide/Makefile.am
@@ -13,19 +13,6 @@ EXTRA_DIST = bylaws-guide.adoc \
 $(top_srcdir)/CONTRIBUTING \
 $(IMAGES)
 
-all-local: bylaws-guide.html \
-  release-guide.html \
-  faq.html \
-  CONTRIBUTING.html \
-  CHANGELOG.html
-
-clean-local:
-   rm -f $(builddir)/bylaws-guide.html
-   rm -f $(builddir)/release-guide.html
-   rm -f $(builddir)/faq.html
-   rm -f $(builddir)/CONTRIBUTING.html
-   rm -f $(builddir)/CHANGELOG.html
-
 release-guide.html: release-guide.adoc \
$(IMAGES_DIR)/simple_release_git.svg \
$(IMAGES_DIR)/release_git.svg
@@ -45,3 +32,5 @@ CHANGELOG.html:  $(top_srcdir)/CHANGELOG
 #add deps on images
 
 doc_DATA = bylaws-guide.html release-guide.html CONTRIBUTING.html faq.html 
CHANGELOG.html
+
+CLEANFILES = $(doc_DATA)
diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index 871e2eab..cce62e8d 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -48,5 +48,4 @@ EXTRA_DIST = $(SRC) $(IMAGES)
 doc_DATA = $(TARGET)
 $(TARGET): $(SRC) $(IMAGES)
 
-clean-local:
-   rm -f $(builddir)/$(TARGET)
+CLEANFILES = $(doc_DATA)



[lng-odp] [PATCH API-NEXT v1 2/10] doc: add IMAGES_DIR instead of specifying full path to images

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/Makefile.inc  |  2 ++
 doc/process-guide/Makefile.am | 16 +--
 doc/users-guide/Makefile.am   | 62 +--
 3 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/doc/Makefile.inc b/doc/Makefile.inc
index 643b1d4e..4a1acf98 100644
--- a/doc/Makefile.inc
+++ b/doc/Makefile.inc
@@ -1,3 +1,5 @@
+IMAGES_DIR = $(top_srcdir)/doc/images
+
 VPATH=$(top_builddir)/doc/images
 
 .msc.svg:
diff --git a/doc/process-guide/Makefile.am b/doc/process-guide/Makefile.am
index 1abaf7e4..da8bb0ae 100644
--- a/doc/process-guide/Makefile.am
+++ b/doc/process-guide/Makefile.am
@@ -1,11 +1,11 @@
 include ../Makefile.inc
 
-IMAGES =   $(top_srcdir)/doc/images/aboutODP1.svg \
-  $(top_srcdir)/doc/images/aboutODP2.svg \
-  $(top_srcdir)/doc/images/aboutODP3.svg \
-  $(top_srcdir)/doc/images/packet_flow.svg \
-  $(top_srcdir)/doc/images/aboutODP5.svg \
-  $(top_srcdir)/doc/images/overview.svg
+IMAGES =   $(IMAGES_DIR)/aboutODP1.svg \
+  $(IMAGES_DIR)/aboutODP2.svg \
+  $(IMAGES_DIR)/aboutODP3.svg \
+  $(IMAGES_DIR)/packet_flow.svg \
+  $(IMAGES_DIR)/aboutODP5.svg \
+  $(IMAGES_DIR)/overview.svg
 
 EXTRA_DIST = $(top_srcdir)/doc/process-guide/bylaws-guide.adoc \
 $(top_srcdir)/doc/process-guide/release-guide.adoc \
@@ -27,8 +27,8 @@ clean-local:
rm -f $(builddir)/CHANGELOG.html
 
 release-guide.html: $(top_srcdir)/doc/process-guide/release-guide.adoc \
-   $(top_srcdir)/doc/images/simple_release_git.svg \
-   $(top_srcdir)/doc/images/release_git.svg
+   $(IMAGES_DIR)/simple_release_git.svg \
+   $(IMAGES_DIR)/release_git.svg
 
 bylaws-guide.html:  $(top_srcdir)/doc/process-guide/bylaws-guide.adoc
 
diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index 01b4df36..ae718268 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -8,39 +8,39 @@ SRC= $(top_srcdir)/doc/users-guide/users-guide.adoc \
 $(top_srcdir)/doc/users-guide/users-guide-timer.adoc \
 $(top_srcdir)/doc/users-guide/users-guide-tm.adoc
 TARGET = users-guide.html
-IMAGES = $(top_srcdir)/doc/images/overview.svg \
-$(top_srcdir)/doc/images/atomic_queue.svg \
-$(top_srcdir)/doc/images/odp_components.svg \
-$(top_srcdir)/doc/images/ODP-Logo-HQ.svg \
-$(top_srcdir)/doc/images/odp_rx_processing.svg \
-$(top_srcdir)/doc/images/odp_scheduling.svg \
-$(top_srcdir)/doc/images/odp_traffic_manager.svg \
-$(top_srcdir)/doc/images/ordered_queue.svg \
-$(top_srcdir)/doc/images/packet_flow.svg \
-$(top_srcdir)/doc/images/packet-adddata.svg \
-$(top_srcdir)/doc/images/packet-align.svg \
-$(top_srcdir)/doc/images/packet-copyops.svg \
-$(top_srcdir)/doc/images/packet-remdata.svg \
-$(top_srcdir)/doc/images/packet-split.svg \
-$(top_srcdir)/doc/images/packet.svg \
-$(top_srcdir)/doc/images/parallel_queue.svg \
-$(top_srcdir)/doc/images/pktin_direct_recv.svg \
-$(top_srcdir)/doc/images/pktin_queue_recv.svg \
-$(top_srcdir)/doc/images/pktin_sched_recv.svg \
-$(top_srcdir)/doc/images/pktio_fsm.svg \
-$(top_srcdir)/doc/images/pktout_direct_send.svg \
-$(top_srcdir)/doc/images/pktout_queue_send.svg \
-$(top_srcdir)/doc/images/release_git.svg \
-$(top_srcdir)/doc/images/segment.svg \
-$(top_srcdir)/doc/images/simple_release_git.svg \
-$(top_srcdir)/doc/images/timeout_fsm.svg \
-$(top_srcdir)/doc/images/timer_fsm.svg \
-$(top_srcdir)/doc/images/tm_hierarchy.svg \
-$(top_srcdir)/doc/images/tm_node.svg \
-$(top_srcdir)/doc/images/pktin_sched_cls.svg
+IMAGES = $(IMAGES_DIR)/overview.svg \
+$(IMAGES_DIR)/atomic_queue.svg \
+$(IMAGES_DIR)/odp_components.svg \
+$(IMAGES_DIR)/ODP-Logo-HQ.svg \
+$(IMAGES_DIR)/odp_rx_processing.svg \
+$(IMAGES_DIR)/odp_scheduling.svg \
+$(IMAGES_DIR)/odp_traffic_manager.svg \
+$(IMAGES_DIR)/ordered_queue.svg \
+$(IMAGES_DIR)/packet_flow.svg \
+$(IMAGES_DIR)/packet-adddata.svg \
+$(IMAGES_DIR)/packet-align.svg \
+$(IMAGES_DIR)/packet-copyops.svg \
+$(IMAGES_DIR)/packet-remdata.svg \
+$(IMAGES_DIR)/packet-split.svg \
+$(IMAGES_DIR)/packet.svg \
+$(IMAGES_DIR)/parallel_queue.svg \
+$(IMAGES_DIR)/pktin_direct_recv.svg \
+$

[lng-odp] [PATCH API-NEXT v1 3/10] doc: fix documentation building

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Set VPATH to just $(srcdir) so that make can locate adoc files itself.
Drop long paths starting from $(top_srcdir), which are unnecessary now.
Properly declare SUFFIXES used in documentation building (so that
automake can pass that to make to enable proper rules substitution).

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 doc/Makefile.am|  8 
 doc/Makefile.inc   |  4 +++-
 doc/implementers-guide/Makefile.am |  2 +-
 doc/process-guide/Makefile.am  | 12 ++--
 doc/users-guide/Makefile.am| 16 +++-
 5 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 59d6a6c6..c6124f46 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -9,7 +9,7 @@ SUBDIRS += implementers-guide users-guide process-guide
 endif
 
 EXTRA_DIST = \
-  $(top_srcdir)/doc/doxygenlayout.xml \
-  $(top_srcdir)/doc/odpdoxygen.css \
-  $(top_srcdir)/doc/glossary.adoc \
-  $(top_srcdir)/doc/Doxyfile_common
+  doxygenlayout.xml \
+  odpdoxygen.css \
+  glossary.adoc \
+  Doxyfile_common
diff --git a/doc/Makefile.inc b/doc/Makefile.inc
index 4a1acf98..23703127 100644
--- a/doc/Makefile.inc
+++ b/doc/Makefile.inc
@@ -1,6 +1,8 @@
 IMAGES_DIR = $(top_srcdir)/doc/images
 
-VPATH=$(top_builddir)/doc/images
+VPATH = $(srcdir)
+
+SUFFIXES = .svg .msc .gv .html .adoc
 
 .msc.svg:
mscgen -T svg -i $^ -o $@
diff --git a/doc/implementers-guide/Makefile.am 
b/doc/implementers-guide/Makefile.am
index 4bdb970e..2d48d840 100644
--- a/doc/implementers-guide/Makefile.am
+++ b/doc/implementers-guide/Makefile.am
@@ -1,6 +1,6 @@
 include ../Makefile.inc
 
-SRC= $(top_srcdir)/doc/implementers-guide/implementers-guide.adoc
+SRC= implementers-guide.adoc
 TARGET = implementers-guide.html
 
 EXTRA_DIST = $(SRC)
diff --git a/doc/process-guide/Makefile.am b/doc/process-guide/Makefile.am
index da8bb0ae..6db7c867 100644
--- a/doc/process-guide/Makefile.am
+++ b/doc/process-guide/Makefile.am
@@ -7,9 +7,9 @@ IMAGES =   $(IMAGES_DIR)/aboutODP1.svg \
   $(IMAGES_DIR)/aboutODP5.svg \
   $(IMAGES_DIR)/overview.svg
 
-EXTRA_DIST = $(top_srcdir)/doc/process-guide/bylaws-guide.adoc \
-$(top_srcdir)/doc/process-guide/release-guide.adoc \
-$(top_srcdir)/doc/process-guide/faq.adoc \
+EXTRA_DIST = bylaws-guide.adoc \
+release-guide.adoc \
+faq.adoc \
 $(top_srcdir)/CONTRIBUTING \
 $(IMAGES)
 
@@ -26,13 +26,13 @@ clean-local:
rm -f $(builddir)/CONTRIBUTING.html
rm -f $(builddir)/CHANGELOG.html
 
-release-guide.html: $(top_srcdir)/doc/process-guide/release-guide.adoc \
+release-guide.html: release-guide.adoc \
$(IMAGES_DIR)/simple_release_git.svg \
$(IMAGES_DIR)/release_git.svg
 
-bylaws-guide.html:  $(top_srcdir)/doc/process-guide/bylaws-guide.adoc
+bylaws-guide.html:  bylaws-guide.adoc
 
-faq.html:  $(top_srcdir)/doc/process-guide/faq.adoc \
+faq.html:  faq.adoc \
   $(IMAGES)
 
 #special case is not postfixed .adoc
diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index ae718268..871e2eab 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -1,12 +1,12 @@
 include ../Makefile.inc
 
-SRC= $(top_srcdir)/doc/users-guide/users-guide.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-cls.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-crypto.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-packet.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-pktio.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-timer.adoc \
-$(top_srcdir)/doc/users-guide/users-guide-tm.adoc
+SRC= users-guide.adoc \
+users-guide-cls.adoc \
+users-guide-crypto.adoc \
+users-guide-packet.adoc \
+users-guide-pktio.adoc \
+users-guide-timer.adoc \
+users-guide-tm.adoc
 TARGET = users-guide.html
 IMAGES = $(IMAGES_DIR)/overview.svg \
 $(IMAGES_DIR)/atomic_queue.svg \
@@ -50,5 +50,3 @@ $(TARGET): $(SRC) $(IMAGES)
 
 clean-local:
rm -f $(builddir)/$(TARGET)
-
-$(SRC): $(IMAGES)



[lng-odp] [PATCH API-NEXT v1 1/10] travis: add cross-compilation checks

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Include setup to cross-compile ODP for ARM hard float, ARM64 and PowerPC
targets.

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 
---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 .travis.yml | 100 +++-
 1 file changed, 86 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bae23600..f0567e59 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,12 +38,15 @@ addons:
 apt:
 sources:
 - ubuntu-toolchain-r-test
-- llvm-toolchain-precise-3.8
 packages:
 - gcc
 - clang-3.8
 - automake autoconf libtool libssl-dev graphviz mscgen 
doxygen
 - libpcap-dev
+- dpkg-cross equivs
+- gcc-aarch64-linux-gnu pkg-config-aarch64-linux-gnu 
libc6-dev-arm64-cross
+- gcc-arm-linux-gnueabihf 
pkg-config-arm-linux-gnueabihf libc6-dev-armhf-cross
+- gcc-powerpc-linux-gnu pkg-config-powerpc-linux-gnu 
libc6-dev-powerpc-cross
 #coverity_scan:
 #project:
 #name: "$TRAVIS_REPO_SLUG"
@@ -62,30 +65,35 @@ env:
 - CONF="--enable-schedule-sp"
 - CONF="--enable-schedule-iquery"
 
-install:
-- echo 1000 | sudo tee /proc/sys/vm/nr_hugepages
-- sudo mkdir -p /mnt/huge
-- sudo mount -t hugetlbfs nodev /mnt/huge
-
-- sudo apt-get -qq update
-- sudo apt-get install linux-headers-`uname -r`
-- sudo pip install coverage
-- gem install asciidoctor
-- PATH=${PATH//:\.\/node_modules\/\.bin/}
-
+before_install:
 #   Install cunit for the validation tests because distro version is too 
old and fails C99 compile
 - sudo apt-get remove libcunit1-dev libcunit1
 - export CUNIT_VERSION=2.1-3
 - curl -sSOL 
https://github.com/Linaro/libcunit/releases/download/${CUNIT_VERSION}/CUnit-${CUNIT_VERSION}.tar.bz2
 - tar -jxf *.bz2
 - pushd CUnit*
-- ./bootstrap
-- ./configure --enable-debug --enable-automated --enable-basic 
--enable-console --enable-examples --enable-test
+- libtoolize --force --copy
+- aclocal
+- autoheader
+- automake --add-missing --include-deps --copy
+- autoconf
+- ./configure --enable-debug --enable-automated --enable-basic 
--enable-console --enable-examples --enable-test $CROSS || cat config.log
 - make
 - sudo make install
 - popd
 - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
 
+install:
+- echo 1000 | sudo tee /proc/sys/vm/nr_hugepages
+- sudo mkdir -p /mnt/huge
+- sudo mount -t hugetlbfs nodev /mnt/huge
+
+- sudo apt-get -qq update
+- sudo apt-get install linux-headers-`uname -r`
+- sudo pip install coverage
+- gem install asciidoctor
+- PATH=${PATH//:\.\/node_modules\/\.bin/}
+
 #  DPDK pktio
 - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
 - git -c advice.detachedHead=false clone -q --depth=1 --single-branch 
--branch=v17.02 http://dpdk.org/git/dpdk dpdk
@@ -125,6 +133,69 @@ script:
 jobs:
 include:
 - stage: test
+  compiler: aarch64-linux-gnu-gcc
+  env: TEST="aarch64-linux-gnu" 
CROSS="--host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu"
+  install: true
+  script:
+  - mkdir cross
+  - pushd cross
+# one can not include colon in the command or bad 
things will happen, so mimic it
+  - env echo -e 'Provides\x3a multiarch-support, 
debconf, debconf-2.0' > dummy
+  - equivs-build -a arm64 dummy
+  - wget
+
http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_arm64.deb
+
http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_arm64.deb
+
http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_arm64.deb
+
http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_arm64.deb
+  - sudo dpkg-cross -i -M -A -a arm64 *.deb
+  - popd
+  - ./bootstrap
+  - ./configure --prefix=$HOME/odp-install $CROSS
+--disable-test-cpp

[lng-odp] [PATCH API-NEXT v1 0/10] merge master to api-next

2017-07-06 Thread Github ODP bot
Sending merge request to check if Travis will pass. Something strange happens 
with Travis after that merge. There is no difference in configure.ac or travis 
settings but build fails to configure with all external toolchains: 
https://travis-ci.org/muvarov/odp/builds/250652639 I hope it will be better 
with pool request due to on my repo debugging is turned on.

github
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 138 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 102 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 77 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 36 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
ERROR: Does not appear to be a unified-diff format patch

total: 1 errors, 0 warnings, 0 checks, 0 lines checked


to_send-p-004.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 72 lines checked


to_send-p-005.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 14 lines checked


to_send-p-006.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 7 lines checked


to_send-p-007.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-008.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-009.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


Re: [lng-odp] [PATCH 7/7] linux-gen: dpdk: enable zero-copy operation

2017-07-06 Thread Maxim Uvarov
On 07/03/17 15:01, Matias Elo wrote:
> +zero_copy=0
> +AC_ARG_ENABLE([dpdk-zero-copy],
> +[  --enable-dpdk-zero-copy  enable experimental zero-copy DPDK pktio 
> mode],
> +[if test x$enableval = xyes; then
> +zero_copy=1
> +fi])
> +

please add corresponding check to his to .travis.yaml

Maxim.


Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove schedule interface depedency to qentry

2017-07-06 Thread Honnappa Nagarahalli
On 4 July 2017 at 23:04, Honnappa Nagarahalli
 wrote:
> On 30 June 2017 at 09:10, Petri Savolainen  
> wrote:
>> Do not use queue internal type in schedule interface.
>>
>> Signed-off-by: Petri Savolainen 
>> ---
>>  platform/linux-generic/include/odp_schedule_if.h |  8 +++--
>>  platform/linux-generic/odp_queue.c   |  9 --
>>  platform/linux-generic/odp_schedule.c| 18 ---
>>  platform/linux-generic/odp_schedule_iquery.c | 41 
>> +---
>>  platform/linux-generic/odp_schedule_sp.c | 18 +++
>>  5 files changed, 45 insertions(+), 49 deletions(-)
>>
>> diff --git a/platform/linux-generic/include/odp_schedule_if.h 
>> b/platform/linux-generic/include/odp_schedule_if.h
>> index 5877a1cd..5abbb732 100644
>> --- a/platform/linux-generic/include/odp_schedule_if.h
>> +++ b/platform/linux-generic/include/odp_schedule_if.h
>> @@ -35,9 +35,10 @@ typedef int (*schedule_term_local_fn_t)(void);
>>  typedef void (*schedule_order_lock_fn_t)(void);
>>  typedef void (*schedule_order_unlock_fn_t)(void);
>>  typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
>> -typedef void (*schedule_save_context_fn_t)(queue_entry_t *queue);
>> +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index, void *ptr);
>>
>>  typedef struct schedule_fn_t {
>> +   int status_sync;
>
> this structure should contain functions that are provided by scheduler
> to other components of ODP. 'status_sync' seems to be an internal
> mechanism between the default scheduler and default queue. Hence it
> should not be here.
>
Any update on this comment?

>> schedule_pktio_start_fn_t   pktio_start;
>> schedule_thr_add_fn_t   thr_add;
>> schedule_thr_rem_fn_t   thr_rem;
>> @@ -45,7 +46,6 @@ typedef struct schedule_fn_t {
>> schedule_init_queue_fn_tinit_queue;
>> schedule_destroy_queue_fn_t destroy_queue;
>> schedule_sched_queue_fn_t   sched_queue;
>> -   schedule_unsched_queue_fn_t unsched_queue;
> these queue related functions are not used by other components within
> ODP. These are specific to default queue and default schedulers. These
> should not be part of this file.
>
>> schedule_ord_enq_multi_fn_t ord_enq_multi;
>> schedule_init_global_fn_t   init_global;
>> schedule_term_global_fn_t   term_global;
>> @@ -54,7 +54,11 @@ typedef struct schedule_fn_t {
>> schedule_order_lock_fn_torder_lock;
>> schedule_order_unlock_fn_t  order_unlock;
>> schedule_max_ordered_locks_fn_t max_ordered_locks;
>> +
>> +   /* Called only when status_sync is set */
>> +   schedule_unsched_queue_fn_t unsched_queue;
>> schedule_save_context_fn_t  save_context;
>> +
>>  } schedule_fn_t;
>>
>>  /* Interface towards the scheduler */
>> diff --git a/platform/linux-generic/odp_queue.c 
>> b/platform/linux-generic/odp_queue.c
>> index 19945584..2db95fc6 100644
>> --- a/platform/linux-generic/odp_queue.c
>> +++ b/platform/linux-generic/odp_queue.c
>> @@ -474,6 +474,7 @@ static inline int deq_multi(queue_t q_int, 
>> odp_buffer_hdr_t *buf_hdr[],
>> int i, j;
>> queue_entry_t *queue;
>> int updated = 0;
>> +   int status_sync = sched_fn->status_sync;
>>
>> queue = qentry_from_int(q_int);
>> LOCK(&queue->s.lock);
>> @@ -490,7 +491,9 @@ static inline int deq_multi(queue_t q_int, 
>> odp_buffer_hdr_t *buf_hdr[],
>> /* Already empty queue */
>> if (queue->s.status == QUEUE_STATUS_SCHED) {
>> queue->s.status = QUEUE_STATUS_NOTSCHED;
>> -   sched_fn->unsched_queue(queue->s.index);
>> +
>> +   if (status_sync)
>> +   sched_fn->unsched_queue(queue->s.index);
>> }
>>
>> UNLOCK(&queue->s.lock);
>> @@ -533,8 +536,8 @@ static inline int deq_multi(queue_t q_int, 
>> odp_buffer_hdr_t *buf_hdr[],
>> if (hdr == NULL)
>> queue->s.tail = NULL;
>>
>> -   if (queue->s.type == ODP_QUEUE_TYPE_SCHED)
>> -   sched_fn->save_context(queue);
>> +   if (status_sync && queue->s.type == ODP_QUEUE_TYPE_SCHED)
>> +   sched_fn->save_context(queue->s.index, queue);
>>
>> UNLOCK(&queue->s.lock);
>>
>> diff --git a/platform/linux-generic/odp_schedule.c 
>> b/platform/linux-generic/odp_schedule.c
>> index 814746c7..69de7ac0 100644
>> --- a/platform/linux-generic/odp_schedule.c
>> +++ b/platform/linux-generic/odp_schedule.c
>> @@ -22,9 +22,11 @@
>>  #include 
>>  #include 
>>  #include 
>> -#include 
>>  #include 
>>
>> +/* Should remove this dependency */
>> +#include 
>> +
>>  /* Number of priority levels  */
>>  #define NUM_PRIO 8
>>
>> @@ -1340,22 +1342,14 @@ static int schedule_sched_queue(uint32_t queue_index)
>> return 0;
>>  }
>>
>> -static int schedule_unsched_queue(uint32_t queue_index ODP_UNUSED)
>> -{
>> -

Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove schedule interface depedency to qentry

2017-07-06 Thread Honnappa Nagarahalli
On 5 July 2017 at 01:31, Savolainen, Petri (Nokia - FI/Espoo)
 wrote:
>
>
>> -Original Message-
>> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@linaro.org]
>> Sent: Wednesday, July 05, 2017 7:04 AM
>> To: Petri Savolainen 
>> Cc: lng-odp-forward 
>> Subject: Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove
>> schedule interface depedency to qentry
>>
>> On 30 June 2017 at 09:10, Petri Savolainen 
>> wrote:
>> > Do not use queue internal type in schedule interface.
>> >
>> > Signed-off-by: Petri Savolainen 
>> > ---
>> >  platform/linux-generic/include/odp_schedule_if.h |  8 +++--
>> >  platform/linux-generic/odp_queue.c   |  9 --
>> >  platform/linux-generic/odp_schedule.c| 18 ---
>> >  platform/linux-generic/odp_schedule_iquery.c | 41 +
>> ---
>> >  platform/linux-generic/odp_schedule_sp.c | 18 +++
>> >  5 files changed, 45 insertions(+), 49 deletions(-)
>> >
>> > diff --git a/platform/linux-generic/include/odp_schedule_if.h
>> b/platform/linux-generic/include/odp_schedule_if.h
>> > index 5877a1cd..5abbb732 100644
>> > --- a/platform/linux-generic/include/odp_schedule_if.h
>> > +++ b/platform/linux-generic/include/odp_schedule_if.h
>> > @@ -35,9 +35,10 @@ typedef int (*schedule_term_local_fn_t)(void);
>> >  typedef void (*schedule_order_lock_fn_t)(void);
>> >  typedef void (*schedule_order_unlock_fn_t)(void);
>> >  typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
>> > -typedef void (*schedule_save_context_fn_t)(queue_entry_t *queue);
>> > +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index, void
>> *ptr);
>> >
>> >  typedef struct schedule_fn_t {
>> > +   int status_sync;
>>
>> this structure should contain functions that are provided by scheduler
>> to other components of ODP. 'status_sync' seems to be an internal
>> mechanism between the default scheduler and default queue. Hence it
>> should not be here.
>
> This flags if unsched_queue() and save_context() needs to be called. Those 
> calls are only needed by iquery scheduler. With this flag, queue needs to 
> check only single variable if those calls are needed or not. Today, these 
> calls are made always, which hurt performance.
>
>>
>> > schedule_pktio_start_fn_t   pktio_start;
>> > schedule_thr_add_fn_t   thr_add;
>> > schedule_thr_rem_fn_t   thr_rem;
>> > @@ -45,7 +46,6 @@ typedef struct schedule_fn_t {
>> > schedule_init_queue_fn_tinit_queue;
>> > schedule_destroy_queue_fn_t destroy_queue;
>> > schedule_sched_queue_fn_t   sched_queue;
>> > -   schedule_unsched_queue_fn_t unsched_queue;
>> these queue related functions are not used by other components within
>> ODP. These are specific to default queue and default schedulers. These
>> should not be part of this file.
>
> Didn't add or remove those functions in this patch set. This discussion can 
> be done in context of another patch set.
>
Are you just cleaning up the scheduler and queue interface in this
patch? If not this change can be taken up in this patch.

> -Petri
>
>>
>> > schedule_ord_enq_multi_fn_t ord_enq_multi;
>> > schedule_init_global_fn_t   init_global;
>> > schedule_term_global_fn_t   term_global;
>> > @@ -54,7 +54,11 @@ typedef struct schedule_fn_t {
>> > schedule_order_lock_fn_torder_lock;
>> > schedule_order_unlock_fn_t  order_unlock;
>> > schedule_max_ordered_locks_fn_t max_ordered_locks;
>> > +
>> > +   /* Called only when status_sync is set */
>> > +   schedule_unsched_queue_fn_t unsched_queue;
>> > schedule_save_context_fn_t  save_context;
>> > +
>> >  } schedule_fn_t;


Re: [lng-odp] [API-NEXT PATCH 2/4] linux-gen: sched: use config max ordered locks

2017-07-06 Thread Honnappa Nagarahalli
On 5 July 2017 at 01:35, Savolainen, Petri (Nokia - FI/Espoo)
 wrote:
>
>> > diff --git a/platform/linux-generic/include/odp_config_internal.h
>> b/platform/linux-generic/include/odp_config_internal.h
>> > index 3cff0045..469396df 100644
>> > --- a/platform/linux-generic/include/odp_config_internal.h
>> > +++ b/platform/linux-generic/include/odp_config_internal.h
>> > @@ -27,7 +27,7 @@
>> >  /*
>> >   * Maximum number of ordered locks per queue
>> >   */
>> > -#define CONFIG_QUEUE_MAX_ORD_LOCKS 4
>> > +#define CONFIG_QUEUE_MAX_ORD_LOCKS 2
>>
>> This is unnecessary change for this patch. This patch does not need this
>> change.
>
> With this value (2), the current situation does not change. Internal defines 
> limited the number into 2, so this keeps it 2.

This change affects other implementations of the scheduler. If the
default scheduler is implemented independent of what the value of
CONFIG_QUEUE_MAX_ORD_LOCKS is, this change is not required.
This change should not be necessary for this patch.

>
> -Petri


[lng-odp] [PATCH API-NEXT v2 1/2] linux-generic: events subtype implementation

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 68 (lumag:packet-loop)
 ** https://github.com/Linaro/odp/pull/68
 ** Patch: https://github.com/Linaro/odp/pull/68.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: f522519bc003a772aeb56d2792e9c166894e5081
 **/
 platform/linux-generic/include/odp_buffer_inlines.h  |  2 ++
 platform/linux-generic/include/odp_buffer_internal.h |  3 +++
 platform/linux-generic/odp_crypto.c  | 15 +--
 platform/linux-generic/odp_event.c   | 15 +++
 platform/linux-generic/odp_packet.c  |  1 +
 platform/linux-generic/odp_pool.c| 11 +++
 6 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/platform/linux-generic/include/odp_buffer_inlines.h 
b/platform/linux-generic/include/odp_buffer_inlines.h
index cf817d90..4c0e7339 100644
--- a/platform/linux-generic/include/odp_buffer_inlines.h
+++ b/platform/linux-generic/include/odp_buffer_inlines.h
@@ -21,6 +21,8 @@ extern "C" {
 
 odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf);
 void _odp_buffer_event_type_set(odp_buffer_t buf, int ev);
+odp_event_subtype_t _odp_buffer_event_subtype(odp_buffer_t buf);
+void _odp_buffer_event_subtype_set(odp_buffer_t buf, int ev);
 int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t buf);
 
 static inline odp_buffer_t odp_hdr_to_buf(odp_buffer_hdr_t *hdr)
diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b/platform/linux-generic/include/odp_buffer_internal.h
index 076abe96..dadf285e 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -96,6 +96,9 @@ struct odp_buffer_hdr_t {
/* Event type. Maybe different than pool type (crypto compl event) */
int8_tevent_type;
 
+   /* Event subtype. Should be ODP_EVENT_NO_SUBTYPE except packets. */
+   int8_tevent_subtype;
+
/* Burst table */
struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE];
 
diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 68fc5658..0e2adad1 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -907,12 +907,13 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
if (ODP_QUEUE_INVALID != session->p.compl_queue) {
odp_event_t completion_event;
odp_crypto_generic_op_result_t *op_result;
+   odp_buffer_t buf;
 
/* Linux generic will always use packet for completion event */
completion_event = odp_packet_to_event(param->out_pkt);
-   _odp_buffer_event_type_set(
-   odp_buffer_from_event(completion_event),
-   ODP_EVENT_CRYPTO_COMPL);
+   buf = odp_buffer_from_event(completion_event);
+   _odp_buffer_event_type_set(buf, ODP_EVENT_CRYPTO_COMPL);
+   _odp_buffer_event_subtype_set(buf, ODP_EVENT_NO_SUBTYPE);
/* Asynchronous, build result (no HW so no errors) and send it*/
op_result = get_op_result_from_event(completion_event);
op_result->magic = OP_RESULT_MAGIC;
@@ -1106,9 +1107,11 @@ odp_crypto_compl_result(odp_crypto_compl_t 
completion_event,
 void
 odp_crypto_compl_free(odp_crypto_compl_t completion_event)
 {
-   _odp_buffer_event_type_set(
-   odp_buffer_from_event((odp_event_t)completion_event),
-   ODP_EVENT_PACKET);
+   odp_buffer_t buf =
+   odp_buffer_from_event((odp_event_t)completion_event);
+
+   _odp_buffer_event_type_set(buf, ODP_EVENT_PACKET);
+   _odp_buffer_event_subtype_set(buf, ODP_EVENT_PACKET_BASIC);
 }
 
 void odp_crypto_session_param_init(odp_crypto_session_param_t *param)
diff --git a/platform/linux-generic/odp_event.c 
b/platform/linux-generic/odp_event.c
index d71f4464..23b410d8 100644
--- a/platform/linux-generic/odp_event.c
+++ b/platform/linux-generic/odp_event.c
@@ -19,6 +19,21 @@ odp_event_type_t odp_event_type(odp_event_t event)
return _odp_buffer_event_type(odp_buffer_from_event(event));
 }
 
+odp_event_subtype_t odp_event_subtype(odp_event_t event)
+{
+   return _odp_buffer_event_subtype(odp_buffer_from_event(event));
+}
+
+odp_event_type_t odp_event_types(odp_event_t event,
+odp_event_subtype_t *subtype)
+{
+   odp_buffer_t buf = odp_buffer_from_event(event);
+
+   *subtype = _odp_buffer_event_subtype(buf);
+
+   return _odp_buffer_event_type(buf);
+}
+
 void odp_event_free(odp_event_t event)
 {
switch (odp_event_type(event)) {
diff --git a/platform/linux-generic/odp_packet.c 
b/platform/linux-generic/odp_packet.c
index eb66af2d..3789feca 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -268,6 +268,7 @@ static i

[lng-odp] [PATCH API-NEXT v2 2/2] linux-gen: pktio: loop: reset packet subtype on loopback

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

loop interface can get any kind of packets, but should output only basic
packets. Reset packet subtype on loopback.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 68 (lumag:packet-loop)
 ** https://github.com/Linaro/odp/pull/68
 ** Patch: https://github.com/Linaro/odp/pull/68.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: f522519bc003a772aeb56d2792e9c166894e5081
 **/
 platform/linux-generic/pktio/loop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/platform/linux-generic/pktio/loop.c 
b/platform/linux-generic/pktio/loop.c
index c825393a..b1d311fa 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -165,6 +165,8 @@ static int loopback_send(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
 
for (i = 0; i < len; ++i) {
hdr_tbl[i] = packet_to_buf_hdr(pkt_tbl[i]);
+   _odp_buffer_event_subtype_set(hdr_tbl[i]->handle.handle,
+ ODP_EVENT_PACKET_BASIC);
bytes += odp_packet_len(pkt_tbl[i]);
}
 



[lng-odp] [PATCH API-NEXT v2 0/2] linux-gen: pktio: loop: reset packet subtype on loopback

2017-07-06 Thread Github ODP bot
loop interface can get any kind of packets, but should output only basic
packets. Reset packet subtype on loopback.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 68 (lumag:packet-loop)
 ** https://github.com/Linaro/odp/pull/68
 ** Patch: https://github.com/Linaro/odp/pull/68.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: f522519bc003a772aeb56d2792e9c166894e5081
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 98 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


Re: [lng-odp] [PATCH v4 3/9] linux-gen: stop poisoning CPPFLAGS/LDFLAGS with DPDK flags

2017-07-06 Thread Maxim Uvarov
Petri, are you ok with that serries? Patch 9/9 is the major goal for odp
packaging.

p.s. as for me I don't have objections to merge it.

Maxim.

On 4 July 2017 at 23:07, Dmitry Eremin-Solenikov <
dmitry.ereminsoleni...@linaro.org> wrote:

> On 04.07.2017 16:43, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> >
> >
> >> -Original Message-
> >> From: Dmitry Eremin-Solenikov [mailto:dmitry.ereminsoleni...@linaro.org
> ]
> >> Sent: Tuesday, July 04, 2017 3:16 PM
> >> To: Savolainen, Petri (Nokia - FI/Espoo) ;
> >> Github ODP bot ; lng-odp@lists.linaro.org
> >> Subject: Re: [lng-odp] [PATCH v4 3/9] linux-gen: stop poisoning
> >> CPPFLAGS/LDFLAGS with DPDK flags
> >>
> >> On 03.07.2017 13:34, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>  diff --git a/test/Makefile.inc b/test/Makefile.inc
>  index 1ef2a92c..bf31b374 100644
>  --- a/test/Makefile.inc
>  +++ b/test/Makefile.inc
>  @@ -4,7 +4,7 @@ LIB   = $(top_builddir)/lib
>   #in the following line, the libs using the symbols should come before
>   #the libs containing them! The includer is given a chance to add
> >> things
>   #before libodp by setting PRE_LDADD before the inclusion.
>  -LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
>  +LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
>  $(DPDK_PMDS)
> >>>
> >>> Application using ODP should only need to add dependency to ODP and
> >> helper libs. It's not scalable if (all) applications need to know which
> >> (all) libs an ODP implementation may use internally.
> >>>
> >>> I guess this solves some DPDK linking issues, but is there a way to
> >> avoid explicit dependency to ODP lib internals ?
> >>
> >> Just to rephrase/emphasize my answer: user applications will use
> >> pkg-config file, which contains all necessary data to link with DPDK w/o
> >> mentioning it specifically. The only issue is internal linking inside
> >> ODP or linking using libtool.
> >>
> >
> > In principle, our example/validation apps should see ODP the same way as
> any other app. That's why it seems odd that DPDK libs need to be exposed
> when linking those (or are those needed because of the test/linux-generic
> folder).
> >
> > My main concern is that external applications (like OFP) would need to
> add the same modification to their linking rules. That seems not to be the
> case, so I guess it's OK then.
>
> I understand that. In fact, my major concern when starting this PR was
> exactly linking of external apps. Check patch 9/9, which makes shure
> that one can use pkg-config to link ODP app instead of specifying all
> dependencies.
>
> --
> With best wishes
> Dmitry
>


[lng-odp] [Linaro/odp] 8ae637: linux-gen: pktio: ipc fix send return code on tx

2017-07-06 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 8ae6373c8844408ad080b58fb3083b30e8dc7ea6
  
https://github.com/Linaro/odp/commit/8ae6373c8844408ad080b58fb3083b30e8dc7ea6
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

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

  Log Message:
  ---
  linux-gen: pktio: ipc fix send return code on tx

Return number on sent packets, but not succesuful return
code.

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


  Commit: 933fd66f5b7230a00ee0ef7acde5cc1c9af63b45
  
https://github.com/Linaro/odp/commit/933fd66f5b7230a00ee0ef7acde5cc1c9af63b45
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

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

  Log Message:
  ---
  linux-gen: pktio: ipc fix error check

Code clean up, break before entering to for loop.

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


  Commit: c50d47bd420c675552dd0b82638a073b67b2ae4f
  
https://github.com/Linaro/odp/commit/c50d47bd420c675552dd0b82638a073b67b2ae4f
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

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

  Log Message:
  ---
  linux-gen: pktio: ipc: rx: push back not processed packets

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


  Commit: 6e594990575df83dcbb70f5f86ad52f7c5a0f96d
  
https://github.com/Linaro/odp/commit/6e594990575df83dcbb70f5f86ad52f7c5a0f96d
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

  Changed paths:
M platform/linux-generic/include/odp_packet_io_ipc_internal.h
M platform/linux-generic/pktio/ipc.c

  Log Message:
  ---
  linux-gen: ipc remove base_addr_offset

base_addr_offset is not used in this version, remove it.

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


  Commit: d5d52b65d262698694a5fab0b3d9bd12fa4a6460
  
https://github.com/Linaro/odp/commit/d5d52b65d262698694a5fab0b3d9bd12fa4a6460
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

  Changed paths:
M platform/linux-generic/_fdserver.c
M platform/linux-generic/_ishm.c
M platform/linux-generic/odp_init.c

  Log Message:
  ---
  linux-gen: shm: use shm in /dev/shm instead of /tmp

/tmp might be mounted to tmpfs or not mounted. If it's
disk then some writes are loss there. At least ipc test
shows missing packets in shm ring on 4.10.0-rc8+ kernel.
Which is more likely kernel bug.

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


  Commit: b2b516c03ae6eb57e0055c98b33e946e9529f215
  
https://github.com/Linaro/odp/commit/b2b516c03ae6eb57e0055c98b33e946e9529f215
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

  Changed paths:
M platform/linux-generic/_fdserver.c
M platform/linux-generic/_ishm.c
M platform/linux-generic/include/odp_internal.h
M platform/linux-generic/odp_init.c
M test/linux-generic/validation/api/shmem/shmem_common.h
M test/linux-generic/validation/api/shmem/shmem_linux.c
M test/linux-generic/validation/api/shmem/shmem_odp1.c

  Log Message:
  ---
  linux-gen: shm: add uid to shm files

new processes can get some earliar pid numbers which
processes can be already dead. Because of previous process
can be from other user it can have different access right
to that file. To avoid that place shm files to
/dev/shm/uid/odp- files

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


  Commit: 2541e8688750f2a045aff3dbf544868be3ebf787
  
https://github.com/Linaro/odp/commit/2541e8688750f2a045aff3dbf544868be3ebf787
  Author: Maxim Uvarov 
  Date:   2017-07-06 (Thu, 06 Jul 2017)

  Changed paths:
M platform/linux-generic/_ishm.c
M platform/linux-generic/include/_ishm_internal.h
M platform/linux-generic/include/odp_internal.h
M platform/linux-generic/odp_init.c
M test/linux-generic/validation/api/shmem/shmem_common.h
M test/linux-generic/validation/api/shmem/shmem_linux.c
M test/linux-generic/validation/api/shmem/shmem_odp1.c
M test/linux-generic/validation/api/shmem/shmem_odp2.c

  Log Message:
  ---
  linux-gen: shm: user can define place for shm files

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


Compare: https://github.com/Linaro/odp/compare/96b36df87f23...2541e8688750


[lng-odp] [Bug 3026] pktio_ipc_run test can fail due to segfault

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3026

--- Comment #2 from Bill Fischofer  ---
Have verified that recent patch https://github.com/Linaro/odp/pull/67 does not
address this IPC issue.

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

[lng-odp] [Bug 3078] performance degradation after timer implementation change

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3078

Bill Fischofer  changed:

   What|Removed |Added

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

--- Comment #1 from Bill Fischofer  ---
Brian, can you update status on this bug? Thanks.

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

[lng-odp] [Bug 2857] Bus error on not enough hdd space (Ubuntu VM, aarch64)

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2857

--- Comment #5 from Bill Fischofer  ---
Maxim, does https://github.com/Linaro/odp/pull/67 resolve this issue?

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

[lng-odp] [Bug 2995] compile from valid install failed

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2995

Bill Fischofer  changed:

   What|Removed |Added

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

--- Comment #3 from Bill Fischofer  ---
Merged commit ID 497c339f94e35d5fadeff539cebfbf44d698dc7e et al.

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

[lng-odp] [Bug 3091] Compilation failure of monarch_lts branch in Debian 9

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3091

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |IN_PROGRESS
 Ever confirmed|0   |1
 CC||bill.fischo...@linaro.org

--- Comment #5 from Bill Fischofer  ---
Will keep this bug open until Monarch_LTS service release is issued.

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

[lng-odp] [Bug 3039] Socket pktio recv fails on large number of packet

2017-07-06 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3039

--- Comment #7 from Bill Fischofer  ---
LNG-SC has approved the issuance of Monarch_LTS service patch. Will keep this
bug open until that is issued.

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

Re: [lng-odp] [PATCH 7/7] linux-gen: dpdk: enable zero-copy operation

2017-07-06 Thread Bill Fischofer
On Thu, Jul 6, 2017 at 2:26 AM, Elo, Matias (Nokia - FI/Espoo)
 wrote:
>
>> On 6 Jul 2017, at 6:56, Honnappa Nagarahalli 
>>  wrote:
>>
>> On 3 July 2017 at 07:01, Matias Elo  wrote:
>>> Implements experimental zero-copy mode for DPDK pktio. This can be enabled
>>> with additional '--enable-dpdk-zero-copy' configure flag.
>>>
>>> This feature has been put behind an extra configure flag as it doesn't
>>> entirely adhere to the DPDK API and may behave unexpectedly with untested
>>> DPDK NIC drivers. Zero-copy operation has been tested with pcap, ixgbe, and
>>> i40e drivers.
>>>
>>
>> Can you elaborate more on this? Which parts do not adhere to DPDK APIs?
>>
>
> Sure, DPDK documentation states that after calling rte_mempool_create_empty() 
> the
> user should call rte_mempool_populate_*() to add memory chunks to the pool. 
> These
> functions either allocate the required memory or take a contiguous memory 
> block as
> argument. This memory block is then divided  into DPDK memory elements. This 
> doesn't
> work when we want to pass individual standard ODP packets to DPDK. So I simply
> never call the populate functions. This is the part not adhering to the DPDK 
> API.
>
> In the zero-copy patch DPDK mempool operations are mapped to custom functions
> (pool_enqueue(), pool_dequeue_bulk()...) which interface directly with the 
> ODP packet
> pool, so the DPDK mempool doesn't actually require the memory chunks 
> suggested by
> the populate functions.

And that's exactly what we want, so thanks Matias, for validating that
this works. We do not want DPDK to be doing any memory management at
all, simply allocating and freeing packets from ODP (which means
whatever platform-native allocator is being used). DPDK PMDs only
needs to deal with individual odp_packet_t objects.

>
>
> -Matias
>
>
>
>
>
>
>


[lng-odp] [PATCH API-NEXT v1 3/3] test: validation: add IPsec API testsuite

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add several basic tests for IPsec API.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 7b101c6937865f27f10cc58285092a6cab015e2f
 **/
 test/common_plat/validation/api/ipsec/Makefile.am  |   5 +-
 test/common_plat/validation/api/ipsec/ipsec.c  | 725 +++-
 test/common_plat/validation/api/ipsec/ipsec.h  |  67 +-
 .../validation/api/ipsec/ipsec_test_in.c   | 737 +
 .../validation/api/ipsec/ipsec_test_out.c  | 347 ++
 .../validation/api/ipsec/test_vectors.h| 696 +++
 6 files changed, 2568 insertions(+), 9 deletions(-)
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_test_in.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_test_out.c
 create mode 100644 test/common_plat/validation/api/ipsec/test_vectors.h

diff --git a/test/common_plat/validation/api/ipsec/Makefile.am 
b/test/common_plat/validation/api/ipsec/Makefile.am
index 106b8dce..043a 100644
--- a/test/common_plat/validation/api/ipsec/Makefile.am
+++ b/test/common_plat/validation/api/ipsec/Makefile.am
@@ -1,7 +1,10 @@
 include ../Makefile.inc
 
 noinst_LTLIBRARIES = libtestipsec.la
-libtestipsec_la_SOURCES = ipsec.c
+libtestipsec_la_SOURCES = \
+   ipsec_test_in.c \
+   ipsec_test_out.c \
+   ipsec.c
 
 test_PROGRAMS = ipsec_main$(EXEEXT)
 dist_ipsec_main_SOURCES = ipsec_main.c
diff --git a/test/common_plat/validation/api/ipsec/ipsec.c 
b/test/common_plat/validation/api/ipsec/ipsec.c
index 78348032..27132a6d 100644
--- a/test/common_plat/validation/api/ipsec/ipsec.c
+++ b/test/common_plat/validation/api/ipsec/ipsec.c
@@ -10,6 +10,465 @@
 
 #include "ipsec.h"
 
+#include "test_vectors.h"
+
+struct suite_context_s suite_context;
+
+#define PKT_POOL_NUM  64
+#define PKT_POOL_LEN  (1 * 1024)
+
+int ipsec_check(odp_bool_t ah,
+   odp_cipher_alg_t cipher,
+   odp_auth_alg_t auth)
+{
+   odp_ipsec_capability_t capa;
+
+   if (odp_ipsec_capability(&capa) < 0)
+   return ODP_TEST_INACTIVE;
+
+   if ((ODP_IPSEC_OP_MODE_SYNC == suite_context.inbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_sync) ||
+   (ODP_IPSEC_OP_MODE_ASYNC == suite_context.outbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_sync) ||
+   (ODP_IPSEC_OP_MODE_ASYNC == suite_context.inbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_async) ||
+   (ODP_IPSEC_OP_MODE_ASYNC == suite_context.outbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_async) ||
+   (ODP_IPSEC_OP_MODE_INLINE == suite_context.inbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_inline_in) ||
+   (ODP_IPSEC_OP_MODE_INLINE == suite_context.outbound_op_mode &&
+ODP_SUPPORT_NO == capa.op_mode_inline_out))
+   return ODP_TEST_INACTIVE;
+
+   if (ah && (ODP_SUPPORT_NO == capa.proto_ah))
+   return ODP_TEST_INACTIVE;
+
+   /* Cipher algorithms */
+   switch (cipher) {
+   case ODP_CIPHER_ALG_NULL:
+   if (!capa.ciphers.bit.null)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_CIPHER_ALG_DES:
+   if (!capa.ciphers.bit.des)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_CIPHER_ALG_3DES_CBC:
+   if (!capa.ciphers.bit.trides_cbc)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_CIPHER_ALG_AES_CBC:
+   if (!capa.ciphers.bit.aes_cbc)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_CIPHER_ALG_AES_GCM:
+   if (!capa.ciphers.bit.aes_gcm)
+   return ODP_TEST_INACTIVE;
+   break;
+   default:
+   fprintf(stderr, "Unsupported cipher algorithm\n");
+   return ODP_TEST_INACTIVE;
+   }
+
+   /* Authentication algorithms */
+   switch (auth) {
+   case ODP_AUTH_ALG_NULL:
+   if (!capa.auths.bit.null)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_AUTH_ALG_MD5_HMAC:
+   if (!capa.auths.bit.md5_hmac)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_AUTH_ALG_SHA1_HMAC:
+   if (!capa.auths.bit.sha1_hmac)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_AUTH_ALG_SHA256_HMAC:
+   if (!capa.auths.bit.sha256_hmac)
+   return ODP_TEST_INACTIVE;
+   break;
+   case ODP_AUTH_ALG_SHA512_HMAC:
+   if (!capa.auths.bit.sha512_hmac)
+   

[lng-odp] [PATCH API-NEXT v1 1/1] linux-gen: pktio: loop: reset packet subtype on loopback

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

loop interface can get any kind of packets, but should output only basic
packets. Reset packet subtype on loopback.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 68 (lumag:packet-loop)
 ** https://github.com/Linaro/odp/pull/68
 ** Patch: https://github.com/Linaro/odp/pull/68.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: bb30b0fc22b7daa0dc114fc9b0c06b197c6ced13
 **/
 platform/linux-generic/pktio/loop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/platform/linux-generic/pktio/loop.c 
b/platform/linux-generic/pktio/loop.c
index c825393a..b1d311fa 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -165,6 +165,8 @@ static int loopback_send(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
 
for (i = 0; i < len; ++i) {
hdr_tbl[i] = packet_to_buf_hdr(pkt_tbl[i]);
+   _odp_buffer_event_subtype_set(hdr_tbl[i]->handle.handle,
+ ODP_EVENT_PACKET_BASIC);
bytes += odp_packet_len(pkt_tbl[i]);
}
 



[lng-odp] [PATCH API-NEXT v1 0/1] linux-gen: pktio: loop: reset packet subtype on loopback

2017-07-06 Thread Github ODP bot
loop interface can get any kind of packets, but should output only basic
packets. Reset packet subtype on loopback.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 68 (lumag:packet-loop)
 ** https://github.com/Linaro/odp/pull/68
 ** Patch: https://github.com/Linaro/odp/pull/68.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: bb30b0fc22b7daa0dc114fc9b0c06b197c6ced13
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v1 1/1] api: ipsec: pass OUT_INLINE outer headers as const

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Pass outer headers for outbound inline packets as const pointers.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 69 (lumag:ipsec-const)
 ** https://github.com/Linaro/odp/pull/69
 ** Patch: https://github.com/Linaro/odp/pull/69.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 777f6167fde63438802b01e07d1ac080f8b684b2
 **/
 include/odp/api/spec/ipsec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index e602e4b8..2d3ab4b1 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -1024,7 +1024,7 @@ typedef struct odp_ipsec_out_inline_param_t {
/** Points to first byte of outer headers to be copied in
 *  front of the outgoing IPSEC packet. Implementation copies
 *  the headers during odp_ipsec_out_inline() call. */
-   uint8_t *ptr;
+   const uint8_t *ptr;
 
/** Outer header length in bytes */
uint32_t len;



[lng-odp] [PATCH API-NEXT v1 0/1] api: ipsec: pass OUT_INLINE outer headers as const

2017-07-06 Thread Github ODP bot
Pass outer headers for outbound inline packets as const pointers.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 69 (lumag:ipsec-const)
 ** https://github.com/Linaro/odp/pull/69
 ** Patch: https://github.com/Linaro/odp/pull/69.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 777f6167fde63438802b01e07d1ac080f8b684b2
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v1 1/3] api: ipsec: pass OUT_INLINE outer headers as const

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Pass outer headers for outbound inline packets as const pointers.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 7b101c6937865f27f10cc58285092a6cab015e2f
 **/
 include/odp/api/spec/ipsec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index e602e4b8..2d3ab4b1 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -1024,7 +1024,7 @@ typedef struct odp_ipsec_out_inline_param_t {
/** Points to first byte of outer headers to be copied in
 *  front of the outgoing IPSEC packet. Implementation copies
 *  the headers during odp_ipsec_out_inline() call. */
-   uint8_t *ptr;
+   const uint8_t *ptr;
 
/** Outer header length in bytes */
uint32_t len;



[lng-odp] [PATCH API-NEXT v1 0/3] test: validation: add IPsec API testsuite

2017-07-06 Thread Github ODP bot
Add several basic tests for IPsec API.
This PR incorporates #69  and event subtypes implementation on which it depends.

github
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 7b101c6937865f27f10cc58285092a6cab015e2f
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 98 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
CHECK: Alignment should match open parenthesis
#352: FILE: test/common_plat/validation/api/ipsec/ipsec.c:313:
+   CU_ASSERT(ipsec_check_packet(part->out[i].pkt_out,
+   pkto[i]));

WARNING: line over 80 characters
#358: FILE: test/common_plat/validation/api/ipsec/ipsec.c:319:
+int ipsec_fill_out_one(const ipsec_test_part *part, odp_ipsec_sa_t sa, 
odp_packet_t *pkto)

WARNING: line over 80 characters
#401: FILE: test/common_plat/validation/api/ipsec/ipsec.c:362:
+   CU_ASSERT_EQUAL(1, odp_ipsec_out_inline(&pkt, 1, ¶m, 
&inline_param));

WARNING: line over 80 characters
#418: FILE: test/common_plat/validation/api/ipsec/ipsec.c:379:
+   CU_ASSERT_EQUAL(ODP_EVENT_PACKET_IPSEC, 
subtype);

WARNING: line over 80 characters
#421: FILE: test/common_plat/validation/api/ipsec/ipsec.c:382:
+   CU_ASSERT_EQUAL(ODP_EVENT_PACKET_BASIC, 
subtype);

WARNING: 'throught' may be misspelled - perhaps 'thought'?
#448: FILE: test/common_plat/validation/api/ipsec/ipsec.c:409:
+   /* Inline packet went throught loop */

CHECK: Alignment should match open parenthesis
#458: FILE: test/common_plat/validation/api/ipsec/ipsec.c:419:
+   CU_ASSERT(ipsec_check_packet(part->out[i].pkt_out,
+   pkto[i]));

WARNING: 'throught' may be misspelled - perhaps 'thought'?
#485: FILE: test/common_plat/validation/api/ipsec/ipsec.c:446:
+   /* Inline packet went throught loop */

CHECK: Avoid CamelCase: 
#575: FILE: test/common_plat/validation/api/ipsec/ipsec.c:541:
+   for (i = 0; suite[i].pName; i++) {

WARNING: line over 80 characters
#607: FILE: test/common_plat/validation/api/ipsec/ipsec.c:573:
+   {"IPsec-inline-out", ipsec_out_inline_init, ipsec_out_term, 
ipsec_out_suite},

CHECK: Avoid CamelCase: 
#1678: FILE: test/common_plat/validation/api/ipsec/ipsec_test_out.c:49:
+#define IPv4ADDR(a, b, c, d) odp_cpu_to_be_32((a << 24) | \

CHECK: Alignment should match open parenthesis
#2000: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:18:
+KEY(key_a5_128, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+   0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5);

CHECK: Alignment should match open parenthesis
#2002: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:20:
+KEY(key_5a_128, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+   0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a);

CHECK: Alignment should match open parenthesis
#2004: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:22:
+KEY(key_a5_256, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+   0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,

CHECK: Alignment should match open parenthesis
#2008: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:26:
+KEY(key_5a_256, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+   0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,

CHECK: Alignment should match open parenthesis
#2013: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:31:
+KEY(key_rfc3602, 0x90, 0xd3, 0x82, 0xb4, 0x10, 0xee, 0xba, 0x7a,
+0xd9, 0x38, 0xc4, 0x6c, 0xec, 0x1a, 0x82, 0xbf);

CHECK: Alignment should match open parenthesis
#2015: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:33:
+KEY(key_rfc3602_2, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+  0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef);

total: 0 errors, 7 warnings, 10 checks, 2616 lines checked


to_send-p-002.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v1 2/3] linux-generic: events subtype implementation

2017-07-06 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 7b101c6937865f27f10cc58285092a6cab015e2f
 **/
 platform/linux-generic/include/odp_buffer_inlines.h  |  2 ++
 platform/linux-generic/include/odp_buffer_internal.h |  3 +++
 platform/linux-generic/odp_crypto.c  | 15 +--
 platform/linux-generic/odp_event.c   | 15 +++
 platform/linux-generic/odp_packet.c  |  1 +
 platform/linux-generic/odp_pool.c| 11 +++
 6 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/platform/linux-generic/include/odp_buffer_inlines.h 
b/platform/linux-generic/include/odp_buffer_inlines.h
index cf817d90..4c0e7339 100644
--- a/platform/linux-generic/include/odp_buffer_inlines.h
+++ b/platform/linux-generic/include/odp_buffer_inlines.h
@@ -21,6 +21,8 @@ extern "C" {
 
 odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf);
 void _odp_buffer_event_type_set(odp_buffer_t buf, int ev);
+odp_event_subtype_t _odp_buffer_event_subtype(odp_buffer_t buf);
+void _odp_buffer_event_subtype_set(odp_buffer_t buf, int ev);
 int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t buf);
 
 static inline odp_buffer_t odp_hdr_to_buf(odp_buffer_hdr_t *hdr)
diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b/platform/linux-generic/include/odp_buffer_internal.h
index 076abe96..dadf285e 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -96,6 +96,9 @@ struct odp_buffer_hdr_t {
/* Event type. Maybe different than pool type (crypto compl event) */
int8_tevent_type;
 
+   /* Event subtype. Should be ODP_EVENT_NO_SUBTYPE except packets. */
+   int8_tevent_subtype;
+
/* Burst table */
struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE];
 
diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 68fc5658..0e2adad1 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -907,12 +907,13 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
if (ODP_QUEUE_INVALID != session->p.compl_queue) {
odp_event_t completion_event;
odp_crypto_generic_op_result_t *op_result;
+   odp_buffer_t buf;
 
/* Linux generic will always use packet for completion event */
completion_event = odp_packet_to_event(param->out_pkt);
-   _odp_buffer_event_type_set(
-   odp_buffer_from_event(completion_event),
-   ODP_EVENT_CRYPTO_COMPL);
+   buf = odp_buffer_from_event(completion_event);
+   _odp_buffer_event_type_set(buf, ODP_EVENT_CRYPTO_COMPL);
+   _odp_buffer_event_subtype_set(buf, ODP_EVENT_NO_SUBTYPE);
/* Asynchronous, build result (no HW so no errors) and send it*/
op_result = get_op_result_from_event(completion_event);
op_result->magic = OP_RESULT_MAGIC;
@@ -1106,9 +1107,11 @@ odp_crypto_compl_result(odp_crypto_compl_t 
completion_event,
 void
 odp_crypto_compl_free(odp_crypto_compl_t completion_event)
 {
-   _odp_buffer_event_type_set(
-   odp_buffer_from_event((odp_event_t)completion_event),
-   ODP_EVENT_PACKET);
+   odp_buffer_t buf =
+   odp_buffer_from_event((odp_event_t)completion_event);
+
+   _odp_buffer_event_type_set(buf, ODP_EVENT_PACKET);
+   _odp_buffer_event_subtype_set(buf, ODP_EVENT_PACKET_BASIC);
 }
 
 void odp_crypto_session_param_init(odp_crypto_session_param_t *param)
diff --git a/platform/linux-generic/odp_event.c 
b/platform/linux-generic/odp_event.c
index d71f4464..23b410d8 100644
--- a/platform/linux-generic/odp_event.c
+++ b/platform/linux-generic/odp_event.c
@@ -19,6 +19,21 @@ odp_event_type_t odp_event_type(odp_event_t event)
return _odp_buffer_event_type(odp_buffer_from_event(event));
 }
 
+odp_event_subtype_t odp_event_subtype(odp_event_t event)
+{
+   return _odp_buffer_event_subtype(odp_buffer_from_event(event));
+}
+
+odp_event_type_t odp_event_types(odp_event_t event,
+odp_event_subtype_t *subtype)
+{
+   odp_buffer_t buf = odp_buffer_from_event(event);
+
+   *subtype = _odp_buffer_event_subtype(buf);
+
+   return _odp_buffer_event_type(buf);
+}
+
 void odp_event_free(odp_event_t event)
 {
switch (odp_event_type(event)) {
diff --git a/platform/linux-generic/odp_packet.c 
b/platform/linux-generic/odp_packet.c
index eb66af2d..3789feca 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -268,6 +268,7 @@ st

Re: [lng-odp] [PATCH 7/7] linux-gen: dpdk: enable zero-copy operation

2017-07-06 Thread Elo, Matias (Nokia - FI/Espoo)

> On 6 Jul 2017, at 6:56, Honnappa Nagarahalli 
>  wrote:
> 
> On 3 July 2017 at 07:01, Matias Elo  wrote:
>> Implements experimental zero-copy mode for DPDK pktio. This can be enabled
>> with additional '--enable-dpdk-zero-copy' configure flag.
>> 
>> This feature has been put behind an extra configure flag as it doesn't
>> entirely adhere to the DPDK API and may behave unexpectedly with untested
>> DPDK NIC drivers. Zero-copy operation has been tested with pcap, ixgbe, and
>> i40e drivers.
>> 
> 
> Can you elaborate more on this? Which parts do not adhere to DPDK APIs?
> 

Sure, DPDK documentation states that after calling rte_mempool_create_empty() 
the
user should call rte_mempool_populate_*() to add memory chunks to the pool. 
These
functions either allocate the required memory or take a contiguous memory block 
as
argument. This memory block is then divided  into DPDK memory elements. This 
doesn't
work when we want to pass individual standard ODP packets to DPDK. So I simply
never call the populate functions. This is the part not adhering to the DPDK 
API.

In the zero-copy patch DPDK mempool operations are mapped to custom functions
(pool_enqueue(), pool_dequeue_bulk()...) which interface directly with the ODP 
packet
pool, so the DPDK mempool doesn't actually require the memory chunks suggested 
by
the populate functions.  


-Matias