Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Mike Holmes
>From the man page "The *strtok*() function uses a static buffer while parsing, so it's not thread safe. Use *strtok_r*() if this matters to you." I tested it and it appears to work fine as patched and I don't think we need the arg parsing to be thread safe in this app as currently written. Mik

[lng-odp] [PATCHv2 1/2] Convert linux thread/proc helpers to use core mask

2015-01-12 Thread Robbie King
Signed-off-by: Robbie King --- helper/include/odph_linux.h | 28 ++-- platform/linux-generic/Makefile.am| 4 +- platform/linux-generic/include/api/odp.h | 2 +- platform/linux-generic/include/api/odp_coremask.h | 188 - platf

[lng-odp] [PATCHv2 2/2] Update tests/examples to use coremasks

2015-01-12 Thread Robbie King
Signed-off-by: Robbie King --- example/generator/odp_generator.c | 48 +-- example/ipsec/odp_ipsec.c | 30 +-- example/l2fwd/odp_l2fwd.c | 43 ++- example/packet/odp_pktio.c

[lng-odp] [PATCHv2 0/2] Convert linux thread/proc helpers to use CPU mask

2015-01-12 Thread Robbie King
Here are the propsed modifcations for ODP 1.0 to coremask and the linux helper routines. v1 - Updated coremask library to use the CPU_xxx libraries directly, renamed APIs to "cpumask" and updated the linux helper routines to take CPU masks instead of a starting CPU and count. Cha

[lng-odp] [PATCHv1 1/2] Convert linux thread/proc helpers to use core mask

2015-01-12 Thread Robbie King
Signed-off-by: Robbie King --- helper/include/odph_linux.h | 28 ++-- platform/linux-generic/Makefile.am| 4 +- platform/linux-generic/include/api/odp.h | 2 +- platform/linux-generic/include/api/odp_coremask.h | 186 - platf

[lng-odp] [PATCHv1 2/2] Update tests/examples to use coremasks

2015-01-12 Thread Robbie King
Signed-off-by: Robbie King --- example/generator/odp_generator.c | 48 +-- example/ipsec/odp_ipsec.c | 30 +-- example/l2fwd/odp_l2fwd.c | 43 ++- example/packet/odp_pktio.c

[lng-odp] [PATCHv1 0/2] Convert linux thread/proc helpers to use CPU mask

2015-01-12 Thread Robbie King
Here are the propsed modifcations for ODP 1.0 to coremask and the linux helper routines. v1 - Updated coremask library to use the CPU_xxx libraries directly, renamed APIs to "cpumask" and updated the linux helper routines to take CPU masks instead of a starting CPU and count. Cha

Re: [lng-odp] [PATCH 2/2] linux-genric: odp_core_mask add ODP_NONNULL

2015-01-12 Thread Mike Holmes
On 12 January 2015 at 18:38, Bill Fischofer wrote: > Shouldn't this wait until the coremask patch is in and then be based on > it, using the new cpumask names? > 1/2 Agree. It is in two parts, the important part is the first patch which can be applied independently, the second is an example giv

Re: [lng-odp] [PATCH 2/2] linux-genric: odp_core_mask add ODP_NONNULL

2015-01-12 Thread Bill Fischofer
Shouldn't this wait until the coremask patch is in and then be based on it, using the new cpumask names? On Mon, Jan 12, 2015 at 3:43 PM, Mike Holmes wrote: > Allow the complier to check for NULL args. > > Signed-off-by: Mike Holmes > --- > platform/linux-generic/include/api/odp_coremask.h | 1

[lng-odp] [PATCH 1/2] api: odp_hints: add ODP_NONNULL attribute

2015-01-12 Thread Mike Holmes
Both gcc and clang can use compiler hints to catch null passed as an argument to a function. This macro allows ODP APIs to take advantage of this feature. Signed-off-by: Mike Holmes --- See also http://clang-analyzer.llvm.org/annotations.html#generic platform/linux-generic/include/api/odp_hint

[lng-odp] [PATCH 0/2] Add ODP_NONNULL

2015-01-12 Thread Mike Holmes
This allows gcc and especially clang to uncover some cases where NULL has been passed in to a function that was not expecting a NULL pointer and does not check for it. https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html http://clang-analyzer.llvm.org/annotations.html#null_checking Mike Ho

[lng-odp] [PATCH 0/2] Add ODP_NONNULL to the ODP API

2015-01-12 Thread Mike Holmes
This allows gcc and especially clang to uncover some cases where NULL has been passed in to a function that was not expecting a NULL pointer and does not check for it. https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html http://clang-analyzer.llvm.org/annotations.html#null_checking Mike Ho

[lng-odp] [PATCH 2/2] linux-genric: odp_core_mask add ODP_NONNULL

2015-01-12 Thread Mike Holmes
Allow the complier to check for NULL args. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_coremask.h | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/platform/linux-generic/include/api/odp_coremask.h b/platform/linux-generic/include/

[lng-odp] [Bug 1056] CID 85397: handle_tmo: Dereference after null check

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1056 --- Comment #3 from Ola Liljedahl --- There was a separate post with the Coverity report on the list as well that I saw later. But I read the list in reverse order (newest first). -- You are receiving this mail because: You are on the CC list for the

[lng-odp] [PATCH] test: timer: relaxed timing checks

2015-01-12 Thread Ola Liljedahl
Don't report too late timeouts using CU_FAIL as this interferes with the cunit test framework. Just count and report (using LOG_DBG) the number of late timeouts. Use CU_ASSERT_FATAL instead of plain assert so to work wither with the cunit test framework. Don't dereference pointer after successful c

Re: [lng-odp] [PATCH 2/2] configure.ac: performance: add tests to make check

2015-01-12 Thread Mike Holmes
Ping On 8 January 2015 at 13:34, Mike Holmes wrote: > Allow the test/performance directory to be optionally included when make > check is run > > Signed-off-by: Mike Holmes > --- > configure.ac | 37 - > test/performance/.gitignore | 2 ++ >

[lng-odp] [PATCH v3 1/2] test: perf: scheduling: remove odp_schedule_one

2015-01-12 Thread Mike Holmes
Signed-off-by: Mike Holmes --- test/performance/odp_scheduling.c | 143 -- 1 file changed, 143 deletions(-) diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index ba7528d..72656c4 100644 --- a/test/performance/odp_scheduling.

[lng-odp] [PATCH v3 2/2] api: schedule: remove odp_schedule_one

2015-01-12 Thread Mike Holmes
For the initial realease this api has been removed from the specification. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_schedule.h | 25 --- platform/linux-generic/odp_schedule.c | 12 --- 2 files changed, 37 deletions(-) diff --g

[lng-odp] [PATCH v3 0/2] Remove odp_shcdule_one

2015-01-12 Thread Mike Holmes
For 1.0 odp_schedule_one has been removed. Mike Holmes (2): test: perf: scheduling: remove odp_schedule_one api: schedule: remove odp_schedule_one platform/linux-generic/include/api/odp_schedule.h | 25 platform/linux-generic/odp_schedule.c | 12 -- test/performance/odp_sc

Re: [lng-odp] [PATCH] linux-generic: buffers: improved buffer allocation

2015-01-12 Thread Bill Fischofer
I don't think bisect was of any particular help or hindrance in this case, especially since the buffer patch as merged was fully bisected (thanks to Taras). The actual problem was in a related file that went in as part of classification rather than the buffer restructure. v2 of the patch follows

Re: [lng-odp] [PATCH] linux-generic: buffers: improved buffer allocation

2015-01-12 Thread Mike Holmes
On 11 January 2015 at 11:58, Bill Fischofer wrote: > The patch wasn't intended as a bug fix, but rather is intended to be a > more refined implementation of the buffer allocator that can permit better > performance scalability testing as we move into 2015. It does have the > effect, however, of

Re: [lng-odp] [PATCH] api: align: move macros to internal

2015-01-12 Thread Bill Fischofer
On Mon, Jan 12, 2015 at 12:43 PM, Mike Holmes wrote: > These macros were in the pubic API but labeled internal. > > Signed-off-by: Mike Holmes > Reviewed-by: Bill Fischofer > --- > platform/linux-generic/include/api/odp_align.h | 44 > -- > .../linux-generic/include/

[lng-odp] [PATCH] api: align: move macros to internal

2015-01-12 Thread Mike Holmes
These macros were in the pubic API but labeled internal. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_align.h | 44 -- .../linux-generic/include/odp_align_internal.h | 28 ++ 2 files changed, 28 insertions(+), 44 deletions(-) diff

Re: [lng-odp] [PATCHv7] validation: synchronizer tests

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 05:33:15PM +, Maxim Uvarov wrote: > On 01/12/2015 08:21 PM, Stuart Haslam wrote: > > On Mon, Jan 12, 2015 at 11:30:24AM +, Mario Torrecillas Rodriguez wrote: > >> This should fix it. Can anyone with a decent number of cores try it out? I > >> only have 2 in my setup,

Re: [lng-odp] Regarding 'atomic' functions

2015-01-12 Thread Mike Holmes
This raises a general president question for ODP and a more specific one. My feeling is that ODP wants to abstract network acceleration capabilities rather than OS features and so leave things like atomics etc to the application if possible. Is that also your view on the change Ola ? Have we hid

[lng-odp] [Bug 1056] CID 85397: handle_tmo: Dereference after null check

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1056 --- Comment #2 from Mike Holmes --- (In reply to Ola Liljedahl from comment #1) > No file & line information and no links to any output from Coverity. > I can only assume thie following code snippet causes the problem: > struct test_timer *ttp

Re: [lng-odp] [PATCH] api: odp_coremask: Improve documentation

2015-01-12 Thread Maxim Uvarov
Merged, Maxim. On 01/03/2015 12:30 AM, Mike Holmes wrote: The output format was not clear, describe the format of the returned string. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_coremask.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generi

Re: [lng-odp] [PATCHv7] validation: synchronizer tests

2015-01-12 Thread Maxim Uvarov
On 01/12/2015 08:21 PM, Stuart Haslam wrote: On Mon, Jan 12, 2015 at 11:30:24AM +, Mario Torrecillas Rodriguez wrote: This should fix it. Can anyone with a decent number of cores try it out? I only have 2 in my setup, and the problem was relatively hard to replicate. Works for me - ran ~10

Re: [lng-odp] [PATCHv7] validation: synchronizer tests

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 11:30:24AM +, Mario Torrecillas Rodriguez wrote: > This should fix it. Can anyone with a decent number of cores try it out? I > only have 2 in my setup, and the problem was relatively hard to replicate. > Works for me - ran ~1000 iterations (on 8 cores) without any iss

Re: [lng-odp] [PATCH] linux-generic: odp_linux: fix memory leak

2015-01-12 Thread Maxim Uvarov
Reviewed and applied. Maxim. On 01/09/2015 09:37 PM, Mike Holmes wrote: This appears to be very significant to linux-generic at least since it fixes all the valgrind issues - review for 0.8.0 ? On 31 December 2014 at 08:28, Mike Holmes > wrote: Store the s

Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Mike Holmes
Agree that if it is in single threaded section we keep the possibility of including more than we want out by not defining POSIX. On 12 January 2015 at 10:47, Maxim Uvarov wrote: > On 01/12/2015 03:22 PM, Ola Liljedahl wrote: > >> strtok() is not thread-safe and thus doesn't seem like a great id

Re: [lng-odp] [PATCH] api: odp_coremask: Fix doxygen list

2015-01-12 Thread Maxim Uvarov
Hm, applied when I saved one more time email to file. Maxim. On 01/12/2015 07:47 PM, Mike Holmes wrote: On 12 January 2015 at 11:17, Maxim Uvarov > wrote: That is already applied as part of: I am not sure what was applied but the problem is still there

Re: [lng-odp] [PATCH] linux-generic: shared mem: Add _POSIX_C_SOURCE 200809L

2015-01-12 Thread Maxim Uvarov
Merged, Maxim. On 01/09/2015 11:17 PM, Mike Holmes wrote: Fixes https://bugs.linaro.org/show_bug.cgi?id=787 Adding _POSIX_C_SOURCE 200809L allows compilation to std=c99 by adding ftruncate from this standard. Signed-off-by: Mike Holmes --- platform/linux-generic/odp_shared_memory.c | 3 +++

Re: [lng-odp] [PATCH] api: odp_coremask: Fix doxygen list

2015-01-12 Thread Mike Holmes
On 12 January 2015 at 11:17, Maxim Uvarov wrote: > That is already applied as part of: > I am not sure what was applied but the problem is still there without this fix http://docs.opendataplane.org/odp/html/group__odp __scheduler.html#gaf205db4597618fcdf1d278da0b320c04 It should not all be on

Re: [lng-odp] [PATCH ARCH] add doxygen_guide_lines

2015-01-12 Thread Anders Roxell
Applied. On 2014-12-17 15:12, Mike Holmes wrote: > Clarify the guide lines around using doxygen to document the ODP API. > > Signed-off-by: Mike Holmes > --- > doxygen_guide_lines.dox | 54 > + > 1 file changed, 54 insertions(+) > create mode 10

Re: [lng-odp] [PATCH ARCH] testing.dox: Add cunit test rules

2015-01-12 Thread Anders Roxell
Applied. On 2014-11-21 14:23, Mike Holmes wrote: > Signed-off-by: Mike Holmes > --- > testing.dox | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/testing.dox b/testing.dox > index 86498f8..3791ebd 100644 > --- a/testing.dox > +++ b/testing.dox > @@ -141,6 +141,13 @@ All suites/t

Re: [lng-odp] [PATCH] api: odp_coremask: Fix doxygen list

2015-01-12 Thread Maxim Uvarov
That is already applied as part of: commit 7fd717d8ffdff7f09e4824a28bedaa9829f80cff Author: Anders Roxell Date: Thu Aug 21 02:03:02 2014 +0200 Move includes back into linux-generic Maxim. On 01/02/2015 10:06 PM, Mike Holmes wrote: Doxygen needs " - " to form a list Signed-off-by: Mik

Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Maxim Uvarov
On 01/12/2015 03:22 PM, Ola Liljedahl wrote: strtok() is not thread-safe and thus doesn't seem like a great idea to use it in a multithreaded application based on ODP. I don't know about this exact usage here, perhaps this argument parsing is always only going to happen in a single thread? parse_

Re: [lng-odp] [PATCH] api: odp_byteorder.h: Define ODP_{BIG, LITTLE}_ENDIAN_BITFIELD according to system's bitfield endianess

2015-01-12 Thread Maxim Uvarov
Merged, thanks! Maxim. On 01/11/2015 01:15 PM, Shmulik Ladkani wrote: ODP_{BIG,LITTLE}_ENDIAN_BITFIELD were always defined, regardless the value of system's __BIG_ENDIAN_BITFIELD and __LITTLE_ENDIAN_BITFIELD. As a result, 'odph_tcphdr_t' bitfields in odph_tcp.h were always arranged as big-endi

Re: [lng-odp] [PATCHv7] linux-generic: fix odp_pktio_inq_remdef

2015-01-12 Thread Stuart Haslam
On Thu, Dec 25, 2014 at 02:25:29PM +, Maxim Uvarov wrote: > Correctly remove queue from packet i/o and remove it from scheduler. > > Signed-off-by: Maxim Uvarov > --- > .../linux-generic/include/odp_queue_internal.h | 11 > platform/linux-generic/odp_packet_io.c | 29

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 02:03:00PM +, Maxim Uvarov wrote: > On 01/08/2015 07:09 PM, Stuart Haslam wrote: > > Create a new linux-generic pktio type ODP_PKTIO_TYPE_LOOPBACK which > > will be used when the "loop" device is opened. A queue is used to > > connect the pktio output queue to the input

Re: [lng-odp] [RFCv1 1/2] Convert linux thread/proc helpers to use core mask

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 15:30, Ola Liljedahl wrote: > On 12 January 2015 at 15:01, Savolainen, Petri (NSN - FI/Espoo) > wrote: >> Hi, >> >> Couple of generic things first: >> >> * After Ola's core->cpu rename patch, odp_coremask is in practice the last >> thing referring to "core" instead of "cpu"

Re: [lng-odp] [RFCv1 1/2] Convert linux thread/proc helpers to use core mask

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 15:01, Savolainen, Petri (NSN - FI/Espoo) wrote: > Hi, > > Couple of generic things first: > > * After Ola's core->cpu rename patch, odp_coremask is in practice the last > thing referring to "core" instead of "cpu". So maybe we should rename > "coremask" to "cpumask" or "cp

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 15:04, Stuart Haslam wrote: > On Mon, Jan 12, 2015 at 01:52:26PM +, Ola Liljedahl wrote: >> On 12 January 2015 at 14:42, Stuart Haslam wrote: >> > On Mon, Jan 12, 2015 at 11:40:54AM +, Savolainen, Petri (NSN - >> > FI/Espoo) wrote: >> >> > >> >> > +static int random

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 01:52:26PM +, Ola Liljedahl wrote: > On 12 January 2015 at 14:42, Stuart Haslam wrote: > > On Mon, Jan 12, 2015 at 11:40:54AM +, Savolainen, Petri (NSN - > > FI/Espoo) wrote: > >> > > >> > +static int random_mac(void *mac_addr, size_t addr_size) > >> > +{ > >> > +

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Maxim Uvarov
On 01/08/2015 07:09 PM, Stuart Haslam wrote: Create a new linux-generic pktio type ODP_PKTIO_TYPE_LOOPBACK which will be used when the "loop" device is opened. A queue is used to connect the pktio output queue to the input queue. Packets sent to the loopback device are classified before making it

Re: [lng-odp] [RFCv1 1/2] Convert linux thread/proc helpers to use core mask

2015-01-12 Thread Savolainen, Petri (NSN - FI/Espoo)
Hi, Couple of generic things first: * After Ola's core->cpu rename patch, odp_coremask is in practice the last thing referring to "core" instead of "cpu". So maybe we should rename "coremask" to "cpumask" or "cpuset". Which would look better odp_cpumask_set() vs. odp_cpuset_set()? E.g. odp_cpu

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 01:15:31PM +, Bala wrote: > > On Thursday 08 January 2015 09:39 PM, Stuart Haslam wrote: > > Create a new linux-generic pktio type ODP_PKTIO_TYPE_LOOPBACK which > > will be used when the "loop" device is opened. A queue is used to > > connect the pktio output queue to t

Re: [lng-odp] [PATCHv7] linux-generic: fix odp_pktio_inq_remdef

2015-01-12 Thread Maxim Uvarov
ping. Maxim. On 12/25/2014 05:25 PM, Maxim Uvarov wrote: Correctly remove queue from packet i/o and remove it from scheduler. Signed-off-by: Maxim Uvarov --- .../linux-generic/include/odp_queue_internal.h | 11 platform/linux-generic/odp_packet_io.c | 29 ++

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 14:42, Stuart Haslam wrote: > On Mon, Jan 12, 2015 at 11:40:54AM +, Savolainen, Petri (NSN - FI/Espoo) > wrote: >> > >> > +static int random_mac(void *mac_addr, size_t addr_size) >> > +{ >> > + uint32_t ethaddr_l, ethaddr_h; >> > + >> > + srand(odp_time_cycles()); >>

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Stuart Haslam
On Mon, Jan 12, 2015 at 11:40:54AM +, Savolainen, Petri (NSN - FI/Espoo) wrote: > > > > +static int random_mac(void *mac_addr, size_t addr_size) > > +{ > > + uint32_t ethaddr_l, ethaddr_h; > > + > > + srand(odp_time_cycles()); > > + ethaddr_h = (rand() & 0xfeff) | 0x0200; > > + ethadd

[lng-odp] [Bug 1035] parse_tcp fails due to ODP_BIG_ENDIAN_BITFIELD being always defined

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1035 --- Comment #3 from Ciprian Barbu --- So the real problem was that parse_tcp failed to properly recognize the header length field in the TCP header. This is what I originally saw when I started bisecting through the commits. The commit I previously in

[lng-odp] [Bug 1035] parse_tcp fails due to ODP_BIG_ENDIAN_BITFIELD being always defined

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1035 Ciprian Barbu changed: What|Removed |Added Summary|buffer pool modification|parse_tcp fails due to |intr

Re: [lng-odp] [PATCH] api: odp_byteorder.h: Define ODP_{BIG, LITTLE}_ENDIAN_BITFIELD according to system's bitfield endianess

2015-01-12 Thread Ciprian Barbu
Oh yes, this solved the issue, thank you! On Mon, Jan 12, 2015 at 7:32 AM, Bala Manoharan wrote: > Thanks Shmulik! > > Reviewed-by: Bala Manoharan Reviewed-and-tested-by: Ciprian Barbu > > On 11 January 2015 at 23:02, Bill Fischofer > wrote: >> >> Thanks! >> >> On Sun, Jan 11, 2015 at 4:15 A

Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Ola Liljedahl
I think so. The man page for strtok_r only states _POSIX_C_SOURC >= 1. On 12 January 2015 at 13:45, Mike Holmes wrote: > I have added _POSIX_C_SOURCE 200809L to one file already - patch on the > list, will that version also cover this ? > > On 12 January 2015 at 07:22, Ola Liljedahl wrote: >> >

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Bala
On Thursday 08 January 2015 09:39 PM, Stuart Haslam wrote: Create a new linux-generic pktio type ODP_PKTIO_TYPE_LOOPBACK which will be used when the "loop" device is opened. A queue is used to connect the pktio output queue to the input queue. Packets sent to the loopback device are classified b

Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Mike Holmes
I have added _POSIX_C_SOURCE 200809L to one file already - patch on the list, will that version also cover this ? On 12 January 2015 at 07:22, Ola Liljedahl wrote: > On 12 January 2015 at 11:50, Ciprian Barbu > wrote: > > Signed-off-by: Ciprian Barbu > > --- > > Fix for https://bugs.linaro.or

Re: [lng-odp] linux-generic timer implementation question

2015-01-12 Thread Ola Liljedahl
Oh crap. It worked on ARMv7 but that one has true support for 64-bit atomics so no need to add a spin lock flag. PPC64 has load-w-reservation/store-conditional *paired* support (like ARM), why doesn't PPC32? On 12 January 2015 at 11:55, Alexandru Badicioiu wrote: > Hi Ola, > I'm trying to get th

Re: [lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 11:50, Ciprian Barbu wrote: > Signed-off-by: Ciprian Barbu > --- > Fix for https://bugs.linaro.org/show_bug.cgi?id=1049 > > example/packet/odp_pktio.c | 29 +++-- > 1 file changed, 15 insertions(+), 14 deletions(-) > > diff --git a/example/packet/odp

Re: [lng-odp] [RFC PATCH] linux-generic: pktio: add loopback device support

2015-01-12 Thread Savolainen, Petri (NSN - FI/Espoo)
> > +static int random_mac(void *mac_addr, size_t addr_size) > +{ > + uint32_t ethaddr_l, ethaddr_h; > + > + srand(odp_time_cycles()); > + ethaddr_h = (rand() & 0xfeff) | 0x0200; > + ethaddr_l = rand(); > + > + snprintf(mac_addr, addr_size, "%02x:%02x:%02x:%02x:%02x:%02x", > +

Re: [lng-odp] [PATCHv7] validation: synchronizer tests

2015-01-12 Thread Mario Torrecillas Rodriguez
This should fix it. Can anyone with a decent number of cores try it out? I only have 2 in my setup, and the problem was relatively hard to replicate. As Bill pointed out, there were two barriers being reinitialised on the go to make them reusable. This accidentally worked fine for the case where t

[lng-odp] [PATCHv7] validation: synchronizer tests

2015-01-12 Thread Mario Torrecillas Rodriguez
First set of synchronizer tests. This patch includes tests for locks, barriers and atomics. Signed-off-by: Mario Torrecillas Rodriguez --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Changes from previous version: Fixed issue with no_barrier_test. test/valid

Re: [lng-odp] [PATCH] api: odp_coremask: Fix doxygen list

2015-01-12 Thread Ciprian Barbu
On Mon, Jan 12, 2015 at 1:04 PM, Ciprian Barbu wrote: > Looks good! > > Reviewed-by: Ciprian Barbu I also tested it > > On Sat, Jan 10, 2015 at 3:08 PM, Mike Holmes wrote: >> ping >> >> On 2 January 2015 at 14:06, Mike Holmes wrote: >>> >>> Doxygen needs " - " to form a list >>> >>> Signed-of

Re: [lng-odp] [PATCH] api: odp_coremask: Fix doxygen list

2015-01-12 Thread Ciprian Barbu
Looks good! Reviewed-by: Ciprian Barbu On Sat, Jan 10, 2015 at 3:08 PM, Mike Holmes wrote: > ping > > On 2 January 2015 at 14:06, Mike Holmes wrote: >> >> Doxygen needs " - " to form a list >> >> Signed-off-by: Mike Holmes >> --- >> platform/linux-generic/include/api/odp_coremask.h | 12

[lng-odp] linux-generic timer implementation question

2015-01-12 Thread Alexandru Badicioiu
Hi Ola, I'm trying to get the linux-generic timer implementation running on my 32-bit platform and I have the following issue: _ODP_STATIC_ASSERT(sizeof(tick_buf_t) == 16, "sizeof(tick_buf_t) == 16"); fails because sizeof(tick_buf_t) is actually larger because of the size of odp_atomic_u64_t (alr

[lng-odp] [Bug 1049] odp_pktio is not C99 Compliant

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1049 Ciprian Barbu changed: What|Removed |Added CC||ciprian.ba...@linaro.org --- Comment #1 from C

[lng-odp] [PATCH] example: pktio: replace strtok_r to make C99 compliant

2015-01-12 Thread Ciprian Barbu
Signed-off-by: Ciprian Barbu --- Fix for https://bugs.linaro.org/show_bug.cgi?id=1049 example/packet/odp_pktio.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index b162fac..0d5918a 1006

Re: [lng-odp] [PATCHv6] validation: synchronizer tests

2015-01-12 Thread Mario Torrecillas Rodriguez
The barrier tests seems to be fine actually, it always either hangs on the no_barrier test, or doesn¹t hang at all. I¹m looking into this now, it might be a design problem rather than a bug in the code. Mario. From: Mike Holmes Date: Friday, 9 January 2015 18:29 To: Bill Fischofer Cc: lng-o

[lng-odp] [Bug 1056] CID 85397: handle_tmo: Dereference after null check

2015-01-12 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1056 --- Comment #1 from Ola Liljedahl --- No file & line information and no links to any output from Coverity. I can only assume thie following code snippet causes the problem: struct test_timer *ttp = odp_timeout_user_ptr(tmo); if (ttp ==

Re: [lng-odp] Regarding 'atomic' functions

2015-01-12 Thread Ola Liljedahl
On 12 January 2015 at 08:54, Prashant Upadhyaya wrote: > Hi, > > > > I am migrating my application code from ODP v0.2 to v0.7 > > In v0.2, there used to be a function like the following – > > odp_atomic_cmpset_u32 > > > > How do I realize the above in v0.7 ? It was decided that the atomic operatio

Re: [lng-odp] [PATCH 1/2] configure.ac: improve help text

2015-01-12 Thread Ciprian Barbu
On Fri, Jan 9, 2015 at 10:44 PM, Mike Holmes wrote: > > > On 9 January 2015 at 09:15, Ciprian Barbu wrote: >> >> On Thu, Jan 8, 2015 at 8:34 PM, Mike Holmes >> wrote: >> > Signed-off-by: Mike Holmes >> > --- >> > configure.ac | 14 +++--- >> > 1 file changed, 7 insertions(+), 7 deletio