From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 376B95910 for ; Wed, 25 Jun 2014 02:02:03 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 24 Jun 2014 17:02:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,541,1400050800"; d="scan'208";a="560477702" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 24 Jun 2014 17:02:19 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.31]) by IRSMSX102.ger.corp.intel.com ([169.254.2.76]) with mapi id 14.03.0123.003; Wed, 25 Jun 2014 01:02:18 +0100 From: "Richardson, Bruce" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API Thread-Index: AQHPj/xB+AyOqWM0lEWZjoOLvdUXWJuA0VgAgAAfg2A= Date: Wed, 25 Jun 2014 00:02:18 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B02CEE35B5@IRSMSX103.ger.corp.intel.com> References: <1403649136-23551-1-git-send-email-bruce.richardson@intel.com> <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> <20140624160716.57f99bd2@nehalam.linuxnetplumber.net> In-Reply-To: <20140624160716.57f99bd2@nehalam.linuxnetplumber.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Wed, 25 Jun 2014 00:02:03 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, June 24, 2014 4:07 PM > To: Richardson, Bruce > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single= pkt > TX function to API >=20 > On Tue, 24 Jun 2014 23:32:15 +0100 > Bruce Richardson wrote: >=20 > > 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 i= n > > case transmitting a buffered burst fails. By default, we just free th= e > > unsent packets >=20 > This must be per-queue to be MP safe. >=20 > Internally, we do something similar but it proved to be fastest to > user per-cpu data in some cases. The implementation is per-queue. If you look at the changes to the tx queue= setup function, we set up a buffer space for each TX queue inside the eth_= dev_data structure that is then used for buffering that queue. The fact tha= t it's handled per-queue inside the eth_dev means that it's as thread-safe = as the existing tx_burst function, and also is completely driver agnostic.