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 DF14E7EC4 for ; Thu, 6 Nov 2014 14:48:07 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 06 Nov 2014 05:57:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,326,1413270000"; d="scan'208";a="603454932" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.32]) by orsmga001.jf.intel.com with SMTP; 06 Nov 2014 05:57:24 -0800 Received: by (sSMTP sendmail emulation); Thu, 06 Nov 2014 13:57:23 +0025 Date: Thu, 6 Nov 2014 13:57:23 +0000 From: Bruce Richardson To: Thomas Monjalon 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 Content-Disposition: inline In-Reply-To: <9190772.1rnKUO3oNV@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org, jigsaw Subject: Re: [dpdk-dev] [PATCH] Add user defined tag calculation callback to librte_distributor. 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: Thu, 06 Nov 2014 13:48:08 -0000 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