From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] net/enic: decrement Tx mbuf reference count before recycling Date: Fri, 15 Jul 2016 23:27:10 +0200 Message-ID: <13861332.RpjNex3OnZ@xps13> References: <1ca338a4-a8fe-8149-2373-d02fee3199cb@6wind.com> <1468266301-2762-1-git-send-email-johndale@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, bruce.richardson@intel.com, olivier.matz@6wind.com To: John Daley Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 369135587 for ; Fri, 15 Jul 2016 23:27:12 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id o80so45621906wme.1 for ; Fri, 15 Jul 2016 14:27:12 -0700 (PDT) In-Reply-To: <1468266301-2762-1-git-send-email-johndale@cisco.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-11 12:45, John Daley: > In the burst Tx cleanup function, the reference count in mbufs > returned to the pool should to be decremented before they are > returned. Decrementing is not done by rte_mempool_put_bulk() > so it must be done separately using __rte_pktmbuf_prefree_seg(). > > Also when returning unsent buffers when the device is stopped > use rte_mbuf_free_seg() instead of rte_mempool_put() so that > reference counts are properly decremented. > > Fixes: 36935afbc53c ("net/enic: refactor Tx mbuf recycling") > > Reviewed-by: Nelson Escobar > Signed-off-by: John Daley Applied, thanks