Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
e lock order. > > This addresses the aspect of Bug > https://bugs.linaro.org/show_bug.cgi?id=1879 > relating to deadlock in unicore systems. > > Suggested-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> >

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 11/03/2015 10:21 AM, Nicolas Morey-Chaisemartin wrote: > > On 11/02/2015 06:11 PM, Bill Fischofer wrote: >> Enqueueing to ordered queues requires two locks (source and target >> queues). Since any queue can be either source or target, queues do not >> have a natural l

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: use locking hierarchy for ordered queueing

2015-11-03 Thread Nicolas Morey-Chaisemartin
> have a natural locking hierarchy. Create one by using the address of > the qentry as the lock order. > > This addresses the aspect of Bug > https://bugs.linaro.org/show_bug.cgi?id=1879 > relating to deadlock in unicore systems. > > Suggested-by: Nicolas Morey-Chaisemartin

Re: [lng-odp] [PATCH v2 1/6] test: l2fwd: added option to disable error check

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 11/03/2015 12:52 PM, Nicolas Morey-Chaisemartin wrote: > > On 10/30/2015 10:24 AM, Petri Savolainen wrote: >> Added command line option to disable packet error check. Error >> check requires full packet parse. Max packet rate measurements >> should be done

Re: [lng-odp] [PATCH v2 1/6] test: l2fwd: added option to disable error check

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 10/30/2015 10:24 AM, Petri Savolainen wrote: > Added command line option to disable packet error check. Error > check requires full packet parse. Max packet rate measurements > should be done with minimal feature set. > > This change gives +10% packet rate increase in direct recv mode > with

Re: [lng-odp] [PATCH v2 1/6] test: l2fwd: added option to disable error check

2015-11-03 Thread Nicolas Morey-Chaisemartin
For the series: Reviewed-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> On 10/30/2015 10:24 AM, Petri Savolainen wrote: > Added command line option to disable packet error check. Error > check requires full packet parse. Max packet rate measurements > should be done with mini

[lng-odp] [PATCH] example: ipsec: check push_tail return code

2015-11-03 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- example/ipsec/odp_ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 2aaae1d..9950ccf 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example

Re: [lng-odp] [PATCH] validation: pktio: initialize queue parameters correctly

2015-11-03 Thread Nicolas Morey-Chaisemartin
Reviewed-by: Nicolas Morey-Chaisemartion On 11/03/2015 04:00 PM, Stuart Haslam wrote: > A call to odp_queue_param_init() is missing so uninitialized parameters > are passed to odp_queue_create() leading to unpredictable results. > > Signed-off-by: Stuart Haslam

Re: [lng-odp] [PATCH] linux-generic: check return codes in odp_pktio_term_global

2015-11-03 Thread Nicolas Morey-Chaisemartin
On 10/30/2015 10:27 AM, Maxim Uvarov wrote: > According to API odp_pktio_close() can be called only for stopped > pktio. So in odp_pktio_term_global try to stop it first then > call close. Also check all returns codes. > https://bugs.linaro.org/show_bug.cgi?id=1854 > > Signed-off-by: Maxim

Re: [lng-odp] [API-NEXT PATCHv2] linux-generic: queue: yield trying to obtain multiple locks

2015-11-02 Thread Nicolas Morey-Chaisemartin
On 10/30/2015 09:33 PM, Bill Fischofer wrote: > To avoid deadlock, especially on a single core, force an explicit > yield while not holding either lock when attempting to acquire multiple > locks for ordered queue processing. Also handle enqueues to self as in > this case the origin and target

Re: [lng-odp] new test directory structure?

2015-10-30 Thread Nicolas Morey-Chaisemartin
On 10/30/2015 12:46 PM, Bill Fischofer wrote: > A few comments: > > On Fri, Oct 30, 2015 at 3:38 AM, Christophe Milard > > wrote: > > Maybe time to move things around and embrace more than just the > validation tests in the

Re: [lng-odp] new test directory structure?

2015-10-30 Thread Nicolas Morey-Chaisemartin
On 10/30/2015 04:07 PM, Mike Holmes wrote: > SNIP - > > I can speak from experience: there are a lot of reasons for tests to be > "specific" to a platform. > > Here are some we had to deal with: > - No cache coherency > - No glibc (gettimeofday for example) > - Incompatible

[lng-odp] [PATCH] validation: pktio: fix start_stop test

2015-10-29 Thread Nicolas Morey-Chaisemartin
one pktio provided. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/pktio/pktio.c | 72 +++ 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pkti

[lng-odp] [PATCHv2] test: l2fwd: add extra counter to count packet with errors vs dropped packets

2015-10-29 Thread Nicolas Morey-Chaisemartin
Drop packets counts both packets dropped by calls to pktio_send() and packet which were flagged with errors during parsing. Add an extra counter to differ these two types of packets. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- v2: Rebased on latest master

Re: [lng-odp] [PATCHv2] test: l2fwd: add extra counter to count packet with errors vs dropped packets

2015-10-29 Thread Nicolas Morey-Chaisemartin
counts both packets dropped by calls to pktio_send() >> and packet which were flagged with errors during parsing. >> >> Add an extra counter to differ these two types of packets. >> >> Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> >> ---

[lng-odp] [API-NEXTv6 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-28 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/validation/packet/packet.c | 81 + test/validation/packet/packet.h | 1 + 2 files changed, 82 insertions(+) diff

[lng-odp] [API-NEXTv6 3/7] linux-generic: pool: add buffer_alloc_multi function

2015-10-28 Thread Nicolas Morey-Chaisemartin
For the moment just a simple wrapper around buffer_alloc to be used by odp_buffer_alloc_multi and odp_packet_alloc_multi Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-gen

[lng-odp] [API-NEXTv6 2/7] api: packet: add functions to alloc/free multiple packets at once

2015-10-28 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- include/odp/api/packet.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h i

[lng-odp] [API-NEXTv6 5/7] validation: buffer: add tests for buffer alloc/free multi functions

2015-10-28 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/validation/buffer/buffer.c | 106 test/validation/buffer/buffer.h | 2 + 2 files changed, 108 insertions(+)

[lng-odp] [API-NEXTv6 4/7] linux-generic: pool: add implementation for buffer alloc/free multi

2015-10-28 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_pool.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generi

Re: [lng-odp] [API-NEXT PATCH] api: atomic: added atomic_is_lock_free

2015-10-28 Thread Nicolas Morey-Chaisemartin
On 10/28/2015 09:30 AM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -Original Message- >> From: EXT Nicolas Morey-Chaisemartin [mailto:nmo...@kalray.eu] >> Sent: Wednesday, October 28, 2015 10:23 AM >> To: Savolainen, Petri (Nokia - FI/Espoo);

Re: [lng-odp] [API-NEXT PATCH] api: atomic: added atomic_is_lock_free

2015-10-28 Thread Nicolas Morey-Chaisemartin
On 10/28/2015 09:12 AM, Savolainen, Petri (Nokia - FI/Espoo) wrote: >>> Nicolas, you could define a platform specific init struct that gives user >> option to tell which u64 operations will be called. If user tells that >> cas/min/max_u64 are not called, you can implement everything lock-free.

[lng-odp] [API-NEXTv6 0/7] Add functions to free multiple packets/buffers at once

2015-10-28 Thread Nicolas Morey-Chaisemartin
do not make asumptions on the amount of buffer returned * Add more test coverage * Free to multiple pools at once * Alloc more than pool contains * etc. v2: * Fix prototypes * Add alloc_multi functions * Add implementations * Add tests Nicolas Morey-Chaisemartin (7): api: buffer:

[lng-odp] [API-NEXTv6 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-28 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com> --- include/odp/api/buffer.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h i

Re: [lng-odp] [PATCH 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-28 Thread Nicolas Morey-Chaisemartin
all passed. > Please take a look at it. > > > Maxim. > > On 10/27/2015 20:52, Nicolas Morey-Chaisemartin wrote: >> Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> >> --- >> include/odp/api/buffer.h | 26 ++ >> 1 file ch

Re: [lng-odp] [API-NEXT PATCH] api: atomic: added atomic_is_lock_free

2015-10-27 Thread Nicolas Morey-Chaisemartin
On 10/27/2015 04:16 PM, Ivan Khoronzhuk wrote: > > > On 27.10.15 16:48, Petri Savolainen wrote: >> Platforms may support some uint64 operations lock-free and >> others not. For example, inc_64 can be natively supported but >> cas_64 (or max_64/min_64) not. User may be able to switch to >> 32 bit

Re: [lng-odp] [API-NEXT PATCH] api: atomic: added atomic_is_lock_free

2015-10-27 Thread Nicolas Morey-Chaisemartin
On 10/27/2015 05:14 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -Original Message- >> From: EXT Nicolas Morey-Chaisemartin [mailto:nmo...@kalray.eu] >> Sent: Tuesday, October 27, 2015 5:35 PM >> To: Ivan Khoronzhuk; Savolainen, Petri (N

[lng-odp] [PATCH 4/7] linux-generic: pool: add implementation for buffer alloc/free multi

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_pool.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 9117cc8..9859ff6 100644 --- a/platform/linux-g

[lng-odp] [PATCH 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/buffer.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index aea273f..6631f47 100644 --- a/include/odp/api/buffer.h +++ b/i

[lng-odp] [API-NEXTv5 0/7] Add functions to free multiple packets/buffers at once

2015-10-27 Thread Nicolas Morey-Chaisemartin
nce * Alloc more than pool contains * etc. v2: * Fix prototypes * Add alloc_multi functions * Add implementations * Add tests Nicolas Morey-Chaisemartin (7): api: buffer: add functions to alloc/free multiple buffers at once api: packet: add functions to alloc/free multiple packets at o

[lng-odp] [PATCH 3/7] linux-generic: pool: add buffer_alloc_multi function

2015-10-27 Thread Nicolas Morey-Chaisemartin
For the moment just a simple wrapper around buffer_alloc to be used by odp_buffer_alloc_multi and odp_packet_alloc_multi Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/include/odp_buffer_internal.h | 2 ++ platform/linux-generic/odp_

[lng-odp] [PATCH 5/7] validation: buffer: add tests for buffer alloc/free multi functions

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/buffer/buffer.c | 106 test/validation/buffer/buffer.h | 2 + 2 files changed, 108 insertions(+) diff --git a/test/validation/buffer/buffer.c b/test/validation/

[lng-odp] [PATCH 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/packet/packet.c | 81 + test/validation/packet/packet.h | 1 + 2 files changed, 82 insertions(+) diff --git a/test/validation/packet/packet.c b/test/validation/

[lng-odp] [PATCH 6/7] linux-generic: packet: add implementation for packet alloc/free multi

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet.c | 28 1 file changed, 28 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 1b49624..79bf8b3

[lng-odp] [PATCH 2/7] api: packet: add functions to alloc/free multiple packets at once

2015-10-27 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/packet.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 5d46b7b..85cc9c9 100644 --- a/include/odp/api/packet.h

[lng-odp] [PATCH 1/2] example: classifier: use uint32_t instead of unsigned

2015-10-26 Thread Nicolas Morey-Chaisemartin
Fixes build issue on arch where uint32_t != unsigned: example/classifier/odp_classifier.c:694:8: error: passing argument 3 of ‘parse_value’ from incompatible pointer type [-Werror] [policy_count].rule.val_sz); Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- e

[lng-odp] [PATCH 2/2] linux-generic: queue: change lock_index from uint32_t to unsigned to match API

2015-10-26 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index de22bd6..a7022cf 100644 --- a/platform

[lng-odp] [PATCH] helper: linux: do not call odp_term_global on thread exit

2015-10-21 Thread Nicolas Morey-Chaisemartin
Remove the call to odp_term_global when a thread returns. This causes some serious side effects (and bugs) when thread are created and joined "dynamically". Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- helper/linux.c | 2 -- 1 file changed, 2 deletions(-) dif

Re: [lng-odp] [PATCH 2/2] linux-generic: pktio: replace pktio ticketlock by a rwlock

2015-10-21 Thread Nicolas Morey-Chaisemartin
:04 PM, Nicolas Morey-Chaisemartin wrote: > This allows pktio to support concurrent recv/send. > > For the current pktios: > * loop uses a queue (serializing) > * socket/sockmmsg are serialized by the socket itself > * socket_mmap now handles concurrent accesses > * lo

[lng-odp] [PATCH] configure: move HAVE_PCAP AM_CONDITIONAL to configure.ac

2015-10-21 Thread Nicolas Morey-Chaisemartin
Platform specific m4 files cannot define AM_CONDITIONAL. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- configure.ac | 1 + platform/linux-generic/m4/odp_pcap.m4 | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configur

Re: [lng-odp] [API-NEXTv4 0/7] Add functions to free multiple packets/buffers at once

2015-10-21 Thread Nicolas Morey-Chaisemartin
Any more feedback on this ? On 10/13/2015 10:47 AM, Nicolas Morey-Chaisemartin wrote: > As a lot of ODP calls allows the user to receive/poll/send multiple packets > at once, I think it makes sense to provide a call > to free a bunch of packets/buffers at the same time. >

Re: [lng-odp] [PATCH] helper: linux: do not call odp_term_global on thread exit

2015-10-21 Thread Nicolas Morey-Chaisemartin
obal when a thread returns. >> This causes some serious side effects (and bugs) when thread are >> created and joined "dynamically". >> >> Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> >> --- >> helper/linux.c | 2 -- >> 1

Re: [lng-odp] [PATCH 2/2] linux-generic: pktio: replace pktio ticketlock by a rwlock

2015-10-21 Thread Nicolas Morey-Chaisemartin
ly and scales quite well with the number of cores. > >> -Original Message- >> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >> Nicolas Morey-Chaisemartin >> Sent: Tuesday, October 20, 2015 6:05 PM >> To: lng-odp@lists.linaro.org >> Sub

Re: [lng-odp] [PATCH 2/2] linux-generic: pktio: replace pktio ticketlock by a rwlock

2015-10-21 Thread Nicolas Morey-Chaisemartin
On 10/21/2015 10:28 AM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -Original Message- >> From: EXT Nicolas Morey-Chaisemartin [mailto:nmo...@kalray.eu] >> Sent: Wednesday, October 21, 2015 11:03 AM >> To: Savolainen, Petri (Nokia - FI/Espoo); lng-odp@list

[lng-odp] [PATCH 2/3] linux-generic: pktio: add helper to convert entry id to pktio id

2015-10-20 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet_io.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 8a09439..1245745

Re: [lng-odp] [PATCH] test: l2fwd: add extra counter to count packet with errors vs dropped packets

2015-10-20 Thread Nicolas Morey-Chaisemartin
Ping On 09/30/2015 11:10 AM, Maxim Uvarov wrote: > looks reasonable. Does somebody have any objections? > > Maxim. > > On 09/22/15 10:59, Nicolas Morey-Chaisemartin wrote: >> Drop packets counts both packets dropped by calls to pktio_send() >> and packet which were

[lng-odp] [PATCH 1/3] linux-generic: pktio: simplify pktio loop indexes

2015-10-20 Thread Nicolas Morey-Chaisemartin
For legacy reason loop on all pktio ranged from 1 to ODP_CONFIG_PKTIO_ENTRIES included. Remove loop offset to simplify code Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet_io.c | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[lng-odp] [PATCH 3/3] linux-generic: pktio: check error when closing pktio during term

2015-10-20 Thread Nicolas Morey-Chaisemartin
Only call odp_pktio_close on opened pktio and output an error message if odp_pktio_close failed. Fixes: https://bugs.linaro.org/show_bug.cgi?id=1854 Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet_io.c | 25 ++---

[lng-odp] [PATCH 1/2] linux-generic: socket_mmap: support concurrent rx/tx

2015-10-20 Thread Nicolas Morey-Chaisemartin
in the ring should be flushed by the thread which reserved the slot in the ring buffer in the first place. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/include/odp_packet_socket.h | 2 +- platform/linux-generic/pktio/socket_mmap.c

[lng-odp] [PATCH 0/2] Enhance pktio parallelism

2015-10-20 Thread Nicolas Morey-Chaisemartin
one might not be able to switch the promisc mode for example. Ideally a rwlock which favors write would solve the issue. I don't have a proper test setup but running pktio perf in polling mode with 4 threads on sockets showed a x2 speed up. Nicolas Morey-Chaisemartin (2): linux-generic

[lng-odp] [PATCH 2/2] linux-generic: pktio: replace pktio ticketlock by a rwlock

2015-10-20 Thread Nicolas Morey-Chaisemartin
concurrently but only one thread each. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- .../linux-generic/include/odp_packet_io_internal.h | 4 +- platform/linux-generic/include/odp_packet_netmap.h | 3 + platform/linux-generic/odp_packet_io.c

Re: [lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-16 Thread Nicolas Morey-Chaisemartin
On 10/16/2015 02:39 PM, Mike Holmes wrote: > Nicolas should you have added you sign-off since you added to our code base > ? I wasn't sure about the policy. Concerning checkpatch, I'd trust these people signoff over mine ;) Anyway maxim added his so it should be alright

Re: [lng-odp] [PATCH] linux-generic: pktio: close all pktio when term is called

2015-10-16 Thread Nicolas Morey-Chaisemartin
; Maxim. > > On 10/14/2015 10:53, Nicolas Morey-Chaisemartin wrote: >> There at still 3 loops with the same = 1, <=PKTIO_ENTRIES in the packet_io.c >> file. >> Can we keep this patch this way and then send a new patch that fixes all >> these loops at once? >>

Re: [lng-odp] [PATCH] linux-generic: packet: use packet metadata copy function on packet realloc

2015-10-15 Thread Nicolas Morey-Chaisemartin
Ping On 09/14/2015 11:14 AM, Nicolas Morey-Chaisemartin wrote: > Remove duplicated code and use preexisting metadata copy function > > Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> > --- > platform/linux-generic/odp_packet.c | 34 ++-

Re: [lng-odp] [PATCH RFC] Revert "platform: Makefile.inc: use `` instead of != for compatibility with older versions of Make"

2015-10-15 Thread Nicolas Morey-Chaisemartin
Please forget the first two sentences of my previous mail. I started writing an alternate patch and then realized it was fixed in master already. On 10/15/2015 05:20 PM, Nicolas Morey-Chaisemartin wrote: > Maybe changing the directory before running git_hash.sh would fix your issue > an

[lng-odp] [PATCH] scripts/git_hash: fix out of tree build

2015-10-15 Thread Nicolas Morey-Chaisemartin
Git hash was modified to handled non git builds but when building out of tree, it detects a .git folder but do not change to this folder to run git command. Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- scripts/git_hash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 del

Re: [lng-odp] [PATCH RFC] Revert "platform: Makefile.inc: use `` instead of != for compatibility with older versions of Make"

2015-10-15 Thread Nicolas Morey-Chaisemartin
Maybe changing the directory before running git_hash.sh would fix your issue and keep the old make working ? Something like This was fixed some time ago: commit 06537738ea438c3e339fc269dedb4ed6c5e48f07 Author: Anders Roxell Date: Fri Aug 14 15:25:05 2015 +0200

Re: [lng-odp] [PATCH RFC] Revert "platform: Makefile.inc: use `` instead of != for compatibility with older versions of Make"

2015-10-15 Thread Nicolas Morey-Chaisemartin
nect and he was surprised. > We tried several methods with modifing dirs. > When I've used $() instead of `` it helped but broke smth else... > > > On 15.10.15 18:20, Nicolas Morey-Chaisemartin wrote: >> Maybe changing the directory before running git_hash.sh wou

Re: [lng-odp] [PATCH] linux-generic: pktio: close all pktio when term is called

2015-10-14 Thread Nicolas Morey-Chaisemartin
There at still 3 loops with the same = 1, <=PKTIO_ENTRIES in the packet_io.c file. Can we keep this patch this way and then send a new patch that fixes all these loops at once? Nicolas On 10/14/2015 09:52 AM, Maxim Uvarov wrote: > On 10/14/2015 10:21, Nicolas Morey-Chaisemartin

Re: [lng-odp] [PATCH] linux-generic: pktio: close all pktio when term is called

2015-10-14 Thread Nicolas Morey-Chaisemartin
On 10/14/2015 08:48 AM, Maxim Uvarov wrote: > On 10/13/2015 20:05, Nicolas Morey-Chaisemartin wrote: >> Right now, pktio_term calls term on all pktio type but >> some pktio might still be be opened. Although the user should >> probably close its pktio before termint

[lng-odp] [API-NEXTv4 3/7] linux-generic: pool: add buffer_alloc_multi function

2015-10-13 Thread Nicolas Morey-Chaisemartin
For the moment just a simple wrapper around buffer_alloc to be used by odp_buffer_alloc_multi and odp_packet_alloc_multi Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/include/odp_buffer_internal.h | 2 ++ platform/linux-generic/odp_

[lng-odp] [API-NEXTv4 0/7] Add functions to free multiple packets/buffers at once

2015-10-13 Thread Nicolas Morey-Chaisemartin
ons * Add implementations * Add tests Nicolas Morey-Chaisemartin (7): api: buffer: add functions to alloc/free multiple buffers at once api: packet: add functions to alloc/free multiple packets at once linux-generic: pool: add buffer_alloc_multi function linux-generic: pool: add implementat

[lng-odp] [API-NEXTv4 5/7] validation: buffer: add tests for buffer alloc/free multi functions

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/buffer/buffer.c | 106 test/validation/buffer/buffer.h | 2 + 2 files changed, 108 insertions(+) diff --git a/test/validation/buffer/buffer.c b/test/validation/

[lng-odp] [API-NEXTv4 6/7] linux-generic: packet: add implementation for packet alloc/free multi

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet.c | 28 1 file changed, 28 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 209a6e6..5a1e870

[lng-odp] [API-NEXTv4 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/packet/packet.c | 81 + test/validation/packet/packet.h | 1 + 2 files changed, 82 insertions(+) diff --git a/test/validation/packet/packet.c b/test/validation/

[lng-odp] [API-NEXTv4 4/7] linux-generic: pool: add implementation for buffer alloc/free multi

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_pool.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 9036147..d4f6f14 100644 --- a/platform/linux-g

[lng-odp] [API-NEXTv4 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/buffer.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index aea273f..6631f47 100644 --- a/include/odp/api/buffer.h +++ b/i

[lng-odp] [API-NEXTv4 2/7] api: packet: add functions to alloc/free multiple packets at once

2015-10-13 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/packet.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 5d46b7b..85cc9c9 100644 --- a/include/odp/api/packet.h

Re: [lng-odp] [PATCHv9 7/8] linux-generic: add ipc pktio support

2015-10-13 Thread Nicolas Morey-Chaisemartin
On 10/09/2015 01:59 PM, Maxim Uvarov wrote: > Signed-off-by: Maxim Uvarov > --- > platform/linux-generic/Makefile.am | 2 + > .../linux-generic/include/odp_buffer_internal.h| 3 + > .../linux-generic/include/odp_packet_io_internal.h | 35 + >

[lng-odp] [PATCH] linux-generic: pktio: close all pktio when term is called

2015-10-13 Thread Nicolas Morey-Chaisemartin
Right now, pktio_term calls term on all pktio type but some pktio might still be be opened. Although the user should probably close its pktio before termintating the application, it is safer to iterate on all pktio and close them in the pktio_term function. Signed-off-by: Nicolas Morey

Re: [lng-odp] [PATCH] checkpatch: escape left braces in regex

2015-10-09 Thread Nicolas Morey-Chaisemartin
# ({... $ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/) { $ctx =~ s/\n*$//; On 10/09/2015 09:44 AM, Nicolas Morey-Chaisemartin wrote: > I guess it should. But I'm not sure where the upstream is. > It may even be

[lng-odp] [API-NEXTv7 0/5] ODP_PMR_CUSTOM_FRAME support

2015-10-09 Thread Nicolas Morey-Chaisemartin
single PMR and PMR sets creation Benoît Ganne (3): api: classification: move odp_pmr_match_t definition linux-generic: classification: implement ODP_PMR_CUSTOM_FRAME matching example: classifier: implement ODP_PMR_CUSTOM_FRAME match Nicolas Morey-Chaisemartin (2): api: classification

[lng-odp] [API-NEXTv7 5/5] example: classifier: implement ODP_PMR_CUSTOM_FRAME match

2015-10-09 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Benoît Ganne --- example/classifier/odp_classifier.c | 86 ++--- 1 file changed, 70 insertions(+), 16 deletions(-) diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index 689313d..fa10809

[lng-odp] [API-NEXTv7 4/5] linux-generic: classification: implement ODP_PMR_CUSTOM_FRAME matching

2015-10-09 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Benoît Ganne --- .../include/odp_classification_datamodel.h | 2 ++ .../include/odp_classification_inlines.h| 21 + platform/linux-generic/odp_classification.c | 7 +++ 3 files changed, 30 insertions(+) diff

Re: [lng-odp] [PATCH] checkpatch: escape left braces in regex

2015-10-09 Thread Nicolas Morey-Chaisemartin
I guess it should. But I'm not sure where the upstream is. It may even be fixed there. Nicolas On 10/08/2015 06:20 PM, Mike Holmes wrote: > Should this go upstream also ? > > On 8 October 2015 at 14:46, Nicolas Morey-Chaisemartin <nmo...@kalray.eu> > wrote: > >>

[lng-odp] [API-NEXTv7 3/5] api: classification: add ODP_PMR_CUSTOM_FRAME

2015-10-09 Thread Nicolas Morey-Chaisemartin
The application can now specify a packet offset in PMR rules. This offset is absolute from the frame start. It is used to extract the PMR value. This is useful to support arbitrary backplane protocols and extensions. Signed-off-by: Benoît Ganne ---

[lng-odp] [API-NEXTv7 2/5] api: classification: use a structure instead of many args for odp_pmr_create

2015-10-09 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- example/classifier/odp_classifier.c| 12 +--- include/odp/api/classification.h | 31 +++ platform/linux-generic/odp_classification.c

[lng-odp] [API-NEXTv7 1/5] api: classification: move odp_pmr_match_t definition

2015-10-09 Thread Nicolas Morey-Chaisemartin
This patch move the odp_pmr_match_t structure definition to prepare the introduction of the new ODP_PMR_CUSTOM_FRAME term. Signed-off-by: Benoît Ganne --- include/odp/api/classification.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-)

Re: [lng-odp] [PATCH] checkpatch: escape left braces in regex

2015-10-09 Thread Nicolas Morey-Chaisemartin
OK. Just submitted the cherry picked patch on the ML. On 10/09/2015 02:13 PM, Maxim Uvarov wrote: > On 10/09/15 12:21, Nicolas Morey-Chaisemartin wrote: >> It is actually already fixed in the Linux kernel. >> Shoud we import the latest checkpatch then? > > we should cherry-p

[lng-odp] [PATCH] checkpatch: fix left brace warning

2015-10-09 Thread Nicolas Morey-Chaisemartin
Using checkpatch.pl with Perl 5.22.0 generates the following warning: Unescaped left brace in regex is deprecated, passed through in regex; This patch fixes the warnings by escaping occurrences of the left brace inside the regular expression. Signed-off-by: Eddie Kovsky

Re: [lng-odp] Using config.h

2015-10-09 Thread Nicolas Morey-Chaisemartin
On 09/01/2015 02:23 PM, Maxim Uvarov wrote: > On 09/01/15 15:07, Nicolas Morey-Chaisemartin wrote: >> >> On 09/01/2015 12:39 PM, Maxim Uvarov wrote: >>> On 09/01/15 11:45, Nicolas Morey-Chaisemartin wrote: >>>> Hi, >>>> >>>>

Re: [lng-odp] [API-NEXT PATCHv4 1/4] api: packet reference count support

2015-10-09 Thread Nicolas Morey-Chaisemartin
On 10/09/2015 02:59 PM, Maxim Uvarov wrote: > Add api for packet reference count support. Which is useful in case: > - multicast support > - TCP retransmission > - traffic generator > > Introduced new call: newpkt = odp_packet_create_ref(pkt) which creates > reference to original packet, but

[lng-odp] [PATCH] configure: move all AM_CONDITIONAL to configure.ac

2015-10-09 Thread Nicolas Morey-Chaisemartin
the macro was only invoked conditionally. Solve this by setting a default status do disabled/no at the top configure, which can be overridden by the platform m4 files. And then set the AM_CONDITIONAl in the top configure.ac for every platform to see. Signed-off-by: Nicolas Morey-Chaisem

Re: [lng-odp] [API-NEXTv2 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-08 Thread Nicolas Morey-Chaisemartin
On 09/30/2015 12:47 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -Original Message- >> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >> Nicolas Morey-Chaisemartin >> Sent: Tuesday, September 29, 2015 5:16 PM >> To: ln

Re: [lng-odp] [PATCH] linux-generic: queue: split queue_enq implementations for regular and ordered queues

2015-10-08 Thread Nicolas Morey-Chaisemartin
Ping On 09/10/2015 05:22 PM, Nicolas Morey-Chaisemartin wrote: > This allows better readability, and make supporting ordered queues > easier for other platforms > > Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> > --- > platform/linux-g

Re: [lng-odp] [API-NEXTv2 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-08 Thread Nicolas Morey-Chaisemartin
On 10/08/2015 12:43 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> -Original Message- >> From: EXT Nicolas Morey-Chaisemartin [mailto:nmo...@kalray.eu] >> Sent: Thursday, October 08, 2015 12:43 PM >> To: Savolainen, Petri (Nokia - FI/Espoo); lng-odp@list

[lng-odp] [API-NEXTv3 0/7] Add functions to free multiple packets/buffers at once

2015-10-08 Thread Nicolas Morey-Chaisemartin
* Test do not make asumptions on the amount of buffer returned * Add more test coverage * Free to multiple pools at once * Alloc more than pool contains * etc. v2: * Fix prototypes * Add alloc_multi functions * Add implementations * Add tests Nicolas Morey-Chaisemartin (7): api

[lng-odp] [API-NEXTv3 5/7] validation: buffer: add tests for buffer alloc/free multi functions

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/buffer/buffer.c | 105 test/validation/buffer/buffer.h | 2 + 2 files changed, 107 insertions(+) diff --git a/test/validation/buffer/buffer.c b/test/validation/

[lng-odp] [PATCH] checkpatch: escape left braces in regex

2015-10-08 Thread Nicolas Morey-Chaisemartin
ed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- scripts/checkpatch.pl | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 4983a0c..893da37 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.p

[lng-odp] [API-NEXTv3 3/7] linux-generic: pool: add buffer_alloc_multi function

2015-10-08 Thread Nicolas Morey-Chaisemartin
For the moment just a simple wrapper around buffer_alloc to be used by odp_buffer_alloc_multi and odp_packet_alloc_multi Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/include/odp_buffer_internal.h | 2 ++ platform/linux-generic/odp_

[lng-odp] [API-NEXTv3 6/7] linux-generic: packet: add implementation for packet alloc/free multi

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet.c | 28 1 file changed, 28 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 209a6e6..5a1e870

[lng-odp] [API-NEXTv3 7/7] validation: packet: add tests for packet alloc/free multi functions

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- test/validation/packet/packet.c | 80 + test/validation/packet/packet.h | 1 + 2 files changed, 81 insertions(+) diff --git a/test/validation/packet/packet.c b/test/validation/

[lng-odp] [API-NEXTv3 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/buffer.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index aea273f..6631f47 100644 --- a/include/odp/api/buffer.h +++ b/i

[lng-odp] [API-NEXTv3 4/7] linux-generic: pool: add implementation for buffer alloc/free multi

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_pool.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 9036147..d4f6f14 100644 --- a/platform/linux-g

[lng-odp] [API-NEXTv3 2/7] api: packet: add functions to alloc/free multiple packets at once

2015-10-08 Thread Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- include/odp/api/packet.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 5d46b7b..85cc9c9 100644 --- a/include/odp/api/packet.h

Re: [lng-odp] odp ring and it's link issue

2015-10-06 Thread Nicolas Morey-Chaisemartin
You could probably generate a convenience library with both merged as a single.a/.la file ? I feel it would also be better for an end user to have a single library if we start having cyclic dependencies. Nicolas On 10/06/2015 04:07 PM, Maxim Uvarov wrote: > Hello, > > We had patch Rujiacs to

[lng-odp] [PATCH] linux-generic: pktio: optimize pktin_deq_multi

2015-10-06 Thread Nicolas Morey-Chaisemartin
request as much as possible * If there are buffer left, push them to the queue. On pktio_perf with loop interface, I see ~10% speedup with this patch Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> --- platform/linux-generic/odp_packet_io.c | 17 - 1 file chang

Re: [lng-odp] [API-NEXTv2 2/7] api: packet: add functions to alloc/free multiple packets at once

2015-10-05 Thread Nicolas Morey-Chaisemartin
On 09/29/2015 04:34 PM, Bill Fischofer wrote: > On Tue, Sep 29, 2015 at 9:15 AM, Nicolas Morey-Chaisemartin < > nmo...@kalray.eu> wrote: > > >> + >> +/** >> * Free packet >> * >> * Frees the packet into the buffer pool it was all

Re: [lng-odp] [PATCH] linux-generic: packet: use packet metadata copy function on packet realloc

2015-10-05 Thread Nicolas Morey-Chaisemartin
On 10/01/2015 05:05 PM, Bill Fischofer wrote: > odp_packet_copy() can copy between pools, which may have different sized > user areas, hence the size checks. Ok. But then does it make sense to copy a subpart of the user data ? If dst user_area >= src user_area it's going to work well but in the

Re: [lng-odp] [API-NEXTv2 1/7] api: buffer: add functions to alloc/free multiple buffers at once

2015-10-05 Thread Nicolas Morey-Chaisemartin
On 09/29/2015 07:02 PM, Nicolas Morey-Chaisemartin wrote: > > > On 09/29/2015 04:31 PM, Bill Fischofer wrote: >> >> >> On Tue, Sep 29, 2015 at 9:15 AM, Nicolas Morey-Chaisemartin >> <nmo...@kalray.eu> wrote: >> >> Signed-off-by: Nicolas M

<    1   2   3   4   5   6   >