From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from p02c12o141.mxlogic.net (p02c12o141.mxlogic.net [208.65.145.74]) by dpdk.org (Postfix) with ESMTP id F12277E76 for ; Tue, 14 Oct 2014 14:28:20 +0200 (CEST) Received: from unknown [66.151.187.11] (EHLO smtp.sonusnet.com) by p02c12o141.mxlogic.net(mxl_mta-8.2.0-0) over TLS secured channel with ESMTP id 3b81d345.0.43085.00-327.115541.p02c12o141.mxlogic.net (envelope-from ); Tue, 14 Oct 2014 06:36:05 -0600 (MDT) X-MXL-Hash: 543d18b57f6ec1c1-5754bd337e2f1b02b8244d755e619048998d3693 Received: from INBA-HUB02.sonusnet.com (10.70.51.87) by psmwsonshc01.sonusnet.com (10.176.20.27) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 14 Oct 2014 08:36:02 -0400 Received: from INBA-MAIL02.sonusnet.com ([10.70.51.89]) by inba-hub02.sonusnet.com ([fe80::80b9:dc60:caf7:7dfc%11]) with mapi id 14.03.0181.006; Tue, 14 Oct 2014 18:06:00 +0530 From: Karmarkar Suyash To: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: Bug in IPACL library of DPDK-1.6.0 Thread-Index: Ac/nlN/T4HWZL3EbQoWoKK2IGfS6ZQABrq6AAAOG40A= Date: Tue, 14 Oct 2014 12:36:00 +0000 Message-ID: References: <2601191342CEEE43887BDE71AB9772582139376B@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772582139376B@IRSMSX105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.70.54.115] MIME-Version: 1.0 X-AnalysisOut: [v=2.1 cv=HeUAT008 c=1 sm=1 tr=0 a=uJKQf5YWhIR+nybujYFUDg==] X-AnalysisOut: [:117 a=uJKQf5YWhIR+nybujYFUDg==:17 a=URNJFqk9g_oA:10 a=DnJ] X-AnalysisOut: [vd8ePZSEA:10 a=BLceEmwcHowA:10 a=xqWC_Br6kY4A:10 a=kUVcWBO] X-AnalysisOut: [SAAAA:8 a=YlVTAMxIAAAA:8 a=QyXUC8HyAAAA:8 a=8rWy6zfcAAAA:8] X-AnalysisOut: [ a=uRC9qUwPoGpz68zD-wUA:9 a=EkYnctv8oKrs1TWf:21 a=Ug1zcA4Q] X-AnalysisOut: [WR1n-hz_:21 a=CjuIK1q_8ugA:10 a=dGJ0OcVc7YAA:10 a=SumTzdpx] X-AnalysisOut: [xCEA:10 a=hDSRnINNJ1XKo4UOl4MA:9 a=EFsQcEeCD1FtI7lI:21 a=v] X-AnalysisOut: [SneYcJ45oabzIIt:21 a=Y7tYCDz8Px_-hO-g:21 a=_W_S_7VecoQA:10] X-AnalysisOut: [ a=frz4AuCg-hUA:10] X-Spam: [F=0.5000000000; CM=0.500; MH=0.500(2014101409); S=0.200(2014051901)] X-MAIL-FROM: X-SOURCE-IP: [66.151.187.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 12:28:22 -0000 There are two user defined ACL rules and they are added with just different= priority - 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 = during lookup. The structure is - 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 }; 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), }, ///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)= , }, ///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)= , }, ///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), } } ; -----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 Hi, > -----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 a= lways the rule that is added first in TRIE is returned even though the seco= nd rule that has highest priority. > Could you provide a bit more details how to reproduce the problem: - either a rule and trace file to reproduce the problem in testacl (classsb= ench) format -or some simple code snippet. Thanks Konstantin > Regards > Suyash Karmarkar