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 0F5561F5 for ; Wed, 24 Dec 2014 06:06:59 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 23 Dec 2014 21:06:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,636,1413270000"; d="scan'208";a="642239145" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by fmsmga001.fm.intel.com with ESMTP; 23 Dec 2014 21:06:58 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 24 Dec 2014 13:06:49 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.240]) with mapi id 14.03.0195.001; Wed, 24 Dec 2014 13:06:41 +0800 From: "Qiu, Michael" To: "Richardson, Bruce" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH RFC 0/3] DPDK ethdev callback support Thread-Index: AQHQHgcNdaj/9IEwzUWvkmNH2DNPIw== Date: Wed, 24 Dec 2014 05:06:40 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CA2422@SHSMSX101.ccr.corp.intel.com> References: <1419266844-4848-1-git-send-email-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH RFC 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: Wed, 24 Dec 2014 05:07:00 -0000 Hi Bruce,=0A= =0A= I haven't seen the third patch of you patch set.=0A= =0A= Just want to know if only me missed.=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 12/23/2014 12:48 AM, Bruce Richardson wrote:=0A= > This RFC is for a small addition to the ethdev library, to add in support= for=0A= > callbacks at the RX and TX stages. This allows packet processing to be do= ne on=0A= > packets before they get returned to applications using rte_eth_rx_burst c= all.=0A= >=0A= > Use case: the first use case for this is to enable a consistent set of = =0A= > packets mbufs to be received by applications irrespective of the NIC used= =0A= > to receive those. For example, for a port type that does not support RSS,= =0A= > a callback on RX can be configured to calculate a hash in software. =0A= > Similarly, this mechanism can be used to add other information to mbufs= =0A= > as they are received, such as timestamps or sequence numbers, without clu= ttering=0A= > up the main packet processing path with checks for whether packets have t= hese=0A= > fields filled in or not.=0A= > A second use case is ease of intrumenting existing code. The example appl= ication =0A= > shows how combining a timestamp insertion callback on RX can be paired wi= th a =0A= > latency calculation callback on TX to easily instrument any application f= or=0A= > packet latency.=0A= > A third use case is to potentially extend existing NIC capabilities beyon= d=0A= > what is currently supported. For example, where flow director capabilitie= s=0A= > can match up to a certain limit of flows - in the thousands, in the case = of=0A= > NICs using the ixgbe driver - a callback can extend this to potentially= =0A= > millions of flows by using a software hash table lookup inline for packet= s=0A= > that missing the hardware lookup filters. It would all appear transparent= =0A= > to the packet handling code in the main application.=0A= >=0A= > Future extensions: in future the ethdev library can be extended to provid= e=0A= > a standard set of callbacks for use by drivers. =0A= >=0A= > For now this patch set is RFC and still needs additional work for creatin= g=0A= > a remove function for callbacks and to add in additional testing code.=0A= > Since this adds in new code into the critical data path, I have run some= =0A= > performance tests using testpmd with the ixgbe vector drivers (i.e. the= =0A= > fastest, fast-path we have :-) ). Performance drops due to this patch=0A= > seems minimal to non-existant, rough tests on my system indicate a drop= =0A= > of perhaps 1%.=0A= >=0A= > All feedback welcome.=0A= >=0A= > Bruce Richardson (3):=0A= > ethdev: rename callbacks field to intr_cbs=0A= > ethdev: Add in data rxtx callback support=0A= > examples: example showing use of callbacks.=0A= >=0A= > app/test/virtual_pmd.c | 2 +-=0A= > examples/rxtx_callbacks/Makefile | 57 +++++++++=0A= > examples/rxtx_callbacks/basicfwd.c | 222 +++++++++++++++++++++++++++= ++++++=0A= > examples/rxtx_callbacks/basicfwd.h | 46 +++++++=0A= > lib/librte_ether/rte_ethdev.c | 103 +++++++++++++--=0A= > lib/librte_ether/rte_ethdev.h | 125 ++++++++++++++++++-=0A= > lib/librte_pmd_bond/rte_eth_bond_api.c | 2 +-=0A= > 7 files changed, 543 insertions(+), 14 deletions(-)=0A= > create mode 100644 examples/rxtx_callbacks/Makefile=0A= > create mode 100644 examples/rxtx_callbacks/basicfwd.c=0A= > create mode 100644 examples/rxtx_callbacks/basicfwd.h=0A= >=0A= =0A=