From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 1356B7E75 for ; Thu, 6 Nov 2014 13:27:42 +0100 (CET) Received: by mail-wi0-f175.google.com with SMTP id ex7so1349222wid.2 for ; Thu, 06 Nov 2014 04:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:mime-version:to:cc:from:subject:date:in-reply-to :references:content-type; bh=x3FoN0K6C7MmzNLXanASbh0eOiERpRhkv78PZI76PmI=; b=a0LOhkU+01js+XjPQcjWh8y9+RuswhVtBkFQsvlq17mQlPeQvJsOrOcZBjetlRrVex 3n/hLkihDhffSe8RlcJ/Kev6cA7PfTiBlyEaqZ0/lDHtL1f8Gn6o8eY9HlFh8ugRH7IW PgK4NrtuOdkMnxJAWUKJBiY5BWgGwVursDMd0+So2r+QKqP0dLsVZOBCblqcefQTIISD OY2P4mkDZ4+VAFSnHldOrE9zudHN2lF90NT4yGlZt3+0ys1s/GzwjoJpurPuAEKhGScn qWpJqgrRNa2aD4n8R0kNmA9Dl84pef9o249iXN64kwQLGsSaM+y3jsOZyDT+F9i+Qrq8 KDJQ== X-Received: by 10.180.12.136 with SMTP id y8mr41011270wib.73.1415277429279; Thu, 06 Nov 2014 04:37:09 -0800 (PST) Received: from [10.8.132.5] (mobile-internet-5d6a84-5.dhcp.inet.fi. [93.106.132.5]) by mx.google.com with ESMTPSA id ht9sm19375764wib.8.2014.11.06.04.37.07 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 06 Nov 2014 04:37:08 -0800 (PST) Message-ID: <545b6b74.a96db40a.26af.ffffe7fb@mx.google.com> MIME-Version: 1.0 To: Thomas Monjalon , Bruce Richardson From: Qinglai Xiao Date: Thu, 6 Nov 2014 14:36:09 +0200 In-Reply-To: <9190772.1rnKUO3oNV@xps13> References: <1415194237-1219-1-git-send-email-jigsaw@gmail.com> <20141106092228.GA3056@bricha3-MOBL3> <9190772.1rnKUO3oNV@xps13> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: [dpdk-dev] =?utf-8?b?562U5aSNOiAgW1BBVENIXSBBZGQgdXNlciBkZWZpbmVk?= =?utf-8?q?_tag_calculation_callback_tolibrte=5Fdistributor=2E?= 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 12:27:42 -0000 Hi Bruce, There is a subtle case in which tag values are 2 and 3, respectively. Then = these two tags cannot be distinguished. There should be a better way so as = to handle this situation. thx & rgds -qinglai -----=E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: "Thomas Monjalon" =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: =E2=80=8E2014/=E2=80=8E11/=E2=80=8E6 = 12:36 =E6=94=B6=E4=BB=B6=E4=BA=BA: "Bruce Richardson" =E6=8A=84=E9=80=81: "dev@dpdk.org" ; "jigsaw" =E4=B8=BB=E9=A2=98: Re: [dpdk-dev] [PATCH] Add user defined tag calculation= callback tolibrte_distributor. 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 > >=20 > > new_tag =3D (next_mb->hash.rss | 1); > >=20 > > Why the logical OR is needed? >=20 > 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 a= n > "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 --=20 Thomas