From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2490B7E8C for ; Tue, 14 Oct 2014 16:37:38 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 14 Oct 2014 07:45:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="400050158" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by FMSMGA003.fm.intel.com with ESMTP; 14 Oct 2014 07:38:11 -0700 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 14 Oct 2014 15:44:38 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.174]) by IRSMSX151.ger.corp.intel.com ([169.254.4.146]) with mapi id 14.03.0195.001; Tue, 14 Oct 2014 15:44:38 +0100 From: "Ananyev, Konstantin" To: Karmarkar Suyash , "dev@dpdk.org" Thread-Topic: Bug in IPACL library of DPDK-1.6.0 Thread-Index: Ac/nlN/T4HWZL3EbQoWoKK2IGfS6ZQABrq6AAAOG40AAAopFUA== Date: Tue, 14 Oct 2014 14:44:37 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725821393825@IRSMSX105.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB9772582139376B@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: "Dey, Souvik" , "Patil, PraveenKumar" Subject: Re: [dpdk-dev] Bug in IPACL library of DPDK-1.6.0 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: Tue, 14 Oct 2014 14:37:39 -0000 > From: Karmarkar Suyash [mailto:skarmarkar@sonusnet.com] > Sent: Tuesday, October 14, 2014 1:36 PM > To: Ananyev, Konstantin; dev@dpdk.org > Cc: Dey, Souvik; Patil, PraveenKumar > Subject: RE: Bug in IPACL library of DPDK-1.6.0 >=20 > There are two user defined ACL rules and they are added with just differe= nt priority - >=20 > 1. And all other fields are wild card: > * SOURCE IP and DEST IP =3D wild card (*) > * LIF_GRP_INFO_FIELD_IPV6 =3D wild card (*) > * PORTS =3D wild card (*) > 2. Only next header protocol is specified =3D ICMPv6 (58) > 3. Priority is different. But the one with lower priority is returned dur= ing lookup. >=20 Hm, I tried what your described - works ok for me. Are you saying you are still using DPDK 1.6 IPL? If so, can you upgrade to 1.7 and give it another try? There was one bug fixed in 1.7 very similar to what you describing: http://dpdk.org/ml/archives/dev/2014-June/003198.html Konstantin > The structure is - >=20 > enum > { > NEXT_HDR_FIELD_IPV4, //8 > IPSRC_FIELD_IPV4, //src ip (32) > IPDST_FIELD_IPV4, //dst ip (32) > PORTS_FIELD_IPV4, // src port (16) + dest port (16) =3D> 32 > LIF_GRP_INFO_FIELD_IPV4, //lif group (16) + lif Id (16) =3D> 32 > ADDR_CTX_FIELD_IPV4, //addr context (32) > NUM_FIELDS_IPV4 > }; >=20 >=20 >=20 > struct rte_acl_field_def ipv6_defs[NUM_FIELDS_IPV6] =3D { > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint8_t), > .field_index =3D NEXT_HDR_FIELD_IPV6, > .input_index =3D NEXT_HDR_FIELD_IPV6, > .offset =3D offsetof(struct ipv6_hdr, proto), > }, >=20 > ///source ip > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPSRC_FIELD0_IPV6, > .input_index =3D IPSRC_FIELD0_IPV6, > .offset =3D offsetof(struct ipv6_hdr, src_addr), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPSRC_FIELD1_IPV6, > .input_index =3D IPSRC_FIELD1_IPV6, > .offset =3D offsetof(struct ipv6_hdr, src_addr) + 1*sizeof (uint32_= t), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPSRC_FIELD2_IPV6, > .input_index =3D IPSRC_FIELD2_IPV6, > .offset =3D offsetof(struct ipv6_hdr, src_addr) + 2*sizeof (uint32_= t), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPSRC_FIELD3_IPV6, > .input_index =3D IPSRC_FIELD3_IPV6, > .offset =3D offsetof(struct ipv6_hdr, src_addr) + 3*sizeof (uint32_= t), > }, >=20 > ///destination ip > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPDST_FIELD0_IPV6, > .input_index =3D IPDST_FIELD0_IPV6, > .offset =3D offsetof(struct ipv6_hdr, dst_addr), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPDST_FIELD1_IPV6, > .input_index =3D IPDST_FIELD1_IPV6, > .offset =3D offsetof(struct ipv6_hdr, dst_addr) + 1*sizeof (uint32_= t), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPDST_FIELD2_IPV6, > .input_index =3D IPDST_FIELD2_IPV6, > .offset =3D offsetof(struct ipv6_hdr, dst_addr) + 2*sizeof (uint32_= t), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D IPDST_FIELD3_IPV6, > .input_index =3D IPDST_FIELD3_IPV6, > .offset =3D offsetof(struct ipv6_hdr, dst_addr) + 3*sizeof (uint32_= t), > }, >=20 > ///ports > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D PORTS_FIELD_IPV6, > .input_index =3D PORTS_FIELD_IPV6, > .offset =3D sizeof(struct ipv6_hdr) , > }, > //LIF grp and addr ctx > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D LIF_GRP_INFO_FIELD_IPV6, > .input_index =3D LIF_GRP_INFO_FIELD_IPV6, > .offset =3D sizeof(struct ipv6_hdr) + sizeof (uint32_t), > }, > { > .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > .size =3D sizeof (uint32_t), > .field_index =3D ADDR_CTX_FIELD_IPV6, > .input_index =3D ADDR_CTX_FIELD_IPV6, > .offset =3D sizeof(struct ipv6_hdr) + 2*sizeof (uint32_t), > } > } ; >=20 >=20 >=20 >=20 > -----Original Message----- > From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] > Sent: Tuesday, October 14, 2014 4:16 PM > To: Karmarkar Suyash; dev@dpdk.org > Cc: Dey, Souvik; Patil, PraveenKumar > Subject: RE: Bug in IPACL library of DPDK-1.6.0 >=20 > Hi, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Karmarkar Suyash > > Sent: Tuesday, October 14, 2014 10:55 AM > > To: dev@dpdk.org > > Cc: Dey, Souvik; Patil, PraveenKumar > > Subject: [dpdk-dev] Bug in IPACL library of DPDK-1.6.0 > > > > Hello All, > > > > If there are two identical IPv6 rules with source and destination IP > > addresses as wild card but with different priority, then during lookup = always the rule that is added first in TRIE is returned even > though the second rule that has highest priority. > > >=20 > Could you provide a bit more details how to reproduce the problem: > - either a rule and trace file to reproduce the problem in testacl (class= sbench) format -or some simple code snippet. >=20 > Thanks > Konstantin >=20 > > Regards > > Suyash Karmarkar >=20 >