From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4CD56B72D for ; Fri, 20 Feb 2015 18:03:58 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 20 Feb 2015 09:03:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,615,1418112000"; d="scan'208";a="669174287" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 20 Feb 2015 09:03:54 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t1KH3sgi000413; Fri, 20 Feb 2015 17:03:54 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t1KH3sfX032338; Fri, 20 Feb 2015 17:03:54 GMT Received: (from jmcnam2x@localhost) by sivswdev02.ir.intel.com with id t1KH3nNd032331; Fri, 20 Feb 2015 17:03:49 GMT From: John McNamara To: dev@dpdk.org Date: Fri, 20 Feb 2015 17:03:44 +0000 Message-Id: <1424451827-32293-1-git-send-email-john.mcnamara@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1424281343-2994-1-git-send-email-john.mcnamara@intel.com> References: <1424281343-2994-1-git-send-email-john.mcnamara@intel.com> Subject: [dpdk-dev] [PATCH v5 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, 20 Feb 2015 17:03:58 -0000 This patchset is for a small optional addition to the ethdev library, to add 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 adding and removing callbacks is not thread safe. Note: Sample application documentation to follow in a patch update. Version 5 changes: * Turn the callback feature on by default. * Simplify #define name. Version 4 changes: * Make the callback feature a compile time option. Version 3 changes: * Removed unnecessary header file from example folder (which included baremetal reference). * Renamed the interrupt, RX and TX callbacks to make their function clearer (using the names suggested in the mailing list comments). * Squashed ABI version update into the commit it relates to. * Fixed various checkpatch warnings. Version 2 changes: * Added ABI versioning. * Doxygen clarifications. Version 1 changes: * Added callback removal functions. * Minor fixes. Richardson, Bruce (3): ethdev: rename callbacks field to link_intr_cbs ethdev: add optional rxtx callback support examples: example showing use of callbacks. MAINTAINERS | 4 + app/test/virtual_pmd.c | 2 +- config/common_bsdapp | 1 + config/common_linuxapp | 1 + examples/Makefile | 1 + examples/rxtx_callbacks/Makefile | 57 ++++++++ examples/rxtx_callbacks/main.c | 228 ++++++++++++++++++++++++++++++++ lib/librte_ether/rte_ethdev.c | 204 +++++++++++++++++++++++++++-- lib/librte_ether/rte_ethdev.h | 204 ++++++++++++++++++++++++++++- lib/librte_ether/rte_ether_version.map | 4 + lib/librte_pmd_bond/rte_eth_bond_api.c | 2 +- lib/librte_pmd_ring/rte_eth_ring.c | 2 +- 12 files changed, 696 insertions(+), 14 deletions(-) create mode 100644 examples/rxtx_callbacks/Makefile create mode 100644 examples/rxtx_callbacks/main.c -- 1.7.4.1