diff --git a/test/validation/api/pool/pool.c b/test/validation/api/pool/pool.c index 5176bb96f2..7795b569e2 100644 --- a/test/validation/api/pool/pool.c +++ b/test/validation/api/pool/pool.c @@ -2050,9 +2050,15 @@ static void test_packet_pool_ext_uarea_init(void) CU_ASSERT(data.count == num); for (i = 0; i < num; i++) { + uint32_t max_payload; + CU_ASSERT(data.mark[i] == 1); - pkts[i] = odp_packet_alloc(pool, (param.pkt.buf_size - param.pkt.headroom) / 2); + max_payload = param.pkt.buf_size; + max_payload -= capa.pkt.odp_header_size + param.pkt.app_header_size; + max_payload -= capa.pkt.odp_trailer_size; + max_payload -= capa.pkt.max_headroom_size; + pkts[i] = odp_packet_alloc(pool, max_payload); CU_ASSERT(pkts[i] != ODP_PACKET_INVALID);