DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PktGen] remove mbuf refcnt verification
@ 2017-10-18  7:19 Xueming Li
  0 siblings, 0 replies; only message in thread
From: Xueming Li @ 2017-10-18  7:19 UTC (permalink / raw)
  To: Keith Wiles; +Cc: dev, Xueming Li

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(-)

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++;
-- 
2.13.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-18  7:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18  7:19 [dpdk-dev] [PktGen] remove mbuf refcnt verification Xueming Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).