[dpdk-dev] [PATCH] test: restructure and cleanup ring PMD test

Pattan, Reshma reshma.pattan at intel.com
Wed Sep 26 11:38:35 CEST 2018



> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Thursday, September 20, 2018 2:24 PM
> To: dev at dpdk.org
> Cc: Pattan, Reshma <reshma.pattan at intel.com>; Chaitanya Babu, TalluriX
> <tallurix.chaitanya.babu at intel.com>
> Subject: [PATCH] test: restructure and cleanup ring PMD test
> 
> From: Chaitanya Babu Talluri <tallurix.chaitanya.babu at intel.com>
> 
> Divided main test to smaller logical tests.
> Registered with UT framework.
> Added cleanup of the resources else ring creation fails during consecutive test
> runs.
> Freed the allocated mempool, rings and uninitalized the drivers.
> 
>  static int
> @@ -212,7 +214,7 @@ test_stats_reset(int port)  }
> 
>  static int
> -test_pmd_ring_pair_create_attach(int portd, int porte)
> +test_pmd_ring_pair_create_attach(void)
>  {
>  	struct rte_eth_stats stats, stats2;
>  	struct rte_mbuf buf, *pbuf = &buf;
> @@ -220,185 +222,217 @@ test_pmd_ring_pair_create_attach(int portd, int
> porte)
> 
>  	memset(&null_conf, 0, sizeof(struct rte_eth_conf));
> 
> -	if ((rte_eth_dev_configure(portd, 1, 1, &null_conf) < 0)
> -		|| (rte_eth_dev_configure(porte, 1, 1, &null_conf) < 0)) {
> +	if ((rte_eth_dev_configure(rxtx_portd, 1, 1, &null_conf) < 0)
> +		|| (rte_eth_dev_configure(rxtx_porte, 1, 1, &null_conf) < 0)) {

Small nits:
Here and in other places, as per coding guidelines the continuation of
 if statement should be at 2 tabs .  Please refer guidelines.

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


More information about the dev mailing list