From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1CB8D3F9 for ; Wed, 3 Aug 2016 09:14:59 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 03 Aug 2016 00:14:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,465,1464678000"; d="scan'208";a="149803815" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by fmsmga004.fm.intel.com with ESMTP; 03 Aug 2016 00:14:58 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.132]) by KMSMSX152.gar.corp.intel.com ([169.254.11.241]) with mapi id 14.03.0248.002; Wed, 3 Aug 2016 15:13:56 +0800 From: "Dai, Wei" To: "dev@dpdk.org" , "Richardson, Bruce" Thread-Topic: [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete Thread-Index: AQHR7VVR7xD49Hsm5EGrQVykVjzaiKA20OUg Date: Wed, 3 Aug 2016 07:13:55 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A268892@PGSMSX106.gar.corp.intel.com> References: <1470035000-72828-1-git-send-email-wei.dai@intel.com> <1470207736-20760-1-git-send-email-wei.dai@intel.com> In-Reply-To: <1470207736-20760-1-git-send-email-wei.dai@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjA1NjY1YzAtODEzYS00OGZiLTg2NDItZDcwZmYwYThhNGM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJNV2pRdXgrRnFJWGVHRnBaNEdlcURkZW00OVlsYm1MQk1cL2hOXC8wUFwvVEk9In0= x-ctpclassification: CTP_IC x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete 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: Wed, 03 Aug 2016 07:15:00 -0000 This patch is same as patch 15063 which has been acked by Bruce Richardson. Only title and message body of git log has been revised according to Bruce'= s advice. > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, August 3, 2016 3:02 PM > To: dev@dpdk.org > Cc: Dai, Wei > Subject: [PATCH v3 1/3] lpm: fix freeing unused sub-table on rule delete >=20 > When all rules with depth > 24 are deleted in a same sub-table > (tlb8 group) and only a rule with depth <=3D24 is left in it, this sub-ta= ble (tlb8 > group) should be recycled. >=20 > Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") > Fixes: af75078fece3 ("first public release") >=20 > Signed-off-by: Wei Dai > --- > lib/librte_lpm/rte_lpm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index > 6f65d1c..24fec4b 100644 > --- a/lib/librte_lpm/rte_lpm.c > +++ b/lib/librte_lpm/rte_lpm.c > @@ -1533,7 +1533,7 @@ tbl8_recycle_check_v20(struct > rte_lpm_tbl_entry_v20 *tbl8, > * and if so check the rest of the entries to verify that they > * are all of this depth. > */ > - if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) { > + if (tbl8[tbl8_group_start].depth <=3D MAX_DEPTH_TBL24) { > for (i =3D (tbl8_group_start + 1); i < tbl8_group_end; > i++) { >=20 > @@ -1580,7 +1580,7 @@ tbl8_recycle_check_v1604(struct rte_lpm_tbl_entry > *tbl8, > * and if so check the rest of the entries to verify that they > * are all of this depth. > */ > - if (tbl8[tbl8_group_start].depth < MAX_DEPTH_TBL24) { > + if (tbl8[tbl8_group_start].depth <=3D MAX_DEPTH_TBL24) { > for (i =3D (tbl8_group_start + 1); i < tbl8_group_end; > i++) { >=20 > -- > 2.5.5