From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 6128B5907 for ; Thu, 6 Nov 2014 11:27:01 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id n12so821791wgh.27 for ; Thu, 06 Nov 2014 02:36:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=Y7NIPky2OhCzthicKM5/PL6eypoXf0ayNk+ykZTESJw=; b=QExNL18d7i8SW76FV7yYTYxGiURi5PBKUXKAi+ZmIe1KpuRioYNt2jb0Ffw3GAavsY P48f55mAjxqcAxYXgMpzAB8b/Ejp1y952S7QSkeWtxoFHpFsTxio707d/aJZcyHga65J +Mvddp8agboXgkfLBf5xwzuGxapPzo4fq+UsbtG5xI0RQfeMq3G3LeoyQVFwcY4Te84K U5nUV8QbFCDGPELnmNdt+6KrdF3K0QHPEgH85UGg/w0wXhDs+9Cyntong1lGuamxPC2L JodcbMnKUkH924IyHJfZ/F7nbCTW4mVCb5l6abuXo6D34ryV5LrjtRMGS06nT7hXGeu5 DhZA== X-Gm-Message-State: ALoCoQlUKPgaA6YUIzFP2UgIR9G5OGiKFDomPYPvnH1h0dzuj6Gsi4H0QIUpAWC8Mo2YJ0mvy1Kr X-Received: by 10.180.208.35 with SMTP id mb3mr4970089wic.49.1415270188360; Thu, 06 Nov 2014 02:36:28 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id fa7sm7265671wjd.27.2014.11.06.02.36.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Nov 2014 02:36:27 -0800 (PST) From: Thomas Monjalon To: Bruce Richardson Date: Thu, 06 Nov 2014 11:36:09 +0100 Message-ID: <9190772.1rnKUO3oNV@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <20141106092228.GA3056@bricha3-MOBL3> References: <1415194237-1219-1-git-send-email-jigsaw@gmail.com> <20141106092228.GA3056@bricha3-MOBL3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 10:27:01 -0000 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. Thanks -- Thomas