From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Qiu, Michael" Subject: Re: [PATCH RFC 0/3] DPDK ethdev callback support 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Richardson, Bruce" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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=