From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5E686DD2 for ; Fri, 4 May 2018 10:13:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 01:13:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,361,1520924400"; d="scan'208";a="225744118" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 04 May 2018 01:13:04 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 4 May 2018 01:13:04 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 4 May 2018 01:13:04 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by shsmsx102.ccr.corp.intel.com ([169.254.2.79]) with mapi id 14.03.0319.002; Fri, 4 May 2018 16:13:02 +0800 From: "Liu, Yong" To: "Burakov, Anatoly" , "dev@dpdk.org" Thread-Topic: [PATCH 1/3] mem: fix index for unmapping segments on failure Thread-Index: AQHT4scfUb3yIZT4I0KjThYINdipLKQfOang Date: Fri, 4 May 2018 08:13:01 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630330EC@SHSMSX103.ccr.corp.intel.com> References: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> In-Reply-To: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjk4NjhjNjAtZjVkZi00NzNjLWI1ZWQtNTJmMzZhMDZiODc1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiI0WWRkU1R1V0pZMkJ2eGNKXC96Yzg5UysyTDJ0STRZWFwvSmFTWEZlVVI0djBBZ043Ujl5dkNBMlArTHNnSDdxRU4ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/3] mem: fix index for unmapping segments on failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2018 08:13:06 -0000 Tested-by: Marvin Liu > -----Original Message----- > From: Burakov, Anatoly > Sent: Thursday, May 03, 2018 6:11 PM > To: dev@dpdk.org > Cc: Liu, Yong ; Burakov, Anatoly > > Subject: [PATCH 1/3] mem: fix index for unmapping segments on failure >=20 > Segment index was calculated incorrectly, causing free_seg to > attempt to free segments that do not exist. >=20 > Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime") > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c > b/lib/librte_eal/linuxapp/eal/eal_memalloc.c > index 360d8f7..c441c89 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c > +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c > @@ -735,8 +735,7 @@ alloc_seg_walk(const struct rte_memseg_list *msl, voi= d > *arg) > &cur_msl->memseg_arr; >=20 > tmp =3D rte_fbarray_get(arr, j); > - if (free_seg(tmp, wa->hi, msl_idx, > - start_idx + j)) { > + if (free_seg(tmp, wa->hi, msl_idx, j)) { > RTE_LOG(ERR, EAL, "Cannot free page\n"); > continue; > } > -- > 2.7.4