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 98A236A8B for ; Wed, 24 Dec 2014 02:45:19 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 23 Dec 2014 17:45:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,635,1413270000"; d="scan'208";a="652453732" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by fmsmga002.fm.intel.com with ESMTP; 23 Dec 2014 17:45:17 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 24 Dec 2014 09:43:48 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.182]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.5]) with mapi id 14.03.0195.001; Wed, 24 Dec 2014 09:43:46 +0800 From: "Zhang, Helin" To: Vithal S Mohare , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH RFC 0/3] DPDK ethdev callback support Thread-Index: AQHQHpMOedSbG3FTvkua35p9gKkvN5ycZOQAgAGTr4A= Date: Wed, 24 Dec 2014 01:43:46 +0000 Message-ID: References: <1419266844-4848-1-git-send-email-bruce.richardson@intel.com> <98DB008FA2AC6644B40AD8C766FAB271014BDE376A@BOREAL.arubanetworks.com> <20141223093015.GD10244@bricha3-MOBL3> <98DB008FA2AC6644B40AD8C766FAB271014BDE3921@BOREAL.arubanetworks.com> In-Reply-To: <98DB008FA2AC6644B40AD8C766FAB271014BDE3921@BOREAL.arubanetworks.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 Cc: "dev@dpdk.org" 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 01:45:21 -0000 For L2 RSS, I think i40e hardware supports it, which will be enabled soon l= ater. Regards, Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Vithal S Mohare > Sent: Tuesday, December 23, 2014 5:38 PM > To: Richardson, Bruce > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH RFC 0/3] DPDK ethdev callback support >=20 > Agree. As the mbuf is already received in the rx-q, may not yield great > advantage. > On side note, any plans to support RSS for L2 packets ? >=20 > -----Original Message----- > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Tuesday, December 23, 2014 3:00 PM > To: Vithal S Mohare > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH RFC 0/3] DPDK ethdev callback support >=20 > On Tue, Dec 23, 2014 at 04:23:21AM +0000, Vithal S Mohare wrote: > > Hi Bruce, > > > > > > For example, for a port type that does not support RSS, a callback on R= X can > be configured to calculate a hash in software. > > > > > > Wondering if this callback will also be useful to bridge the gap of no = RSS > support for L2 packets. i.e. in the rx call-back handler, can applicatio= ns > calculate hash and feed it back so that spraying happens based on this? = Now, > all pure L2 packets (e.g. arp pkts) comes to rx-q 0 of the 'port'. Addin= g > callback to [port][rx-q:0] would help? > > > > Thanks, > > -Vithal >=20 > Yes, that could work. The downside is that it is no faster than having an= app do > the calculation itself, it's just perhaps a little easier to work with in= the app. >=20 > /Bruce >=20 > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Monday, December 22, 2014 10:17 PM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH RFC 0/3] DPDK ethdev callback support > > > > This RFC is for a small addition to the ethdev library, to add in suppo= rt for > callbacks at the RX and TX stages. This allows packet processing to be do= ne on > packets before they get returned to applications using rte_eth_rx_burst c= all. > > > > Use case: the first use case for this is to enable a consistent set of = packets > mbufs to be received by applications irrespective of the NIC used to rece= ive > those. For example, for a port type that does not support RSS, a callback= on RX > can be configured to calculate a hash in software. > > Similarly, this mechanism can be used to add other information to mbufs= as > they are received, such as timestamps or sequence numbers, without > cluttering up the main packet processing path with checks for whether pac= kets > have these fields filled in or not. > > A second use case is ease of intrumenting existing code. The example > application shows how combining a timestamp insertion callback on RX can = be > paired with a latency calculation callback on TX to easily instrument any > application for packet latency. > > A third use case is to potentially extend existing NIC capabilities bey= ond what > is currently supported. For example, where flow director capabilities can= match > up to a certain limit of flows - in the thousands, in the case of NICs us= ing the > ixgbe driver - a callback can extend this to potentially millions of flow= s by using > a software hash table lookup inline for packets that missing the hardware > lookup filters. It would all appear transparent to the packet handling co= de in > the main application. > > > > Future extensions: in future the ethdev library can be extended to prov= ide a > standard set of callbacks for use by drivers. > > > > For now this patch set is RFC and still needs additional work for creat= ing a > remove function for callbacks and to add in additional testing code. > > Since this adds in new code into the critical data path, I have run som= e > performance tests using testpmd with the ixgbe vector drivers (i.e. the f= astest, > fast-path we have :-) ). Performance drops due to this patch seems minima= l to > non-existant, rough tests on my system indicate a drop of perhaps 1%. > > > > All feedback welcome. > > > > Bruce Richardson (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 | 103 +++++++++++++-- > > lib/librte_ether/rte_ethdev.h | 125 ++++++++++++++++++- > > lib/librte_pmd_bond/rte_eth_bond_api.c | 2 +- > > 7 files changed, 543 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 > > > > -- > > 1.9.3 > >