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:07:16 -0700 Message-ID: <20140624160716.57f99bd2@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: > Many sample apps include internal buffering for single-packet-at-a-time > operation. Since this is such a common paradigm, this functionality is > better suited to being inside the core ethdev API. > The new APIs include three functions: > * rte_eth_tx_buffer - buffer up a single packet for future transmission > * rte_eth_tx_buffer_flush - flush any unsent buffered packets > * rte_eth_tx_buffer_set_err_callback - set up a callback to be called in > case transmitting a buffered burst fails. By default, we just free the > unsent packets This must be per-queue to be MP safe. Internally, we do something similar but it proved to be fastest to user per-cpu data in some cases.