From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 9BAE75A15
 for <dev@dpdk.org>; Tue, 20 Jan 2015 11:10:00 +0100 (CET)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga101.fm.intel.com with ESMTP; 20 Jan 2015 02:09:59 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.09,433,1418112000"; d="scan'208";a="639770956"
Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159])
 by orsmga001.jf.intel.com with ESMTP; 20 Jan 2015 02:09:58 -0800
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.81]) by
 IRSMSX104.ger.corp.intel.com ([169.254.5.229]) with mapi id 14.03.0195.001;
 Tue, 20 Jan 2015 10:09:57 +0000
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH v2 17/17] libte_acl: remove unused macros.
Thread-Index: AQHQNAvh07xK6FjPxkmAmm4UiJcWc5zIyWdg
Date: Tue, 20 Jan 2015 10:09:57 +0000
Message-ID: <2601191342CEEE43887BDE71AB977258213DE05E@irsmsx105.ger.corp.intel.com>
References: <1421090181-17150-1-git-send-email-konstantin.ananyev@intel.com>
 <1421090181-17150-18-git-send-email-konstantin.ananyev@intel.com>
 <29033074.MP6L2bYt2c@xps13>
In-Reply-To: <29033074.MP6L2bYt2c@xps13>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 17/17] libte_acl: remove unused macros.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Jan 2015 10:10:01 -0000

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, January 19, 2015 5:18 PM
> To: Ananyev, Konstantin
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 17/17] libte_acl: remove unused macros.
>=20
> 2015-01-12 19:16, Konstantin Ananyev:
> >  /*
> > + * ACL RT structure is a set of multibit tries (with stride =3D=3D 8)
> > + * represented by an array of transitions. The next position is calcul=
ated
> > + * based on the current position and the input byte.
> > + * Each transition is 64 bit value with the following format:
> > + * | node_type_specific : 32 | node_type : 3 | node_addr : 29 |
> > + * For all node types except RTE_ACL_NODE_MATCH, node_addr is an index
> > + * to the start of the node in the transtions array.
> > + * Few different node types are used:
> > + * RTE_ACL_NODE_MATCH:
> > + * node_addr value is and index into an array that contains the return=
 value
> > + * and its priority for each category.
> > + * Upper 32 bits of the transtion value are not used for that node typ=
e.
> > + * RTE_ACL_NODE_QRANGE:
> > + * that node consist of up to 5 transitions.
> > + * Upper 32 bits are interpreted as 4 signed character values which
> > + * are ordered from smallest(INT8_MIN) to largest (INT8_MAX).
> > + * These values define 5 ranges:
> > + * INT8_MIN <=3D range[0]  <=3D ((int8_t *)&transition)[4]
> > + * ((int8_t *)&transition)[4] < range[1] <=3D ((int8_t *)&transition)[=
5]
> > + * ((int8_t *)&transition)[5] < range[2] <=3D ((int8_t *)&transition)[=
6]
> > + * ((int8_t *)&transition)[6] < range[3] <=3D ((int8_t *)&transition)[=
7]
> > + * ((int8_t *)&transition)[7] < range[4] <=3D INT8_MAX
> > + * So for input byte value within range[i] i-th transition within that=
 node
> > + * will be used.
> > + * RTE_ACL_NODE_SINGLE:
> > + * always transitions to the same node regardless of the input value.
> > + * RTE_ACL_NODE_DFA:
> > + * that node consits of up to 256 transitions.
> > + * In attempt to conserve space all transitions are divided into 4 con=
secutive
> > + * groups, by 64 transitions per group:
> > + * group64[i] contains transitions[i * 64, .. i * 64 + 63].
> > + * Upper 32 bits are interpreted as 4 unsigned character values one pe=
r group,
> > + * which contain index to the start of the given group within the node=
.
> > + * So to calculate transition index within the node for given input by=
te value:
> > + * input_byte - ((uint8_t *)&transition)[4 + input_byte / 64].
> > + */
>=20
> It's maybe an error. You were only supposed to remove some macros in this=
 patch.

Ah yes, I added some comments about ACL internal layout.
Thought it might be useful.
Forgot to add it into patch description.=20
Are you saying I need to split it into 2 patches, or it is ok like that?
Konstantin

>=20
> --
> Thomas