From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) by dpdk.org (Postfix) with ESMTP id 657805A5E for ; Sat, 1 Aug 2015 03:22:30 +0200 (CEST) Received: from localhost.localdomain (unknown [112.80.35.2]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NSD00I6QQHBYE00@mr11p00im-asmtp001.me.com> for dev@dpdk.org; Sat, 01 Aug 2015 01:22:29 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-08-01_01:2015-07-31,2015-07-31,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1508010024 From: hepeng To: dev@dpdk.org Date: Sat, 01 Aug 2015 09:22:20 +0800 Message-id: <1438392140-19450-1-git-send-email-xnhp0320@icloud.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] ixgbe:set txep.mbuf to NULL when calling ixgbe_tx_free_bufs 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: Sat, 01 Aug 2015 01:22:30 -0000 In *ixgbe_tx_free_bufs*, after recycling some tx entries, one should set their mbuf pointers to NULL. Signed-off-by: hepeng --- 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