Re: [lng-odp] [API-NEXT PATCH v2 1/2] validation: packet: increase test pool size
On 29 March 2017 at 12:51, Elo, Matias (Nokia - FI/Espoo) < matias@nokia-bell-labs.com> wrote: > > > On 28 Mar 2017, at 17:21, Krishna Garapatiorg> wrote: > > > > This pool size is not enough with odp-dpdk. It runs out of buffers hence > the "packet_test_ref" fails. We should increase it to even higher size. > > /Krishna > > > OK, if you have the reference patches merged could you verify which value > would be large enough? > 300 seems to be a good number. I don't see any issue. /Krishna > > -Matias > >
Re: [lng-odp] [API-NEXT PATCH v2 1/2] validation: packet: increase test pool size
> On 28 Mar 2017, at 17:21, Krishna Garapati> wrote: > > This pool size is not enough with odp-dpdk. It runs out of buffers hence the > "packet_test_ref" fails. We should increase it to even higher size. > /Krishna OK, if you have the reference patches merged could you verify which value would be large enough? -Matias
Re: [lng-odp] [API-NEXT PATCH v2 1/2] validation: packet: increase test pool size
On 27 February 2017 at 13:18, Matias Elowrote: > 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 > --- > V2: > - Add define PACKET_POOL_NUM for test packet pool size (Bala) > > 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..6ebc1fe 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 200 > This pool size is not enough with odp-dpdk. It runs out of buffers hence the "packet_test_ref" fails. We should increase it to even higher size. /Krishna > > 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() < 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.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", ); > -- > 2.7.4 > >
Re: [lng-odp] [API-NEXT PATCH v2 1/2] validation: packet: increase test pool size
Ping. > On 27 Feb 2017, at 14:18, Matias Elowrote: > > 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 > --- > V2: > - Add define PACKET_POOL_NUM for test packet pool size (Bala) > > 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..6ebc1fe 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_LENODP_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 200 > > 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() < 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.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", ); > -- > 2.7.4 >
[lng-odp] [API-NEXT PATCH v2 1/2] validation: packet: increase test pool size
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--- V2: - Add define PACKET_POOL_NUM for test packet pool size (Bala) 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..6ebc1fe 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 200 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() < 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.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", ); -- 2.7.4