From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 30 Sep 2015 05:03:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,612,1437462000"; d="scan'208";a="816261298" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.62]) by orsmga002.jf.intel.com with SMTP; 30 Sep 2015 05:03:46 -0700 Received: by (sSMTP sendmail emulation); Wed, 30 Sep 2015 13:03:44 +0025 Date: Wed, 30 Sep 2015 13:03:44 +0100 From: Bruce Richardson To: =?utf-8?B?7LWc7J217ISx?= 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7ae99d568d2552318f3c30da96d76bf3@cweb17.nm.nhnsystem.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library? 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, 30 Sep 2015 12:05:22 -0000 On Wed, Sep 30, 2015 at 08:41:04PM +0900, 최익성 wrote: > Dear Bruce Richardson and DPDK experts. > > Thank you very much for your precious answer. > > I found it. It seems very short and simple. > > Thank you very much. > > I have another question. > > I don't know how the following steps work from new_tag to match variables. > > /* 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 **mbufs, unsigned num_mbufs) > { > ... > new_tag = next_mb->hash.usr; /* flow ID hash.usr is set by NIC */ > > for (i = 0; i < d->num_workers; i++) > match |= (!(d->in_flight_tags[i] ^ new_tag) << i); > > /* Only turned-on bits are considered as match */ > match &= d->in_flight_bitmask; > > unsigned worker = __builtin_ctzl(match); > ... > } > > 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_tag matches the inflight tag for the worker. We then find the matching worker, if any using count-training-zeros (ctz) operation. /Bruce > > Thank you very much. > > Sincerely Yours, > > Ick-Sung Choi. > > > -----Original Message----- > From: "Bruce Richardson"<bruce.richardson@intel.com> > To: "최익성"<pnk003@naver.com>; > Cc: <dev@dpdk.org>; > Sent: 2015-09-30 (수) 19:56:28 > Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library? > > On Wed, Sep 30, 2015 at 02:45:20PM +0900, 최익성 wrote: > > Dear DPDK experts. > > > > I am Ick-Sung Choi living in South Korea. > > > > I have a question about DPDK에 packet distributor library. > > > > Is there any example application to used DPDK packet distributor library? > > > > I am trying to experiment simple function using DPDK packet distributor library. > > > > If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment. > > > > I will appreciate if I can be given any example applications, advice, and information. > > > > Thank you very much. > > > > Sincerely Yours, > > > > Ick-Sung Choi. > > > Hi, > > there is a "distributor" example app in the examples directory. > > /Bruce >