From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API Date: Tue, 24 Jun 2014 16:05:45 -0700 Message-ID: <20140624160545.136ad9e4@nehalam.linuxnetplumber.net> References: <1403649136-23551-1-git-send-email-bruce.richardson@intel.com> <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Bruce Richardson Return-path: In-Reply-To: <1403649136-23551-2-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 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" On Tue, 24 Jun 2014 23:32:15 +0100 Bruce Richardson wrote: > > +static void > +free_unsent_pkts(struct rte_mbuf **pkts, uint16_t unsent, > + void *userdata __rte_unused) > +{ > + unsigned i; > + for (i = 0; i < unsent; i++) > + rte_pktmbuf_free(pkts[i]); > +} > + This should be moved into mbuf layer, and there it could be optimized to do a rte_mempool_mp_put_bulk. This would speed up operations becuase it would mean a single ring operation per set rather per mbuf segment. Of course, the optimization would have to handle the refcnt issues.