> From: Rao, Nikhil
> Sent: Tuesday, September 12, 2017 1:29 PM
> To: [email protected]; Richardson, Bruce
> <[email protected]>
> Cc: Eads, Gage <[email protected]>; [email protected]; [email protected]; Van
> Haaren, Harry <[email protected]>; [email protected];
> [email protected]; Vangati, Narender <[email protected]>; Carrillo,
> Erik G <[email protected]>; Gujjar, Abhinandan S
> <[email protected]>; Rao, Nikhil <[email protected]>
> Subject: [PATCH v3 4/4] eventdev: Add tests for event eth Rx adapter APIs
>
> Add unit tests for rte_event_eth_rx_adapter_xxx() APIs
>
> Signed-off-by: Nikhil Rao <[email protected]>
<snip>
> +static int
> +init_ports(int num_ports)
> +{
> + uint8_t portid;
> +
> + mp = rte_pktmbuf_pool_create("packet_pool",
> + /* mbufs */ 8192 * num_ports * MAX_NUM_RX_QUEUE,
> + /* cache_size */ 512,
> + /* priv_size*/ 0,
> + /* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
> + rte_socket_id());
A failure in allocating "mp" here will cause a segfault on the port_init() call.
Adding a little failure case works, but note that "0" tests execute if the
init() of a test-suite fails:
if(!mp)
return -1;
Allocating more hugepages passes this point.
That's all for now, -Harry