[dpdk-dev,PktGen] remove mbuf refcnt verification

Message ID 20171018071922.178848-1-xuemingl@mellanox.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xueming Li Oct. 18, 2017, 7:19 a.m. UTC
  To improve performance, dpdk drivers are using raw mbuf apis w/o refcnt
reset when returning packet to pool.
This patch remove refcnt validation when allocating mbufs from pool.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 lib/common/mbuf.h | 20 --------------------
 1 file changed, 20 deletions(-)
  

Patch

diff --git a/lib/common/mbuf.h b/lib/common/mbuf.h
index 706ff3f..4c86502 100644
--- a/lib/common/mbuf.h
+++ b/lib/common/mbuf.h
@@ -81,41 +81,21 @@  pg_pktmbuf_alloc_bulk(struct rte_mempool *pool,
 	switch (count % 4) {
 	case 0:
 		while (idx != count) {
-#ifdef RTE_ASSERT
-			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#else
-			RTE_VERIFY(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#endif
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
 			/* fall-through */
 		case 3:
-#ifdef RTE_ASSERT
-			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#else
-			RTE_VERIFY(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#endif
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
 			/* fall-through */
 		case 2:
-#ifdef RTE_ASSERT
-			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#else
-			RTE_VERIFY(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#endif
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
 			/* fall-through */
 		case 1:
-#ifdef RTE_ASSERT
-			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#else
-			RTE_VERIFY(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-#endif
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;