[dpdk-dev] [PATCH v3] test: add sample functions for packet forwarding

Pattan, Reshma reshma.pattan at intel.com
Tue Jul 17 10:15:53 CEST 2018


Hi

> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Monday, July 16, 2018 5:01 PM
> To: dev at dpdk.org
> Cc: Horton, Remy <remy.horton at intel.com>; Pattan, Reshma
> <reshma.pattan at intel.com>; Parthasarathy, JananeeX M
> <jananeex.m.parthasarathy at intel.com>; Chaitanya Babu, TalluriX
> <tallurix.chaitanya.babu at intel.com>
> Subject: [PATCH v3] test: add sample functions for packet forwarding
> 
> Add sample test functions for packet forwarding.
> These can be used for unit test cases for LatencyStats and BitrateStats
> libraries.
> 
> Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu at intel.com>
> Reviewed-by: Reshma Pattan <reshma.pattan at intel.com>
> ---
> + */
> +/* Sample test to forward packets using virtual portids */ int
> +test_packet_forward(void)
> +{
> +	struct rte_mbuf *pbuf[NUM_PACKETS];
> +
> +	mp = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, 0,
> +			RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
> +	if (mp == NULL)
> +		return -1;

Instead of return -1 , please return TEST_FAILED, that seems to be the correct way
as autotest expects TEST_SUCESS or TEST_FAILED from the test result. 
Rest of the code looks ok, I am done with the review. In next patch version don't forget to add my Ack. 

Acked-by: Reshma Pattan <reshma.pattan at intel.com>



More information about the dev mailing list