From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by dpdk.org (Postfix) with ESMTP id DB2C3685D for ; Wed, 25 Jun 2014 01:07:00 +0200 (CEST) Received: by mail-pb0-f53.google.com with SMTP id uo5so847348pbc.12 for ; Tue, 24 Jun 2014 16:07:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=u7t2aCTTsOSUHAPQU8Ywkw6lLuLIIxzt/+MaT2x1CuI=; b=eIKaGwbi2ZQ99Mmb0LIiJjDQZ4MJGwjP3uXABJ866v55g6YyL2mwZlxHs62UDjh75b YNCXu06umGyf0hWuJLb6xzI6Bh9HiKq1S7ysKAApY6GIimb+EC0Hghzcv6JJogBTm+Eq HMZCEX1ADRHEngp/BZp5aRS4f86reDCC1Glg5KcJynpQuGz/JE8pTUSc/tMaEOXxrm+0 SDrKXhVqRPYK8gySAOaOnlCPeMCOImsG/1qFV28y3S23GdaqVP86c94akH6gRMUVSPXm J9or4HnUDJ0sXZEloJpEGqKTmyums5gyBAA4mzD52BDXiDxK+lgqQJdvkplLOpqYKc86 AgZA== X-Gm-Message-State: ALoCoQmW4sbFkVEqf3mqnJdaM5yut37qJ9eInFWrGxjdZGU4uiEXcFEMlpZ5VjGpD8uEqowQzqzL X-Received: by 10.66.122.101 with SMTP id lr5mr5861544pab.130.1403651238779; Tue, 24 Jun 2014 16:07:18 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id gd2sm2053221pbb.95.2014.06.24.16.07.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Jun 2014 16:07:18 -0700 (PDT) Date: Tue, 24 Jun 2014 16:07:16 -0700 From: Stephen Hemminger To: Bruce Richardson Message-ID: <20140624160716.57f99bd2@nehalam.linuxnetplumber.net> In-Reply-To: <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> References: <1403649136-23551-1-git-send-email-bruce.richardson@intel.com> <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 23:07:01 -0000 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.