From: Konstantin Ananyev <konstantin.ananyev@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCHv2 1/5] Revert "ixgbe: check mbuf refcnt when clearing a ring"
Date: Fri, 24 Jul 2015 14:58:11 +0100 [thread overview]
Message-ID: <1437746295-12184-2-git-send-email-konstantin.ananyev@intel.com> (raw)
In-Reply-To: <1437746295-12184-1-git-send-email-konstantin.ananyev@intel.com>
In-Reply-To: <1437667506-3890-2-git-send-email-bruce.richardson@intel.com>
This reverts commit b35d0d80f0a809939549ddde99c1a76b7e38bff3.
The bug fix was incorrect as it did not take account of the fact that
the mbufs that were previously freed may have since be re-allocated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 3 +--
drivers/net/ixgbe/ixgbe_rxtx_vec.c | 8 +-------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index af7e222..75c5555 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2272,8 +2272,7 @@ ixgbe_rx_queue_release_mbufs(struct ixgbe_rx_queue *rxq)
if (rxq->sw_ring != NULL) {
for (i = 0; i < rxq->nb_rx_desc; i++) {
- if (rxq->sw_ring[i].mbuf != NULL &&
- rte_mbuf_refcnt_read(rxq->sw_ring[i].mbuf)) {
+ if (rxq->sw_ring[i].mbuf != NULL) {
rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);
rxq->sw_ring[i].mbuf = NULL;
}
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
index d3ac74a..47ff990 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
@@ -736,13 +736,7 @@ ixgbe_tx_queue_release_mbufs(struct ixgbe_tx_queue *txq)
nb_free < max_desc && i != txq->tx_tail;
i = (i + 1) & max_desc) {
txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
- /*
- * Check for already freed packets.
- * Note: ixgbe_tx_free_bufs does not NULL after free,
- * so we actually have to check the reference count.
- */
- if (txe->mbuf != NULL &&
- rte_mbuf_refcnt_read(txe->mbuf) != 0)
+ if (txe->mbuf != NULL)
rte_pktmbuf_free_seg(txe->mbuf);
}
/* reset tx_entry */
--
1.8.3.1
next prev parent reply other threads:[~2015-07-24 13:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 16:05 [dpdk-dev] [PATCH 0/5] ixgbe: fix mbuf release on RX and TX Bruce Richardson
2015-07-23 16:05 ` [dpdk-dev] [PATCH 1/5] Revert "ixgbe: check mbuf refcnt when clearing a ring" Bruce Richardson
2015-07-24 13:58 ` [dpdk-dev] [PATCHv2 0/5] ixgbe: fix mbuf release on RX and TX Konstantin Ananyev
2015-07-24 13:58 ` Konstantin Ananyev [this message]
2015-07-24 15:30 ` [dpdk-dev] [PATCHv2 1/5] Revert "ixgbe: check mbuf refcnt when clearing a ring" Zhang, Helin
2015-07-24 13:58 ` [dpdk-dev] [PATCHv2 2/5] ixgbe: fix comments on rx_queue fields Konstantin Ananyev
2015-07-24 13:58 ` [dpdk-dev] [PATCHv2 3/5] ixgbe: fix bug on release of mbufs from queue Konstantin Ananyev
2015-07-24 13:58 ` [dpdk-dev] [PATCHv2 4/5] ixgbe: rename tx queue release function for consistency Konstantin Ananyev
2015-07-24 15:32 ` Zhang, Helin
2015-07-24 13:58 ` [dpdk-dev] [PATCHv2 5/5] ixgbe: remove awkward typecasts from ixgbe SSE PMD Konstantin Ananyev
2015-07-26 8:48 ` [dpdk-dev] [PATCHv2 0/5] ixgbe: fix mbuf release on RX and TX Thomas Monjalon
2015-07-23 16:05 ` [dpdk-dev] [PATCH 2/5] ixgbe: fix comments on rx_queue fields Bruce Richardson
2015-07-23 16:05 ` [dpdk-dev] [PATCH 3/5] ixgbe: fix bug on release of mbufs from queue Bruce Richardson
2015-07-23 16:05 ` [dpdk-dev] [PATCH 4/5] ixgbe: rename tx queue release function for consistency Bruce Richardson
2015-07-23 16:05 ` [dpdk-dev] [PATCH 5/5] ixgbe: remove awkward typecasts from ixgbe SSE PMD Bruce Richardson
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=1437746295-12184-2-git-send-email-konstantin.ananyev@intel.com \
--to=konstantin.ananyev@intel.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).