From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: Is there any example application to used DPDK packet distributor library? Date: Wed, 30 Sep 2015 13:03:44 +0100 Message-ID: <20150930120343.GA11600@bricha3-MOBL3> References: <751f5a8892d7d504dd843a1a26ac3ac@cweb02.nm.nhnsystem.com> <20150930105628.GB10264@bricha3-MOBL3> <7ae99d568d2552318f3c30da96d76bf3@cweb17.nm.nhnsystem.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: =?utf-8?B?7LWc7J217ISx?= Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 969B05A55 for ; Wed, 30 Sep 2015 14:05:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: <7ae99d568d2552318f3c30da96d76bf3@cweb17.nm.nhnsystem.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Sep 30, 2015 at 08:41:04PM +0900, =EC=B5=9C=EC=9D=B5=EC=84=B1 wro= te: > Dear Bruce Richardson and DPDK experts. > =20 > Thank you very much for your precious answer. > =20 > I found it. It seems very short and simple. > =20 > Thank you very much. > =20 > I have another question. > =20 > I don't know how the following steps work from new_tag to match variabl= es. > =20 > /* in dpdk library. ~/dpdk-?.?.?/lib/librte_distributor/rte_distributor= .c */ > /* process a set of packets to distribute them to workers */ > rte_distributor_process(struct rte_distributor *d, struct rte_mbuf **mb= ufs, unsigned num_mbufs) > { > ... > new_tag =3D next_mb->hash.usr; /* flow ID hash.usr is set by N= IC */ > =20 > for (i =3D 0; i < d->num_workers; i++) > match |=3D (!(d->in_flight_tags[i] ^ new_tag) << i); > =20 > /* Only turned-on bits are considered as match */ > match &=3D d->in_flight_bitmask; > =20 > unsigned worker =3D __builtin_ctzl(match); > ... > } > =20 > I will appreciate if you let me know the steps. We build up a bitmask for each worker, where the bit is set of the new_ta= g matches the inflight tag for the worker. We then find the matching worker= , if any using count-training-zeros (ctz) operation. /Bruce > =20 > Thank you very much. > =20 > Sincerely Yours, > =20 > Ick-Sung Choi. > =20 > =20 > -----Original Message----- > From: "Bruce Richardson"<bruce.richardson@intel.com>=20 > To: "=EC=B5=9C=EC=9D=B5=EC=84=B1"<pnk003@naver.com>;=20 > Cc: <dev@dpdk.org>;=20 > Sent: 2015-09-30 (=EC=88=98) 19:56:28 > Subject: Re: [dpdk-dev] Is there any example application to used DPDK p= acket distributor library? > =20 > On Wed, Sep 30, 2015 at 02:45:20PM +0900, =EC=B5=9C=EC=9D=B5=EC=84=B1 w= rote: > > Dear DPDK experts. > > =20 > > I am Ick-Sung Choi living in South Korea. > > =20 > > I have a question about DPDK=EC=97=90 packet distributor library. > > =20 > > Is there any example application to used DPDK packet distributor l= ibrary? > > =20 > > I am trying to experiment simple function using DPDK packet distri= butor library. > > =20 > > If I can study an example application of DPDK packet distributor l= ibrary, it would be very helpful for my experiment. > > =20 > > I will appreciate if I can be given any example applications, advi= ce, and information. > > =20 > > Thank you very much. > > =20 > > Sincerely Yours, > > =20 > > Ick-Sung Choi. > > =20 > Hi, >=20 > there is a "distributor" example app in the examples directory. >=20 > /Bruce >=20