Re: [lng-odp] [PATCH 00/15] Event introduction

2015-01-17 Thread Taras Kondratiuk
On 01/16/2015 05:39 PM, Ola Dahl wrote:
> I am wondering why odp_buffer_t is still around, when it is supposed to
> be replaced by odp_event_t?

It is for ODP_EVENT_BUFFER (previously ODP_BUFFER_TYPE_RAW) type of
odp_event_t.

-- 
Taras Kondratiuk

___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 2/3] validation: buffer: fix for the use of cached return value of odp_packet_last_seg

2015-01-17 Thread Taras Kondratiuk
On 01/17/2015 01:29 PM, Jerin Jacob wrote:
> odp_packet_seg_t is an opaque type, based on the implementation, the return
> value of odp_packet_last_seg can be changed after headroom/tailroom push/pull
> operation.

No. By definition headroom/tailroom push/pull operations don't change
segmentation. So the last segment must remain the same.

> 
> Signed-off-by: Jerin Jacob 
> ---
>  test/validation/buffer/odp_packet_test.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/test/validation/buffer/odp_packet_test.c 
> b/test/validation/buffer/odp_packet_test.c
> index b6fa028..7c2b169 100644
> --- a/test/validation/buffer/odp_packet_test.c
> +++ b/test/validation/buffer/odp_packet_test.c
> @@ -289,6 +289,9 @@ static void _verify_tailroom_shift(odp_packet_t pkt,
>   tail = odp_packet_pull_tail(pkt, -shift);
>   }
>  
> + seg = odp_packet_last_seg(pkt);
> + CU_ASSERT(seg != ODP_SEGMENT_INVALID);
> +
>   CU_ASSERT(tail != NULL);
>   CU_ASSERT(odp_packet_seg_data_len(pkt, seg) == seg_data_len + shift);
>   CU_ASSERT(odp_packet_len(pkt) == pkt_data_len + shift);
> 


-- 
Taras Kondratiuk

___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 1/3] validation: buffer: check the return value of odp_packet_l?_offset_set

2015-01-17 Thread Taras Kondratiuk
On 01/17/2015 01:29 PM, Jerin Jacob wrote:
> Signed-off-by: Jerin Jacob 
> ---
>  test/validation/buffer/odp_packet_test.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Reviewed-by: Taras Kondratiuk 

-- 
Taras Kondratiuk

___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 2/3] validation: buffer: fix for the use of cached return value of odp_packet_last_seg

2015-01-17 Thread Bill Fischofer
On Sat, Jan 17, 2015 at 5:29 AM, Jerin Jacob  wrote:

> odp_packet_seg_t is an opaque type, based on the implementation, the return
> value of odp_packet_last_seg can be changed after headroom/tailroom
> push/pull
> operation.
>
> Signed-off-by: Jerin Jacob 
>

Reviewed-by: Bill Fischofer 


> ---
>  test/validation/buffer/odp_packet_test.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/test/validation/buffer/odp_packet_test.c
> b/test/validation/buffer/odp_packet_test.c
> index b6fa028..7c2b169 100644
> --- a/test/validation/buffer/odp_packet_test.c
> +++ b/test/validation/buffer/odp_packet_test.c
> @@ -289,6 +289,9 @@ static void _verify_tailroom_shift(odp_packet_t pkt,
> tail = odp_packet_pull_tail(pkt, -shift);
> }
>
> +   seg = odp_packet_last_seg(pkt);
> +   CU_ASSERT(seg != ODP_SEGMENT_INVALID);
> +
> CU_ASSERT(tail != NULL);
> CU_ASSERT(odp_packet_seg_data_len(pkt, seg) == seg_data_len +
> shift);
> CU_ASSERT(odp_packet_len(pkt) == pkt_data_len + shift);
> --
> 1.9.3
>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 1/3] validation: buffer: check the return value of odp_packet_l?_offset_set

2015-01-17 Thread Bill Fischofer
On Sat, Jan 17, 2015 at 5:29 AM, Jerin Jacob  wrote:

> Signed-off-by: Jerin Jacob 
>

Reviewed-by: Bill Fischofer 


> ---
>  test/validation/buffer/odp_packet_test.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/test/validation/buffer/odp_packet_test.c
> b/test/validation/buffer/odp_packet_test.c
> index d073b49..b6fa028 100644
> --- a/test/validation/buffer/odp_packet_test.c
> +++ b/test/validation/buffer/odp_packet_test.c
> @@ -167,11 +167,15 @@ static void packet_layer_offsets(void)
> const uint32_t l2_off = 2;
> const uint32_t l3_off = l2_off + 14;
> const uint32_t l4_off = l3_off + 14;
> +   int ret;
>
> /* Set offsets to the same value */
> -   odp_packet_l2_offset_set(pkt, l2_off);
> -   odp_packet_l3_offset_set(pkt, l2_off);
> -   odp_packet_l4_offset_set(pkt, l2_off);
> +   ret = odp_packet_l2_offset_set(pkt, l2_off);
> +   CU_ASSERT(ret == 0);
> +   ret = odp_packet_l3_offset_set(pkt, l2_off);
> +   CU_ASSERT(ret == 0);
> +   ret = odp_packet_l4_offset_set(pkt, l2_off);
> +   CU_ASSERT(ret == 0);
>
> /* Addresses should be the same */
> l2_addr = odp_packet_l2_ptr(pkt, &seg_len);
> --
> 1.9.3
>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] odp_packet API queries

2015-01-17 Thread Bill Fischofer
Application-visible sizes refer to application-visible data.  Metadata is
always implementation-specific and not included in such counts.  Metadata
is "off books" data that is associated with the packet but is not part of
any addressable packet storage. The advantage of having a packet object is
that the packet APIs can refer to the packet independent of any
implementation and not to how the packet may be represented in storage on a
particular platform.

Trying to reason about buffers that are used to store packet data is
inherently non-portable and should be discouraged. Hopefully the switch to
events will help move us in that direction since packets are no longer a
type of buffer using the new nomenclature.

On Sat, Jan 17, 2015 at 5:52 AM, Jacob, Jerin <
jerin.ja...@caviumnetworks.com> wrote:

> Some odp_packet API queries based on exiting odp packet unit test case,
>
> 1) In exiting odp packet unit test case, In order to create one full
> length packet in one segment,
> We have used following formula,
> packet_len = ODP_CONFIG_PACKET_BUF_LEN_MIN - ODP_CONFIG_PACKET_HEADROOM -
> ODP_CONFIG_PACKET_TAILROOM;
>
> This may not be valid in all platform if the packet segment has segment
> specific meta data.
> I think, we need to create either new ODP_CONFIG to define the default
> packet size
> or odp_packet_alloc of len == 0 can be used to create default packet size.
>
> 2) If buffer is NOT aware of segmentation then odp_buffer_size(buf) of
> packet should be ODP_CONFIG_PACKET_BUF_LEN_MIN
> instead of odp_buffer_size(buf) == odp_packet_buf_len(pkt)) .
>
> Any thoughts ?
>
> - Jerin
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 3/3] validation: buffer: enable packet validation test to run on SW emulated odp packet pool on HW

2015-01-17 Thread Bill Fischofer
Wouldn't platforms that implement virtual packet pools also implement
virtual allocation limits?  Otherwise how would you prevent one logical
pool from consuming the entire physical pool?  In this case it would seem
the check would still be valid since the pool_ids are different independent
of how the pools are implemented.

On Sat, Jan 17, 2015 at 5:29 AM, Jerin Jacob  wrote:

> If a platform is limited to one HW packet pool then odp implementation
> can implement the virtual odp packet pools using same the HW packet
> pool(if the block size is same)
> In this specific test case has created a packet buffer pool on init with
> 100 buffers
> and later a packet buffer pool of one buffer. So in this specific case
> assumption of later pool
> have only one buffer is not valid.
>
> Signed-off-by: Jerin Jacob 
> ---
>  test/validation/buffer/odp_packet_test.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/test/validation/buffer/odp_packet_test.c
> b/test/validation/buffer/odp_packet_test.c
> index 7c2b169..86b6a04 100644
> --- a/test/validation/buffer/odp_packet_test.c
> +++ b/test/validation/buffer/odp_packet_test.c
> @@ -58,8 +58,6 @@ static void packet_alloc_free(void)
> packet = odp_packet_alloc(pool, packet_len);
> CU_ASSERT_FATAL(packet != ODP_PACKET_INVALID);
> CU_ASSERT(odp_packet_len(packet) == packet_len);
> -   /** @todo: is it correct to assume the pool had only one buffer? */
> -   CU_ASSERT_FATAL(odp_packet_alloc(pool, packet_len) ==
> ODP_PACKET_INVALID)
>
> odp_packet_free(packet);
>
> --
> 1.9.3
>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 00/15] Event introduction

2015-01-17 Thread Bill Fischofer
In the new model no buffers are queueable.  Only events are queueable.
Events can contain buffers, packets, timeouts, etc., but are logically
distinct from them as they are the queueable/schedulable entity.

On Sat, Jan 17, 2015 at 6:16 AM, Jerin Jacob  wrote:

> On Thu, Jan 15, 2015 at 05:40:08PM +0200, Petri Savolainen wrote:
> > This patches introduces odp_event_t and replaces with that the usage of
> > odp_buffer_t as the super class for other "buffer types". What used to
> be a
> > buffer type is now an event type.
>
> Should we also introduce a new buffer type that NOT queueable to odp_queue
> ?
> If some application is using the buffers only for the storage then I think
> this
> new type make sense as queueable buffers will take more resources and
> additional meta data(for hardware buffer schedule manager)
>
>
> >
> > There are some lines over 80 char, since those are caused by temporary
> > event <-> buffer, packet -> event -> buffer conversions and should be
> cleaned up
> > from the implementation anyway.
> >
> > Petri Savolainen (15):
> >   api: event: Add odp_event_t
> >   api: event: odp_schedule and odp_queue_enq
> >   api: event: schedule_multi and queue_enq_multi
> >   api: event: odp_queue_deq
> >   api: event: odp_queue_deq_multi
> >   api: buffer: Removed odp_buffer_type
> >   api: packet: Removed odp_packet_to_buffer
> >   api: packet: Removed odp_packet_from_buffer
> >   api: timer: Use odp_event_t instead of odp_buffer_t
> >   api: crypto: Use odp_event_t instead of odp_buffer_t
> >   linux-generic: crypto: Use packet alloc for packet
> >   api: buffer_pool: Rename odp_buffer_pool.h to odp_pool.h
> >   api: pool: Rename pool params and remove buffer types
> >   api: pool: Rename odp_buffer_pool_ to odp_pool_
> >   api: config: Renamed ODP_CONFIG_BUFFER_POOLS
> >
> >  example/generator/odp_generator.c  |  38 ++---
> >  example/ipsec/odp_ipsec.c  |  70 
> >  example/ipsec/odp_ipsec_cache.c|   4 +-
> >  example/ipsec/odp_ipsec_cache.h|   2 +-
> >  example/ipsec/odp_ipsec_loop_db.c  |   2 +-
> >  example/ipsec/odp_ipsec_loop_db.h  |  12 +-
> >  example/ipsec/odp_ipsec_stream.c   |  20 +--
> >  example/ipsec/odp_ipsec_stream.h   |   2 +-
> >  example/l2fwd/odp_l2fwd.c  |  28 +--
> >  example/packet/odp_pktio.c |  28 +--
> >  example/timer/odp_timer_test.c |  64 +++
> >  platform/linux-generic/Makefile.am |   4 +-
> >  platform/linux-generic/include/api/odp.h   |   3 +-
> >  platform/linux-generic/include/api/odp_buffer.h|  40 +++--
> >  .../linux-generic/include/api/odp_buffer_pool.h| 177
> ---
> >  .../linux-generic/include/api/odp_classification.h |   2 +-
> >  platform/linux-generic/include/api/odp_config.h|   4 +-
> >  platform/linux-generic/include/api/odp_crypto.h|  16 +-
> >  platform/linux-generic/include/api/odp_event.h |  59 +++
> >  platform/linux-generic/include/api/odp_packet.h|  29 ++--
> >  platform/linux-generic/include/api/odp_packet_io.h |   4 +-
> >  .../linux-generic/include/api/odp_platform_types.h |  10 +-
> >  platform/linux-generic/include/api/odp_pool.h  | 189
> +
> >  platform/linux-generic/include/api/odp_queue.h |  32 ++--
> >  platform/linux-generic/include/api/odp_schedule.h  |  32 ++--
> >  platform/linux-generic/include/api/odp_timer.h |  56 +++---
> >  .../linux-generic/include/odp_buffer_inlines.h |   6 +-
> >  .../linux-generic/include/odp_buffer_internal.h|  20 ++-
> >  .../include/odp_buffer_pool_internal.h |  22 +--
> >  .../linux-generic/include/odp_crypto_internal.h|   2 +-
> >  .../linux-generic/include/odp_packet_internal.h|   8 +-
> >  platform/linux-generic/include/odp_packet_socket.h |  10 +-
> >  platform/linux-generic/odp_buffer.c|  12 +-
> >  platform/linux-generic/odp_buffer_pool.c   | 133 +++
> >  platform/linux-generic/odp_crypto.c|  29 ++--
> >  platform/linux-generic/odp_event.c |  19 +++
> >  platform/linux-generic/odp_packet.c|  34 ++--
> >  platform/linux-generic/odp_packet_io.c |  14 +-
> >  platform/linux-generic/odp_packet_socket.c |  10 +-
> >  platform/linux-generic/odp_queue.c |  18 +-
> >  platform/linux-generic/odp_schedule.c  |  48 +++---
> >  platform/linux-generic/odp_timer.c |  35 ++--
> >  test/performance/odp_scheduling.c  | 105 +++-
> >  43 files changed, 806 insertions(+), 646 deletions(-)
> >  delete mode 100644 platform/linux-generic/include/api/odp_buffer_pool.h
> >  create mode 100644 platform/linux-generic/include/api/odp_event.h
> >  create mode 100644 platform/linux-generic/include/api/odp_pool.h

Re: [lng-odp] [PATCH 00/15] Event introduction

2015-01-17 Thread Jerin Jacob
On Thu, Jan 15, 2015 at 05:40:08PM +0200, Petri Savolainen wrote:
> This patches introduces odp_event_t and replaces with that the usage of
> odp_buffer_t as the super class for other "buffer types". What used to be a
> buffer type is now an event type.

Should we also introduce a new buffer type that NOT queueable to odp_queue ?
If some application is using the buffers only for the storage then I think this
new type make sense as queueable buffers will take more resources and 
additional meta data(for hardware buffer schedule manager)


> 
> There are some lines over 80 char, since those are caused by temporary
> event <-> buffer, packet -> event -> buffer conversions and should be cleaned 
> up
> from the implementation anyway.
> 
> Petri Savolainen (15):
>   api: event: Add odp_event_t
>   api: event: odp_schedule and odp_queue_enq
>   api: event: schedule_multi and queue_enq_multi
>   api: event: odp_queue_deq
>   api: event: odp_queue_deq_multi
>   api: buffer: Removed odp_buffer_type
>   api: packet: Removed odp_packet_to_buffer
>   api: packet: Removed odp_packet_from_buffer
>   api: timer: Use odp_event_t instead of odp_buffer_t
>   api: crypto: Use odp_event_t instead of odp_buffer_t
>   linux-generic: crypto: Use packet alloc for packet
>   api: buffer_pool: Rename odp_buffer_pool.h to odp_pool.h
>   api: pool: Rename pool params and remove buffer types
>   api: pool: Rename odp_buffer_pool_ to odp_pool_
>   api: config: Renamed ODP_CONFIG_BUFFER_POOLS
> 
>  example/generator/odp_generator.c  |  38 ++---
>  example/ipsec/odp_ipsec.c  |  70 
>  example/ipsec/odp_ipsec_cache.c|   4 +-
>  example/ipsec/odp_ipsec_cache.h|   2 +-
>  example/ipsec/odp_ipsec_loop_db.c  |   2 +-
>  example/ipsec/odp_ipsec_loop_db.h  |  12 +-
>  example/ipsec/odp_ipsec_stream.c   |  20 +--
>  example/ipsec/odp_ipsec_stream.h   |   2 +-
>  example/l2fwd/odp_l2fwd.c  |  28 +--
>  example/packet/odp_pktio.c |  28 +--
>  example/timer/odp_timer_test.c |  64 +++
>  platform/linux-generic/Makefile.am |   4 +-
>  platform/linux-generic/include/api/odp.h   |   3 +-
>  platform/linux-generic/include/api/odp_buffer.h|  40 +++--
>  .../linux-generic/include/api/odp_buffer_pool.h| 177 ---
>  .../linux-generic/include/api/odp_classification.h |   2 +-
>  platform/linux-generic/include/api/odp_config.h|   4 +-
>  platform/linux-generic/include/api/odp_crypto.h|  16 +-
>  platform/linux-generic/include/api/odp_event.h |  59 +++
>  platform/linux-generic/include/api/odp_packet.h|  29 ++--
>  platform/linux-generic/include/api/odp_packet_io.h |   4 +-
>  .../linux-generic/include/api/odp_platform_types.h |  10 +-
>  platform/linux-generic/include/api/odp_pool.h  | 189 
> +
>  platform/linux-generic/include/api/odp_queue.h |  32 ++--
>  platform/linux-generic/include/api/odp_schedule.h  |  32 ++--
>  platform/linux-generic/include/api/odp_timer.h |  56 +++---
>  .../linux-generic/include/odp_buffer_inlines.h |   6 +-
>  .../linux-generic/include/odp_buffer_internal.h|  20 ++-
>  .../include/odp_buffer_pool_internal.h |  22 +--
>  .../linux-generic/include/odp_crypto_internal.h|   2 +-
>  .../linux-generic/include/odp_packet_internal.h|   8 +-
>  platform/linux-generic/include/odp_packet_socket.h |  10 +-
>  platform/linux-generic/odp_buffer.c|  12 +-
>  platform/linux-generic/odp_buffer_pool.c   | 133 +++
>  platform/linux-generic/odp_crypto.c|  29 ++--
>  platform/linux-generic/odp_event.c |  19 +++
>  platform/linux-generic/odp_packet.c|  34 ++--
>  platform/linux-generic/odp_packet_io.c |  14 +-
>  platform/linux-generic/odp_packet_socket.c |  10 +-
>  platform/linux-generic/odp_queue.c |  18 +-
>  platform/linux-generic/odp_schedule.c  |  48 +++---
>  platform/linux-generic/odp_timer.c |  35 ++--
>  test/performance/odp_scheduling.c  | 105 +++-
>  43 files changed, 806 insertions(+), 646 deletions(-)
>  delete mode 100644 platform/linux-generic/include/api/odp_buffer_pool.h
>  create mode 100644 platform/linux-generic/include/api/odp_event.h
>  create mode 100644 platform/linux-generic/include/api/odp_pool.h
>  create mode 100644 platform/linux-generic/odp_event.c
> 
> -- 
> 2.2.2
> 
> 
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] odp_packet API queries

2015-01-17 Thread Jacob, Jerin
Some odp_packet API queries based on exiting odp packet unit test case,

1) In exiting odp packet unit test case, In order to create one full length 
packet in one segment,
We have used following formula,
packet_len = ODP_CONFIG_PACKET_BUF_LEN_MIN - ODP_CONFIG_PACKET_HEADROOM -
ODP_CONFIG_PACKET_TAILROOM;

This may not be valid in all platform if the packet segment has segment 
specific meta data.
I think, we need to create either new ODP_CONFIG to define the default packet 
size 
or odp_packet_alloc of len == 0 can be used to create default packet size.

2) If buffer is NOT aware of segmentation then odp_buffer_size(buf) of 
packet should be ODP_CONFIG_PACKET_BUF_LEN_MIN
instead of odp_buffer_size(buf) == odp_packet_buf_len(pkt)) .

Any thoughts ?

- Jerin
___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH 1/3] validation: buffer: check the return value of odp_packet_l?_offset_set

2015-01-17 Thread Jerin Jacob
Signed-off-by: Jerin Jacob 
---
 test/validation/buffer/odp_packet_test.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/validation/buffer/odp_packet_test.c 
b/test/validation/buffer/odp_packet_test.c
index d073b49..b6fa028 100644
--- a/test/validation/buffer/odp_packet_test.c
+++ b/test/validation/buffer/odp_packet_test.c
@@ -167,11 +167,15 @@ static void packet_layer_offsets(void)
const uint32_t l2_off = 2;
const uint32_t l3_off = l2_off + 14;
const uint32_t l4_off = l3_off + 14;
+   int ret;
 
/* Set offsets to the same value */
-   odp_packet_l2_offset_set(pkt, l2_off);
-   odp_packet_l3_offset_set(pkt, l2_off);
-   odp_packet_l4_offset_set(pkt, l2_off);
+   ret = odp_packet_l2_offset_set(pkt, l2_off);
+   CU_ASSERT(ret == 0);
+   ret = odp_packet_l3_offset_set(pkt, l2_off);
+   CU_ASSERT(ret == 0);
+   ret = odp_packet_l4_offset_set(pkt, l2_off);
+   CU_ASSERT(ret == 0);
 
/* Addresses should be the same */
l2_addr = odp_packet_l2_ptr(pkt, &seg_len);
-- 
1.9.3


___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH 2/3] validation: buffer: fix for the use of cached return value of odp_packet_last_seg

2015-01-17 Thread Jerin Jacob
odp_packet_seg_t is an opaque type, based on the implementation, the return
value of odp_packet_last_seg can be changed after headroom/tailroom push/pull
operation.

Signed-off-by: Jerin Jacob 
---
 test/validation/buffer/odp_packet_test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/validation/buffer/odp_packet_test.c 
b/test/validation/buffer/odp_packet_test.c
index b6fa028..7c2b169 100644
--- a/test/validation/buffer/odp_packet_test.c
+++ b/test/validation/buffer/odp_packet_test.c
@@ -289,6 +289,9 @@ static void _verify_tailroom_shift(odp_packet_t pkt,
tail = odp_packet_pull_tail(pkt, -shift);
}
 
+   seg = odp_packet_last_seg(pkt);
+   CU_ASSERT(seg != ODP_SEGMENT_INVALID);
+
CU_ASSERT(tail != NULL);
CU_ASSERT(odp_packet_seg_data_len(pkt, seg) == seg_data_len + shift);
CU_ASSERT(odp_packet_len(pkt) == pkt_data_len + shift);
-- 
1.9.3


___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH 3/3] validation: buffer: enable packet validation test to run on SW emulated odp packet pool on HW

2015-01-17 Thread Jerin Jacob
If a platform is limited to one HW packet pool then odp implementation
can implement the virtual odp packet pools using same the HW packet pool(if the 
block size is same)
In this specific test case has created a packet buffer pool on init with 100 
buffers
and later a packet buffer pool of one buffer. So in this specific case 
assumption of later pool
have only one buffer is not valid.

Signed-off-by: Jerin Jacob 
---
 test/validation/buffer/odp_packet_test.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/validation/buffer/odp_packet_test.c 
b/test/validation/buffer/odp_packet_test.c
index 7c2b169..86b6a04 100644
--- a/test/validation/buffer/odp_packet_test.c
+++ b/test/validation/buffer/odp_packet_test.c
@@ -58,8 +58,6 @@ static void packet_alloc_free(void)
packet = odp_packet_alloc(pool, packet_len);
CU_ASSERT_FATAL(packet != ODP_PACKET_INVALID);
CU_ASSERT(odp_packet_len(packet) == packet_len);
-   /** @todo: is it correct to assume the pool had only one buffer? */
-   CU_ASSERT_FATAL(odp_packet_alloc(pool, packet_len) == 
ODP_PACKET_INVALID)
 
odp_packet_free(packet);
 
-- 
1.9.3


___
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp