Sorry, wrong version number. Should be ignored.

-Matias


> On 29 Mar 2017, at 16:10, Matias Elo <[email protected]> wrote:
> 
> Previously packet_test_concatsplit() could fail on some pool
> implementations as the pool ran out of buffers. Increase default pools size
> and use capability to make sure the value is valid.
> 
> Signed-off-by: Matias Elo <[email protected]>
> ---
> V3:
> - Increase packet pool size (Krishna)
> 
> test/common_plat/validation/api/packet/packet.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/test/common_plat/validation/api/packet/packet.c 
> b/test/common_plat/validation/api/packet/packet.c
> index 900c426..48fb75e 100644
> --- a/test/common_plat/validation/api/packet/packet.c
> +++ b/test/common_plat/validation/api/packet/packet.c
> @@ -13,6 +13,8 @@
> #define PACKET_BUF_LEN        ODP_CONFIG_PACKET_SEG_LEN_MIN
> /* Reserve some tailroom for tests */
> #define PACKET_TAILROOM_RESERVE  4
> +/* Number of packets in the test packet pool */
> +#define PACKET_POOL_NUM 300
> 
> static odp_pool_t packet_pool, packet_pool_no_uarea, packet_pool_double_uarea;
> static uint32_t packet_len;
> @@ -109,6 +111,7 @@ int packet_suite_init(void)
>       uint32_t udat_size;
>       uint8_t data = 0;
>       uint32_t i;
> +     uint32_t num = PACKET_POOL_NUM;
> 
>       if (odp_pool_capability(&capa) < 0) {
>               printf("pool_capability failed\n");
> @@ -128,13 +131,15 @@ int packet_suite_init(void)
>               segmented_packet_len = capa.pkt.min_seg_len *
>                                      capa.pkt.max_segs_per_pkt;
>       }
> +     if (capa.pkt.max_num != 0 && capa.pkt.max_num < num)
> +             num = capa.pkt.max_num;
> 
>       odp_pool_param_init(&params);
> 
>       params.type           = ODP_POOL_PACKET;
>       params.pkt.seg_len    = capa.pkt.min_seg_len;
>       params.pkt.len        = capa.pkt.min_seg_len;
> -     params.pkt.num        = 100;
> +     params.pkt.num        = num;
>       params.pkt.uarea_size = sizeof(struct udata_struct);
> 
>       packet_pool = odp_pool_create("packet_pool", &params);
> -- 
> 2.7.4
> 

Reply via email to