From: hepeng <xnhp0320@icloud.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] ixgbe:set txep.mbuf to NULL when calling ixgbe_tx_free_bufs
Date: Sat, 01 Aug 2015 09:22:20 +0800 [thread overview]
Message-ID: <1438392140-19450-1-git-send-email-xnhp0320@icloud.com> (raw)
In *ixgbe_tx_free_bufs*, after recycling some tx entries, one should set their mbuf pointers to NULL.
Signed-off-by: hepeng <xnhp0320@icloud.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
index 1c16dec..813b168 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
@@ -615,9 +615,11 @@ ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)
if (likely(m != NULL)) {
free[0] = m;
nb_free = 1;
+ txep[0].mbuf = NULL;
for (i = 1; i < n; i++) {
m = __rte_pktmbuf_prefree_seg(txep[i].mbuf);
if (likely(m != NULL)) {
+ txep[0].mbuf = NULL;
if (likely(m->pool == free[0]->pool))
free[nb_free++] = m;
else {
@@ -632,8 +634,10 @@ ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)
} else {
for (i = 1; i < n; i++) {
m = __rte_pktmbuf_prefree_seg(txep[i].mbuf);
- if (m != NULL)
+ if (m != NULL) {
+ txep[0].mbuf = NULL;
rte_mempool_put(m->pool, m);
+ }
}
}
--
1.9.1
reply other threads:[~2015-08-01 1:22 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=1438392140-19450-1-git-send-email-xnhp0320@icloud.com \
--to=xnhp0320@icloud.com \
--cc=dev@dpdk.org \
/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).