From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DDCD4C39C for ; Thu, 23 Jul 2015 18:05:11 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 23 Jul 2015 09:05:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,531,1432623600"; d="scan'208";a="734257192" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 23 Jul 2015 09:05:07 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t6NG57MW029656; Thu, 23 Jul 2015 17:05:07 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t6NG57iP003931; Thu, 23 Jul 2015 17:05:07 +0100 Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id t6NG57CR003927; Thu, 23 Jul 2015 17:05:07 +0100 From: Bruce Richardson To: dev@dpdk.org Date: Thu, 23 Jul 2015 17:05:02 +0100 Message-Id: <1437667506-3890-2-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1437667506-3890-1-git-send-email-bruce.richardson@intel.com> References: <1437667506-3890-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 1/5] Revert "ixgbe: check mbuf refcnt when clearing a ring" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2015 16:05:12 -0000 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 --- 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