From: Xueming Li <xuemingl@mellanox.com>
To: Keith Wiles <keith.wiles@intel.com>
Cc: dev@dpdk.org, Xueming Li <xuemingl@mellanox.com>
Subject: [dpdk-dev] [PktGen] remove mbuf refcnt verification
Date: Wed, 18 Oct 2017 15:19:22 +0800 [thread overview]
Message-ID: <20171018071922.178848-1-xuemingl@mellanox.com> (raw)
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
reply other threads:[~2017-10-18 7:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018071922.178848-1-xuemingl@mellanox.com \
--to=xuemingl@mellanox.com \
--cc=dev@dpdk.org \
--cc=keith.wiles@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).