From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 4/6] bond: free mbufs if transmission fails in bonding tx_burst functions Date: Fri, 29 Aug 2014 17:36:48 +0200 Message-ID: <1910212.FXdz9376n2@xps13> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Declan Doherty Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Declan, Your patchset is pending for an answer to this comment. 2014-08-20 15:54, Sanford, Robert: > I have a problem with the TX-burst logic of this patch. I believe that for > packets that we *don't* enqueue to the device, we should *NOT* free them. > The API expects that the caller will free them or try again to send them. > > Here is one way to accomplish selective freeing: Move mbuf pointers of > packets successfully enqueued, to the beginning of the caller's mbuf > vector; move mbuf pointers of packets not enqueued, to the end of the > caller's mbuf list. Although possibly re-ordered, the caller will be able > to free/resend all (and only) mbufs that we failed to enqueue.