[dpdk-dev] [PATCH v3 4/4] eventdev: Add tests for event eth Rx adapter APIs
Van Haaren, Harry
harry.van.haaren at intel.com
Mon Sep 18 17:40:08 CEST 2017
> From: Rao, Nikhil
> Sent: Tuesday, September 12, 2017 1:29 PM
> To: jerin.jacob at caviumnetworks.com; Richardson, Bruce
> <bruce.richardson at intel.com>
> Cc: Eads, Gage <gage.eads at intel.com>; dev at dpdk.org; thomas at monjalon.net; Van
> Haaren, Harry <harry.van.haaren at intel.com>; hemant.agrawal at nxp.com;
> nipun.gupta at nxp.com; Vangati, Narender <narender.vangati at intel.com>; Carrillo,
> Erik G <erik.g.carrillo at intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar at intel.com>; Rao, Nikhil <nikhil.rao at intel.com>
> 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 <nikhil.rao at intel.com>
<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
More information about the dev
mailing list