From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 0/2] add support for buffered tx to ethdev Date: Fri, 15 Jan 2016 10:12:35 -0800 Message-ID: <20160115101235.0de03ce1@xeon-e3> References: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: dev@dpdk.org Return-path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id E33E78E5E for ; Fri, 15 Jan 2016 19:12:28 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id n128so121213432pfn.3 for ; Fri, 15 Jan 2016 10:12:28 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id n2sm16960679pfj.16.2016.01.15.10.12.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2016 10:12:26 -0800 (PST) In-Reply-To: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.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" On Fri, 15 Jan 2016 15:43:56 +0100 Tomasz Kulasek 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 in the ethdev library are: > * 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. > > As well as these, an additional reference callback is provided, which > frees the packets (as the default callback does), as well as updating a > user-provided counter, so that the number of dropped packets can be > tracked. > > The internal buffering of packets for TX in sample apps is no longer > needed, so this patchset also replaces this code with calls to the new > rte_eth_tx_buffer* APIs in: The pipeline code also has its own implementation of this.