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 >> wrote: >> >> Signed-off-by: Nicolas Morey-Chaisemartin > > >> --- >> includ

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 allocated from. >> @@ -86,6 +103,17 @@ odp_packet_t odp_packet_al

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/30/2015 12:22 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: lng-odp@lists.linaro.org >> Subject: [l

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 o

Re: [lng-odp] [API-NEXT PATCHv3 4/4] validation: packet: test packet reference count

2015-10-05 Thread Nicolas Morey-Chaisemartin
On 09/16/2015 09:53 AM, Maxim Uvarov wrote: > + pkt_ref = odp_packet_create_ref(pkt); > + /* Handles should be different */ > + CU_ASSERT(pkt != pkt_ref); > + /* Debug print also should have refcount bits */ > + CU_ASSERT(odp_packet_to_u64(pkt) != > + odp_packet_

[lng-odp] FW: [PATCH] example:packet: Add pktio start in burst Mode.

2015-10-05 Thread Agarwal Nikhil Agarwal
Ping. > -Original Message- > From: nikhil.agar...@freescale.com [mailto:nikhil.agar...@freescale.com] > Sent: Wednesday, September 30, 2015 12:23 PM > To: lng-odp@lists.linaro.org > Cc: Agarwal Nikhil-B38457 > Subject: [PATCH] example:packet: Add pktio start in burst Mode. > > From: Nikhi

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

2015-10-05 Thread Bill Fischofer
The checks are there to avoid buffer overruns. Whether or not the copies make sense is an application responsibility. On Monday, October 5, 2015, Nicolas Morey-Chaisemartin wrote: > > > On 10/01/2015 05:05 PM, Bill Fischofer wrote: > > odp_packet_copy() can copy between pools, which may have dif

Re: [lng-odp] [API-NEXT PATCHv3 4/4] validation: packet: test packet reference count

2015-10-05 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > Nicolas Morey-Chaisemartin > Sent: Monday, October 05, 2015 11:59 AM > To: Maxim Uvarov; lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [API-NEXT PATCHv3 4/4] validation: packet: test > pack

Re: [lng-odp] [API-NEXT] api: pktio: add input and output modes to make pktio one way

2015-10-05 Thread Savolainen, Petri (Nokia - FI/Espoo)
Reviewed-by: Petri Savolainen > -Original Message- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > Nicolas Morey-Chaisemartin > Sent: Wednesday, September 23, 2015 10:44 AM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [API-NEXT] api: pktio: add input an

Re: [lng-odp] [PATCH] example:packet: Add pktio start in burst Mode.

2015-10-05 Thread Maxim Uvarov
Merged, Maxim. On 09/30/15 09:53, nikhil.agar...@freescale.com wrote: From: Nikhil Agarwal default state of pktio interface after odp_pktio_open is disabled. Need to enable the interface befaore using it. Seems like it has been missed for burst mode. Signed-off-by: Nikhil Agarwal --- examp

Re: [lng-odp] [API-NEXT] api: pktio: add input and output modes to make pktio one way

2015-10-05 Thread Maxim Uvarov
Merged, Maxim. On 10/05/15 13:55, Savolainen, Petri (Nokia - FI/Espoo) wrote: Reviewed-by: Petri Savolainen -Original Message- From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT Nicolas Morey-Chaisemartin Sent: Wednesday, September 23, 2015 10:44 AM To: lng-odp@l

Re: [lng-odp] [API-NEXT PATCHv3 4/4] validation: packet: test packet reference count

2015-10-05 Thread Maxim Uvarov
On 10/05/15 13:25, 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: Monday, October 05, 2015 11:59 AM To: Maxim Uvarov; lng-odp@lists.linaro.org Subject: Re: [lng-odp] [

Re: [lng-odp] [PATCHv2 1/2] example:generator : Fix data race condition

2015-10-05 Thread Maxim Uvarov
please update patch to the latest master. Thanks, Maxim. On 10/02/15 13:39, ion.grig...@freescale.com wrote: From: Grigore Ion The counters.seq counter is used to check if the configured number of packets was processed. There is a race condition between the counter incrementation time and its

Re: [lng-odp] [PATCHv2 2/2] example:generator : Fix UDP checksum computation

2015-10-05 Thread Maxim Uvarov
Merged, Maxim. On 10/02/15 13:39, ion.grig...@freescale.com wrote: From: Grigore Ion The UDP checksum is computed in the CPU endianness. The returned result must be converted to the BE ordering when it is used to update the UDP checksum in a packet. Signed-off-by: Grigore Ion --- v2: - A

Re: [lng-odp] [API-NEXT PATCHv3 4/4] validation: packet: test packet reference count

2015-10-05 Thread Nicolas Morey-Chaisemartin
With both these asserts remove, it's good for me. Nicolas On 10/05/2015 01:26 PM, Maxim Uvarov wrote: > On 10/05/15 13:25, Savolainen, Petri (Nokia - FI/Espoo) wrote: >>> -Original Message- >>> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >>> Nicolas Morey-Chai

[lng-odp] [API-NEXT PATCH] api: pktio: improve pktio_start and stop documentation

2015-10-05 Thread Petri Savolainen
Improved documentation of open, start and stop calls. Signed-off-by: Petri Savolainen --- include/odp/api/packet_io.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index d8e69ed..f6227c6 100644 --- a/include/odp/api

[lng-odp] [API-NEXT PATCH 0/2] linux-generic: cpu: fix cycle lost while cycle counter overflow

2015-10-05 Thread Ivan Khoronzhuk
This series fixes cycle lost while counter overflow. First patch move diff function in one place. Second corrects diff function. Based on api-next as it corrects new cpu cycle api. Ivan Khoronzhuk (2): linux-generic: use cycles_diff for time API also linux-generic: cpu: fix cycle lost while c

[lng-odp] [API-NEXT PATCH 1/2] linux-generic: use cycles_diff for time API also

2015-10-05 Thread Ivan Khoronzhuk
Currently, time API reuses cpu API to get ticks, but uses it's own function to count diff but it can differ from cpu diff function. So, better to use the same function in order to eliminate possible difference in counting. Signed-off-by: Ivan Khoronzhuk --- platform/linux-generic/Makefile.am

[lng-odp] [API-NEXT PATCH 2/2] linux-generic: cpu: fix cycle lost while cycle counter overflow

2015-10-05 Thread Ivan Khoronzhuk
When counter reaches it's counter value, the next clock cycle will cause it to roll over to zero. As result the counter spends 1 additional cycle to switch from UINT64_MAX to 0, it should be taken into account with diff function. Signed-off-by: Ivan Khoronzhuk --- platform/linux-generic/include/

[lng-odp] robust destroy queue design

2015-10-05 Thread Ola Liljedahl
The application wants to destroy a scheduled queue in order to perform a clean termination. The below scheme makes the application responsible for all synchronisation. The only requirements on ODP are that it can destroy empty queues and that it does not have any side effects on calls that fail (t

[lng-odp] [PATCH v2 0/4] netmap pktio

2015-10-05 Thread Matias Elo
Netmap pktio uses the same socket helper functions as the existing socket pktio types. Due to this a common mac_addr_get_fd function was added. V2: - Moved netmap configure options under platform/linux-generic/m4/odp_netmap.m4 (Nicolas Morey-Chaisemartin) - Removed dummy netmap_open function and

[lng-odp] [PATCH v2 1/4] linux-generic: pktio: added mac_addr_get_fd

2015-10-05 Thread Matias Elo
Added a common method for fetching interface MAC address from packet socket. Use common method in socket and socket_mmap. Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_socket.h | 5 +++ platform/linux-generic/pktio/socket.c | 36 -- pla

[lng-odp] [PATCH v2 4/4] DEPENDENCIES: add netmap pktio install instructions

2015-10-05 Thread Matias Elo
Added netmap pktio installation instructions. Signed-off-by: Matias Elo --- DEPENDENCIES | 84 +--- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 852beeb..51951d7 100644 --- a/DEPENDENCIES

[lng-odp] [PATCH v2 3/4] linux-generic: pktio: add netmap pktio support

2015-10-05 Thread Matias Elo
Added new netmap pktio interface type which operates in the same manner as the existing socket io interfaces. The code is based on the odp-netmap branch. Using netmap io requires netmap headers and loaded netmap kernel module. Netmap can be installed from https://github.com/luigirizzo/netmap. ODP

[lng-odp] [PATCH v2 2/4] linux-generic: pktio: use ticket lock in pktio_entry

2015-10-05 Thread Matias Elo
Use ticket locks in pktio entries to prevent threads from being starved. Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_io_internal.h | 3 ++- platform/linux-generic/odp_packet_io.c | 11 ++- 2 files changed, 8 insertions(+), 6 deletions(-) dif

Re: [lng-odp] robust destroy queue design

2015-10-05 Thread Bill Fischofer
I think one of the issues is that the application may not have explicitly allocated queues that are feeding it (this was the main reason I wanted to revise the original definition of the ordered lock APIs). So it might be better to try to come up with some general "quiesce and notify" type API tha