From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] Add user defined tag calculation callback to librte_distributor. Date: Thu, 6 Nov 2014 13:57:23 +0000 Message-ID: <20141106135723.GA7252@bricha3-MOBL3> References: <1415194237-1219-1-git-send-email-jigsaw@gmail.com> <20141106092228.GA3056@bricha3-MOBL3> <9190772.1rnKUO3oNV@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org, jigsaw To: Thomas Monjalon Return-path: Content-Disposition: inline In-Reply-To: <9190772.1rnKUO3oNV@xps13> 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" On Thu, Nov 06, 2014 at 11:36:09AM +0100, Thomas Monjalon wrote: > 2014-11-06 09:22, Bruce Richardson: > > On Wed, Nov 05, 2014 at 07:24:13PM +0200, jigsaw wrote: > > > http://dpdk.org/browse/dpdk/tree/lib/librte_distributor/rte_distributor.c#n285 > > > > > > new_tag = (next_mb->hash.rss | 1); > > > > > > Why the logical OR is needed? > > > > That's needed to ensure that we never track a tag with an actual value of zero. > > We instead always force the low bit to be 1, so that we can use zero as an > > "empty" value. > > Bruce, could you check how this code may be better commented please? > This discussion shows that the distributor library probably needs more > explanations in the code or doxygen. > I've sent a patch adding in a couple of comments where I thought some additional clarification might been needed. Any other places where more info is needed, just let me know, and I'll be happy to patch that extra info in too. /Bruce