Re: [lng-odp] [API-NEXT PATCHv1 1/4] api: classification: add pmr create api

2016-01-29 Thread Bala Manoharan
Okay. I will incorporate these changes in the next version. Regards, Bala On 28 January 2016 at 20:31, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > This is otherwise OK (and exactly the feature I was missing in the call > yesterday), but I'm wondering the

Re: [lng-odp] [PATCH] linux-generic: queue: check invalid handle in odp_queue_destroy

2016-01-29 Thread Maxim Uvarov
Merged, Maxim. On 01/26/2016 14:38, Maxim Uvarov wrote: Avoid seg. fault if invalid handle provided to queue destroy. Reviewed-by: Zoltan Kiss Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_queue.c | 3 +++ 1 file changed, 3

[lng-odp] [Bug 1881] linux-generic/arch does not contain architectures

2016-01-29 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1881 --- Comment #2 from Hongbo Zhang --- patches sent out: https://patches.linaro.org/60241/ https://patches.linaro.org/60242/ https://patches.linaro.org/60243/ https://patches.linaro.org/60244/ -- You are receiving this mail

Re: [lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread Hongbo Zhang
On 29 January 2016 at 17:10, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > >> -Original Message- >> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >> hongbo.zh...@linaro.org >> Sent: Friday, January 29, 2016 10:50 AM >> To:

[lng-odp] [API-NEXT PATCH 1/2] api: stdlib: added odp_memcmp

2016-01-29 Thread Petri Savolainen
Memory compare is a commonly used C library function on data plane applications. This enables using HW offload (e.g. vector unit) for compare operations. Signed-off-by: Petri Savolainen --- include/odp/api/std_clib.h| 18 ++

[lng-odp] [API-NEXT PATCH 2/2] validation: stdlib: add odp_memcmp test

2016-01-29 Thread Petri Savolainen
Added test for memory compare. Signed-off-by: Petri Savolainen --- test/validation/std_clib/std_clib.c | 38 + 1 file changed, 38 insertions(+) diff --git a/test/validation/std_clib/std_clib.c

Re: [lng-odp] Setting MTU

2016-01-29 Thread Savolainen, Petri (Nokia - FI/Espoo)
If two applications share a link (pktio), both can send up to MTU sized frames … and if one of them wants send less than MTU sized frames, it’s free to do that (without forcing the other app to the same limit). From ODP API point of view, MTU is the limit of the local transmit buffer. Whereas

[lng-odp] [API-NEXT PATCH v2 06/11] linux-generic: dpdk: add dpdk_setup_port()

2016-01-29 Thread Matias Elo
Add helper function dpdk_setup_port() for configuring DPDK ports. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/pktio/dpdk.c | 62 - 1 file changed, 41 insertions(+), 21

[lng-odp] [API-NEXT PATCH v2 10/11] linux-generic: dpdk: handle ixgbe_pmd minimum burst size

2016-01-29 Thread Matias Elo
ixgbe_pmd has a minimum supported RX burst size of 4. If less than 4 packets are requested with odp_pktio_recv_queue(), rte_eth_rx_burst() is called with nb_pkts=4 and the possibly received extra packets are cached for the next dpdk_recv_queue() call to use. Reviewed-by: Petri Savolainen

[lng-odp] [API-NEXT PATCH v2 04/11] linux-generic: dpdk: add rx/tx locking

2016-01-29 Thread Matias Elo
Add locking support to dpdk_recv_queue() and dpdk_send_queue(). Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_dpdk.h | 5 + platform/linux-generic/pktio/dpdk.c | 19

[lng-odp] [API-NEXT PATCH 2/3] validation: remove remaining references synchronizers

2016-01-29 Thread Petri Savolainen
Synchronizers suite was split into atomic, lock and barrier suites. Signed-off-by: Petri Savolainen --- test/validation/atomic/atomic.c | 16 test/validation/atomic/atomic.h | 12 ++-- test/validation/barrier/barrier.h | 4 ++--

[lng-odp] [API-NEXT PATCH 1/3] api: atomic: init functions are not atomic

2016-01-29 Thread Petri Savolainen
Highlight that application must ensure that there's no race while calling init functions. Also lock free call will never set op.init flag, since init call will not need to implement locking or other (lock free) synchronization. Signed-off-by: Petri Savolainen ---

[lng-odp] [PATCH v2 API-NEXT 2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for MIPS. Signed-off-by: Hongbo Zhang ---

[lng-odp] [PATCH v2 API-NEXT 1/4] linux-generic: separate x86 ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for x86. Signed-off-by: Hongbo Zhang ---

Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation

2016-01-29 Thread Elo, Matias (Nokia - FI/Espoo)
> -Original Message- > From: EXT Maxim Uvarov [mailto:maxim.uva...@linaro.org] > Sent: Friday, January 29, 2016 1:15 PM > To: Elo, Matias (Nokia - FI/Espoo) ; lng- > o...@lists.linaro.org > Subject: Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation > >

[lng-odp] [PATCH v2 API-NEXT 0/4] separate ODP_CACHE_LINE_SIZE to arch files

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang v1-v2 change: Add macro __OCTEON for patch 2. v1 notes: This is for bug https://bugs.linaro.org/show_bug.cgi?id=1881 This is on top of latest api-next branch because the latest platform/linux-generic/arch/ directory is needed, so I use "API-NEXT"

[lng-odp] [PATCH API-NEXT 4/4] linux-generic: sysinfo clean up for ARM

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang The arch/arm/odp_sysinfo_parse.c is currently a symlink to arch/linux/odp_sysinfo_parse.c, but in fact there should be defferences between them. A separated real arch/arm/odp_sysinfo_parse.c is created for ARM, and the model_str is set to a general

[lng-odp] [PATCH API-NEXT 3/4] linux-generic: use one uniform call systemcpu()

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently there are two systemcpu() functions, one is for some specific platforms and the other is for default dummy, but most of the contents are same except for sysinfo->cache_line_size: one is true data from calling systemcpu_cache_line_size() and

[lng-odp] [PATCH API-NEXT 2/4] linux-generic: systemcpu(): use input parameter instead of global data

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang In the systemcpu() function, odp_global_data.system_info.huge_page_size should be sysinfo->huge_page_size instead, because when systemcpu() is called, the _global_data.system_info is passed as parameter, we should operate the parameter instead of the

Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation

2016-01-29 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > Zoltan Kiss > Sent: Friday, January 29, 2016 2:13 PM > To: Elo, Matias (Nokia - FI/Espoo); EXT Ola Liljedahl > Cc: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [API-NEXT PATCH 00/11]

Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation

2016-01-29 Thread Maxim Uvarov
On 01/28/2016 17:24, Elo, Matias (Nokia - FI/Espoo) wrote: -Original Message- From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT Maxim Uvarov Sent: Thursday, January 28, 2016 3:10 PM To: lng-odp@lists.linaro.org Subject: Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK

[lng-odp] [API-NEXT PATCH v2 03/11] linux-generic: dpdk: add get/set functions for mtu, promisc mode, and capability

2016-01-29 Thread Matias Elo
Add dpdk_mtu_get(), dpdk_promisc_mode_set(), dpdk_promisc_mode_get(), and dpdk_capability() functions. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_dpdk.h | 1 +

[lng-odp] [API-NEXT PATCH v2 05/11] linux-generic: dpdk: add odp_pktio_link_status()

2016-01-29 Thread Matias Elo
Implement odp_pktio_link_status() for dpdk pktio. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/pktio/dpdk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[lng-odp] [API-NEXT PATCH v2 02/11] linux-generic: pktio: initial DPDK pktio implementation

2016-01-29 Thread Matias Elo
Initial implementation of the DPDK pktio type. Initialization code copied from the odp-dpdk branch. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_internal.h| 5 +

[lng-odp] [API-NEXT PATCH v2 08/11] linux-generic: dpdk: add odp_pktio_input_queues_config()

2016-01-29 Thread Matias Elo
Implement odp_pktio_input_queues_config() function and add helper rss_conf_to_hash_proto() for converting odp_pktin_hash_proto_t to struct rte_eth_rss_conf. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo ---

[lng-odp] [API-NEXT PATCH v2 11/11] linux-generic: dpdk: close resources in odp_pktio_close()

2016-01-29 Thread Matias Elo
Free/close open resources in odp_pktio_close(). Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/include/odp_packet_dpdk.h | 1 + platform/linux-generic/pktio/dpdk.c | 19 ++- 2

[lng-odp] [PATCH API-NEXT 0/4] linux-generic sysinfo codes clean-ups

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang This patch set does some architecture clean-ups for linux-generic sysinfo codes. This patch set is based on my previous patch set "separate ODP_CACHE_LINE_SIZE to arch files", so "API-NEXT" is uesed although no API is touched. Hongbo Zhang (4):

[lng-odp] [PATCH API-NEXT 1/4] linux-generic: move CPU info dummy data to generic default file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang The dummy data of cpu_hz_max and model_str are used when platform is unknown or data cannot be acquired, but these variables should be set in function odp_cpuinfo_parser() instead of the systemcpu() which should cover only the cpu_count, huge_page_size

Re: [lng-odp] odp timer thoughts

2016-01-29 Thread Mike Holmes
On 29 January 2016 at 05:16, Ivan Khoronzhuk wrote: > > > On 29.01.16 00:54, Bill Fischofer wrote: > >> This is how you implement timers in HW as well. >> > A separate HW block operates a scan loop that constantly searches for > timers to expire and creates events for

[lng-odp] [API-NEXT PATCH v2 01/11] linux-generic: pktio: add DPDK pktio build support

2016-01-29 Thread Matias Elo
Add initial support for building ODP with DPDK pktio. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- DEPENDENCIES | 54 platform/linux-generic/Makefile.am | 2 +

[lng-odp] [API-NEXT PATCH v2 09/11] linux-generic: dpdk: add odp_pktio_output_queues_config()

2016-01-29 Thread Matias Elo
Implement odp_pktio_output_queues_config() function. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/pktio/dpdk.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[lng-odp] [API-NEXT PATCH v2 07/11] linux-generic: dpdk: add functions for fetching packet input/output queues

2016-01-29 Thread Matias Elo
Implement odp_pktio_in_queues(), odp_pktio_pktin_queues(), and odp_pktio_pktout_queues() functions. Reviewed-by: Petri Savolainen Signed-off-by: Matias Elo --- platform/linux-generic/pktio/dpdk.c | 48 ++--- 1

[lng-odp] [API-NEXT PATCH 3/3] validation: atomic: added lock free op test

2016-01-29 Thread Petri Savolainen
Test atomic_op bit fields and odp_atomic_lock_free_u64(). Signed-off-by: Petri Savolainen --- test/validation/atomic/atomic.c | 107 test/validation/atomic/atomic.h | 1 + 2 files changed, 108 insertions(+) diff --git

[lng-odp] [PATCH v2 API-NEXT 3/4] linux-generic: separate PowerPC ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for PowerPC. The previous arch/powerpc/odp/cpu_arch.h was a symlink to

[lng-odp] [PATCH v2 API-NEXT 4/4] linux-generic: create ARM files and move ARM ODP_CACHE_LINE_SIZE in it

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. And in the legacy codes there was no ARM architecture directory, so this patch create it, the odp_cpu_arch.c

[lng-odp] [API-NEXT PATCH v2 00/11] DPDK pktio implementation

2016-01-29 Thread Matias Elo
V2: - Check the number of mbuf segments in mbuf_to_pkt() (Zoltan Kiss) - Copy DPDK RSS hash to ODP packet header in mbuf_to_pkt() (Zoltan Kiss) - Compare packet length to MTU value in pkt_to_mbuf() and drop too long packets This patch set implements new DPDK pktio type, which operates in the same

Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation

2016-01-29 Thread Zoltan Kiss
On 29/01/16 08:19, Elo, Matias (Nokia - FI/Espoo) wrote: *From:*EXT Ola Liljedahl [mailto:ola.liljed...@linaro.org] *Sent:* Thursday, January 28, 2016 4:39 PM *To:* Elo, Matias (Nokia - FI/Espoo) *Cc:* EXT Zoltan Kiss ; lng-odp@lists.linaro.org

Re: [lng-odp] [PATCH v8 API-NEXT 00/12] Separate CPU info codes into their platform files

2016-01-29 Thread Maxim Uvarov
Merged, api change reviewed by Petri, other change for a long time in the list, all my comments fixed. thank you, Maxim. On 01/27/2016 11:56, hongbo.zh...@linaro.org wrote: From: Hongbo Zhang v7->v8 changes: - use file name odp_cpu_arch.c in this patch set

Re: [lng-odp] [API-NEXT PATCH 2/2 v2] validation: timer: handle early exhaustion of pool

2016-01-29 Thread Maxim Uvarov
Merged, both patches. Maxim. On 01/27/2016 20:36, Zoltan Kiss wrote: As per-thread caches might retain some elements, no particular thread should assume that a certain amount of elements are available at any time. Also, to make the high watermark test reliable we should avoid releasing timers.

[lng-odp] [PATCH API-NEXT 0/4] separate ODP_CACHE_LINE_SIZE to arch files

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang This is for bug https://bugs.linaro.org/show_bug.cgi?id=1881 This is on top of latest api-next branch because the latest platform/linux-generic/arch/ directory is needed, so I use "API-NEXT" tag There should be some check patch warnings for patch 4,

Re: [lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > hongbo.zh...@linaro.org > Sent: Friday, January 29, 2016 10:50 AM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS > ODP_CACHE_LINE_SIZE

[lng-odp] [PATCH API-NEXT 4/4] linux-generic: create ARM files and move ARM ODP_CACHE_LINE_SIZE in it

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. And in the legacy codes there was no ARM architecture directory, so this patch create it, the odp_cpu_arch.c

Re: [lng-odp] odp timer thoughts

2016-01-29 Thread Ivan Khoronzhuk
On 28.01.16 20:31, Maxim Uvarov wrote: I have some thoughts and questions about timer implementation in linux-generic. Current implementation: sigev.sigev_notify = SIGEV_THREAD; sigev.sigev_notify_function = timer_notify; sigev.sigev_value.sival_ptr = tp;

Re: [lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread Bala Manoharan
On 29 January 2016 at 15:40, Hongbo Zhang wrote: > On 29 January 2016 at 17:10, Savolainen, Petri (Nokia - FI/Espoo) > wrote: >> >> >>> -Original Message- >>> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >>>

Re: [lng-odp] [API-NEXT PATCH 0/6] Rename queue types

2016-01-29 Thread Savolainen, Petri (Nokia - FI/Espoo)
I have considered unsched also, but really don’t like that since it would define the queue type by what it is not (instead of what it is). It would be also problematic term, if we’d need to define a third type in the future (e.g. sorted queue, etc). This queue type provides the basic (or

[lng-odp] [PATCH API-NEXT 1/4] linux-generic: separate x86 ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for x86. Signed-off-by: Hongbo Zhang ---

[lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

2016-01-29 Thread hongbo . zhang
From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for MIPS. Signed-off-by: Hongbo Zhang ---

Re: [lng-odp] odp timer thoughts

2016-01-29 Thread Ivan Khoronzhuk
On 28.01.16 20:31, Maxim Uvarov wrote: I have some thoughts and questions about timer implementation in linux-generic. Current implementation: sigev.sigev_notify = SIGEV_THREAD; sigev.sigev_notify_function = timer_notify; sigev.sigev_value.sival_ptr = tp;

Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio implementation

2016-01-29 Thread Elo, Matias (Nokia - FI/Espoo)
From: EXT Ola Liljedahl [mailto:ola.liljed...@linaro.org] Sent: Thursday, January 28, 2016 4:39 PM To: Elo, Matias (Nokia - FI/Espoo) Cc: EXT Zoltan Kiss ; lng-odp@lists.linaro.org Subject: Re: [lng-odp] [API-NEXT PATCH 00/11] DPDK pktio

Re: [lng-odp] odp timer thoughts

2016-01-29 Thread Ivan Khoronzhuk
On 29.01.16 00:54, Bill Fischofer wrote: This is how you implement timers in HW as well. A separate HW block operates a scan loop that constantly searches for timers to expire and creates events for those who do. The rest of the system operates undisturbed. For a SW analog in manycore

Re: [lng-odp] [RFC API-NEXT PATCH 2/2] api: cpu: add routines for obtaining socket ids

2016-01-29 Thread Zoltan Kiss
On 29/01/16 02:44, Bill Fischofer wrote: Add odp_cpu_socket_id() and odp_cpu_socket_id_cpu() routines Signed-off-by: Bill Fischofer --- include/odp/api/cpu.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/odp/api/cpu.h

Re: [lng-odp] Setting MTU

2016-01-29 Thread Zoltan Kiss
On 29/01/16 08:26, Savolainen, Petri (Nokia - FI/Espoo) wrote: If two applications share a link (pktio), A diverging question, but: how does that work? Who calls odp_init_global()? Who calls pktio_open? And how do they share the same pktio? both can send up to MTU sized frames … and

Re: [lng-odp] [API-NEXT PATCH 0/6] Rename queue types

2016-01-29 Thread Bill Fischofer
Thanks for the further explanation. Yes, UNSCHED implies a dichotomy that may be limiting. I guess the real distinction is that certain queues are managed by ODP while others are managed by the application itself (alternately, queues are either system managed, with various ODP-defined

Re: [lng-odp] [API-NEXT PATCHv5 6/6] documentation: userguide: add packet processing description

2016-01-29 Thread Mike Holmes
On 28 January 2016 at 10:05, Bill Fischofer wrote: > Signed-off-by: Bill Fischofer > Reviewed-by Mike Holmes > --- > doc/users-guide/users-guide.adoc | 121 > +++ > 1 file

Re: [lng-odp] Setting MTU

2016-01-29 Thread Bill Fischofer
You can always pretend the MTU is smaller than it actually is and do segmenting yourself, however this defeats the purpose of Large Segment Offload (LSO), which is a key HW offload capability of most modern I/O interfaces. With LSO the application can send arbitrary sized packets (up to at least

Re: [lng-odp] [RFC API-NEXT PATCH 2/2] api: cpu: add routines for obtaining socket ids

2016-01-29 Thread Bill Fischofer
We'll be discussing this RFC on Monday's ARCH call. I'm certainly open to adding this if it's deemed useful. I do note that DPDK defines SOCK_ID_ANY to be -1 so I'd like to minimize translation overhead for odp-dpdk in this area as well. On Fri, Jan 29, 2016 at 10:27 AM, Zoltan Kiss