From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 902E6A10 for ; Thu, 10 Nov 2016 03:59:44 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 09 Nov 2016 18:59:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,616,1473145200"; d="scan'208";a="899776883" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by orsmga003.jf.intel.com with ESMTP; 09 Nov 2016 18:59:35 -0800 Received: from pgsmsx109.gar.corp.intel.com (10.221.44.109) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Nov 2016 10:59:35 +0800 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.114]) by PGSMSX109.gar.corp.intel.com ([10.221.44.109]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 10:59:35 +0800 From: "Dai, Wei" To: Olivier Matz , "dev@dpdk.org" CC: "Richardson, Bruce" Thread-Topic: [PATCH] app/test: fix crash of lpm test Thread-Index: AQHSOopx82wkfEpR7UiRF+OrxTAr76DRhgRg Date: Thu, 10 Nov 2016 02:59:34 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A2ED275@PGSMSX106.gar.corp.intel.com> References: <1478696906-20948-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1478696906-20948-1-git-send-email-olivier.matz@6wind.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmUwMzBiZmUtMTJkYy00Y2Y1LTkzM2UtZjQ4NTgzZGVlY2VjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiI0UFFhWlNManNcL2xGU09DK3c5MDN4cXRtM05SWHkzcExPbG5CalQ2VWw4OD0ifQ== x-ctpclassification: CTP_PUBLIC x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/test: fix crash of lpm test 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: Thu, 10 Nov 2016 02:59:45 -0000 Hi, Oliver Thanks for your catching this bug. After reviewing related codes, I can acknowledge it. Thanks -Wei > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Wednesday, November 9, 2016 9:08 PM > To: dev@dpdk.org; Dai, Wei > Cc: Richardson, Bruce > Subject: [PATCH] app/test: fix crash of lpm test >=20 > The test recently added accesses to lpm->tbl8[ip >> 8] with is much large= r than > the size of the table, causing a crash of the test application. >=20 > Fix this typo by replacing tbl8 by tbl24. >=20 > Fixes: 231fa88ed522 ("app/test: verify LPM tbl8 recycle") >=20 > Signed-off-by: Olivier Matz Acked-by: Wei Dai > --- >=20 > Hi Wei, >=20 > I don't know lpm very well and I did not spend much time to understand th= e > test case. I guess that's the proper fix, but please check carefully that= I'm not > doing something wrong :) >=20 > Thanks, > Olivier >=20 >=20 > app/test/test_lpm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 80e0efc..41a= e80f > 100644 > --- a/app/test/test_lpm.c > +++ b/app/test/test_lpm.c > @@ -1256,7 +1256,7 @@ test18(void) > rte_lpm_add(lpm, ip, depth, next_hop); >=20 > TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); > - tbl8_group_index =3D lpm->tbl8[ip>>8].group_idx; > + tbl8_group_index =3D lpm->tbl24[ip>>8].group_idx; >=20 > depth =3D 23; > next_hop =3D 2; > @@ -1272,7 +1272,7 @@ test18(void) > rte_lpm_add(lpm, ip, depth, next_hop); >=20 > TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); > - TEST_LPM_ASSERT(tbl8_group_index =3D=3D lpm->tbl8[ip>>8].group_idx); > + TEST_LPM_ASSERT(tbl8_group_index =3D=3D lpm->tbl24[ip>>8].group_idx); >=20 > depth =3D 24; > next_hop =3D 4; > @@ -1288,7 +1288,7 @@ test18(void) > rte_lpm_add(lpm, ip, depth, next_hop); >=20 > TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); > - TEST_LPM_ASSERT(tbl8_group_index =3D=3D lpm->tbl8[ip>>8].group_idx); > + TEST_LPM_ASSERT(tbl8_group_index =3D=3D lpm->tbl24[ip>>8].group_idx); >=20 > rte_lpm_free(lpm); > #undef group_idx > -- > 2.8.1