Regards, Bala
On 24 February 2017 at 21:43, Matias Elo <matias....@nokia.com> 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 <matias....@nokia.com> > --- > test/common_plat/validation/api/packet/packet.c | 5 ++++- > 1 file changed, 4 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..88843cb 100644 > --- a/test/common_plat/validation/api/packet/packet.c > +++ b/test/common_plat/validation/api/packet/packet.c > @@ -109,6 +109,7 @@ int packet_suite_init(void) > uint32_t udat_size; > uint8_t data = 0; > uint32_t i; > + uint32_t num = 200; IMO, It is better for the above num value to be a #define rather than a local variable so that its easy to modify for multiple platforms if required. > > if (odp_pool_capability(&capa) < 0) { > printf("pool_capability failed\n"); > @@ -128,13 +129,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(¶ms); > > 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", ¶ms); > -- > 2.7.4 >