From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D541258F4 for ; Mon, 9 Feb 2015 17:30:25 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 09 Feb 2015 08:25:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,544,1418112000"; d="scan'208";a="663772041" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 09 Feb 2015 08:30:21 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.81]) by IRSMSX103.ger.corp.intel.com ([169.254.3.242]) with mapi id 14.03.0195.001; Mon, 9 Feb 2015 16:28:44 +0000 From: "Ananyev, Konstantin" To: "Rapelly, Varun" Thread-Topic: [dpdk-dev] ACL Issue with single field rule and rest with wild card entry Thread-Index: AdBB2ilgEOVy0gd2QUSH2CQSr8o33pzj0aSwgAAFB1CAAAETYJzei7LA Date: Mon, 9 Feb 2015 16:28:43 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213E4668@irsmsx105.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB977258213E389A@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] ACL Issue with single field rule and rest with wild card entry 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: Mon, 09 Feb 2015 16:30:26 -0000 Hi Varun, > -----Original Message----- > From: Rapelly, Varun [mailto:vrapelly@sonusnet.com] > Sent: Friday, February 06, 2015 4:58 PM > To: Ananyev, Konstantin > Subject: FW: [dpdk-dev] ACL Issue with single field rule and rest with wi= ld card entry >=20 > Sorry for too many mails. :) >=20 > I tried with DPDK 1.7 also, but got the same different results as 1.6.0 := ( I just tried with v1.7.0-rc4. For me results are absolutely the same for both cases: rte_acl_classify() returns 0 , res[0]=3D11 That's on HSW, fedora 20, gcc 4.8.3. Same for IVB, fedora 16 with gcc 4.6 RTE_TARGET=3Dx86_64-native-linuxapp-gcc Not sure why you are getting different results then me with DPDK 1.7. I suppose you didn't modify ACL library in any way? BTW, do you realise that in you test you specify 'size =3D sizeof (uint8_t)= ' for all your fields? It doesn't really matter for that particular test case, as all fields excep= t the very first one are wildcards, but in real app, it shouldn't be that way. Konstantin >=20 > Regards, > Varun > -----Original Message----- > From: Rapelly, Varun > Sent: Friday, February 06, 2015 10:24 PM > To: 'Ananyev, Konstantin' > Subject: FW: [dpdk-dev] ACL Issue with single field rule and rest with wi= ld card entry >=20 > Hi Konstantin, >=20 > FYI: I'm using DPDK 1.6.0 >=20 > -----Original Message----- > From: Rapelly, Varun > Sent: Friday, February 06, 2015 10:08 PM > To: 'Ananyev, Konstantin' > Subject: RE: [dpdk-dev] ACL Issue with single field rule and rest with wi= ld card entry >=20 > Hi Konstantin, >=20 > Thanks for your quick response. >=20 > I'm getting different results: >=20 > With 118-125 lines commented: >=20 > ACL: Gen phase for ACL "ACL_example": > runtime memory footprint on socket -1: > single nodes/bytes used: 0/0 > quad nodes/bytes used: 0/0 > DFA nodes/bytes used: 1/2048 > match nodes/bytes used: 4/512 > total: 4960 bytes > ACL: Build phase for ACL "ACL_example": > memory consumed: 8388615 > ACL: trie 0: number of rules: 4 > rte_acl_classify() returns 0 > , res[0]=3D0 >=20 > With uncommented: > ACL: Gen phase for ACL "ACL_example": > runtime memory footprint on socket -1: > single nodes/bytes used: 12/96 > quad nodes/bytes used: 4/96 > DFA nodes/bytes used: 1/2048 > match nodes/bytes used: 4/512 > total: 5152 bytes > ACL: Build phase for ACL "ACL_example": > memory consumed: 8388615 > ACL: trie 0: number of rules: 4 > rte_acl_classify() returns 0 > , res[0]=3D11 >=20 > Please let me know, is it depends on any other environment variables or w= hat? >=20 > Regards, > Varun >=20 > -----Original Message----- > From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] > Sent: Friday, February 06, 2015 5:15 PM > To: Rapelly, Varun; dev@dpdk.org > Subject: RE: [dpdk-dev] ACL Issue with single field rule and rest with wi= ld card entry >=20 > Hi Varun, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rapelly, Varun > > Sent: Friday, February 06, 2015 7:25 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] ACL Issue with single field rule and rest with > > wild card entry > > > > Hi, > > > > struct ipv6_5tuple { > > uint8_t proto; /* Protocol, next header. */ > > uint32_t src_addr0; /* IP address of source host. */ > > uint32_t src_addr1; /* IP address of source host. */ > > uint32_t src_addr2; /* IP address of source host. */ > > uint32_t src_addr3; /* IP address of source host. */ }; > > > > enum { > > PROTO_FIELD_IPV6, > > SRC_FIELD0_IPV6, > > SRC_FIELD1_IPV6, > > SRC_FIELD2_IPV6, > > SRC_FIELD3_IPV6, > > NUM_FIELDS_IPV6 > > }; > > > > > > I'm using the above data to insert in to ACL trie. > > > > If I'm inserting rules with only different proto fields, [I'm expecting= others fields as wild card entries] then the rules are not > matching. > > > > But if I insert one rule with dummy entries [in the attached file line = num 118-125], then the above issue is resolved. >=20 > Hmm, it is strange... > I took your source code compiled it, then commented out lines 118-125 and= recompiled it. > Both binaries produce valid result for me: >=20 > 1. original code: > ACL: Gen phase for ACL "ACL_example": > runtime memory footprint on socket -1: > single nodes/bytes used: 0/0 > quad nodes/vectors/bytes used: 0/0/0 > DFA nodes/group64/bytes used: 1/4/4104 > match nodes/bytes used: 4/512 > total: 6816 bytes > max limit: 18446744073709551615 bytes > ACL: Build phase for ACL "ACL_example": > node limit for tree split: 2048 > nodes created: 5 > memory consumed: 8388615 > ACL: trie 0: number of rules: 4, indexes: 1 > rte_acl_classify() returns 0 > , res[0]=3D11 >=20 >=20 > 2. code with lines 118-125 commented out: > ACL: Gen phase for ACL "ACL_example": > runtime memory footprint on socket -1: > single nodes/bytes used: 0/0 > quad nodes/vectors/bytes used: 0/0/0 > DFA nodes/group64/bytes used: 1/4/4104 > match nodes/bytes used: 3/384 > total: 6688 bytes > max limit: 18446744073709551615 bytes > ACL: Build phase for ACL "ACL_example": > node limit for tree split: 2048 > nodes created: 4 > memory consumed: 8388615 > ACL: trie 0: number of rules: 3, indexes: 1 > rte_acl_classify() returns 0 > , res[0]=3D11 >=20 > Wonder what results are you getting for both cases? >=20 > Konstantin >=20 > > > > Please let me know: > > > > > > 1. Can we have rules with only one entry and others as wild card = entries? > > > > 2. Is there any other way to match wild card entries in a rule? > > > > Regards, > > Varun