From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C503BB495 for ; Fri, 13 Feb 2015 15:51:47 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 13 Feb 2015 06:46:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,571,1418112000"; d="scan'208";a="665997503" Received: from dwdohert-dpdk-fedora-20.ir.intel.com ([163.33.213.98]) by fmsmga001.fm.intel.com with ESMTP; 13 Feb 2015 06:51:44 -0800 Message-ID: <54DE102F.60604@intel.com> Date: Fri, 13 Feb 2015 14:54:39 +0000 From: Declan Doherty User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John McNamara , dev@dpdk.org References: <1419266844-4848-1-git-send-email-bruce.richardson@intel.com> <1423771077-13665-1-git-send-email-john.mcnamara@intel.com> In-Reply-To: <1423771077-13665-1-git-send-email-john.mcnamara@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/3] DPDK ethdev callback support 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: Fri, 13 Feb 2015 14:51:48 -0000 On 12/02/15 19:57, John McNamara wrote: > This patchset is for a small addition to the ethdev library, to > add in support for callbacks at the RX and TX stages. This allows > packet processing to be done on packets before they get returned > to applications using rte_eth_rx_burst call. > > See the RFC cover letter for the use cases: > > http://dpdk.org/ml/archives/dev/2014-December/010491.html > > For this version we spent some time investigating Stephen Hemminger's > suggestion of using the userspace RCU (read-copy-update) library for > SMP safety: > > http://urcu.so/ > > The default liburcu (which defaulted to liburcu-mb) requires the least > interaction from the end user but showed a 25% drop in packet throughput > in the callback sample app. > > The liburcu-qsbr (quiescent state) variant showed a 1% drop in packet > throughput in the callback sample app. However it requires registered > RCU threads in the program to periodically announce quiescent states. > This makes it more difficult to implement for end user applications. > > For this release we will document that callbacks should be added/removed > on stopped ports. > > Version 1 changes: > * Added callback removal functions. > * Minor fixes. > > > Richardson, Bruce (3): > ethdev: rename callbacks field to intr_cbs > ethdev: Add in data rxtx callback support > examples: example showing use of callbacks. > > app/test/virtual_pmd.c | 2 +- > examples/rxtx_callbacks/Makefile | 57 ++++++++ > examples/rxtx_callbacks/basicfwd.c | 222 ++++++++++++++++++++++++++++++++ > examples/rxtx_callbacks/basicfwd.h | 46 +++++++ > lib/librte_ether/rte_ethdev.c | 177 ++++++++++++++++++++++++-- > lib/librte_ether/rte_ethdev.h | 175 +++++++++++++++++++++++++- > lib/librte_pmd_bond/rte_eth_bond_api.c | 2 +- > 7 files changed, 667 insertions(+), 14 deletions(-) > create mode 100644 examples/rxtx_callbacks/Makefile > create mode 100644 examples/rxtx_callbacks/basicfwd.c > create mode 100644 examples/rxtx_callbacks/basicfwd.h > Looks good to me, I'll ack the next version which has addressed the ABI issues Neil raised. Also, it should probably be noted in the doxygen comments for the add/remove rxtx callbacks that as currently implemented the addition/removal of callbacks isn't thread safe Declan