[dpdk-dev] [PATCH] app/test: add unit test cases for mbuf library APIs

Pattan, Reshma reshma.pattan at intel.com
Fri May 31 12:45:39 CEST 2019



> -----Original Message-----
> From: Govindarajan, LavanyaX
> Sent: Monday, April 15, 2019 1:40 PM
> To: dev at dpdk.org
> Cc: Pattan, Reshma <reshma.pattan at intel.com>; olivier.matz at 6wind.com;
> Richardson, Bruce <bruce.richardson at intel.com>; Govindarajan, LavanyaX
> <lavanyax.govindarajan at intel.com>
> Subject: [PATCH] app/test: add unit test cases for mbuf library APIs
> 

<snip>

> __func__);
> +			if (rte_pktmbuf_data_len(pkt_seg) !=
> +					MBUF_TEST_SEG_SIZE)
> +				GOTO_FAIL("%s: Bad data length\n",
> __func__);
> +			memset(data, (seg + nb_pkt + 0xaa) % 0x0ff,
> +					MBUF_TEST_SEG_SIZE);
> +

Also nb_pkt+0xaa is common for all segments, so  doing the addition for each segments waste of cycles, so move to addition out for segments for loop.

Other than that, please keep reviewed-by in next versions.

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

Thanks,
Reshma


More information about the dev mailing list