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 1905D1BB76; Thu, 10 May 2018 17:47:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2018 08:47:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,385,1520924400"; d="scan'208";a="40213823" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga008.jf.intel.com with ESMTP; 10 May 2018 08:47:31 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.214]) by IRSMSX154.ger.corp.intel.com ([169.254.12.181]) with mapi id 14.03.0319.002; Thu, 10 May 2018 16:47:30 +0100 From: "Ananyev, Konstantin" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone Thread-Index: AQHT4vf+41YhARnXJUGPupmZTG9e06QpJlfw Date: Thu, 10 May 2018 15:47:29 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AEDC5650@irsmsx105.ger.corp.intel.com> References: <4b68272d7ef0d47ec64c5004a548eef04baa15db.1525362936.git.anatoly.burakov@intel.com> In-Reply-To: <4b68272d7ef0d47ec64c5004a548eef04baa15db.1525362936.git.anatoly.burakov@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzZiNzI1Y2UtNDVmYy00ODE5LWE5YjQtYTBmNDQzNmUyMzhhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlhPZ1E1dlExZDdvUXkxOXVuam5QV2UxV2lhb2RmRjgxTVRcL2JaYjlcL2lJMD0ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 15:47:38 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Thursday, May 3, 2018 5:01 PM > To: dev@dpdk.org > Cc: stable@dpdk.org > Subject: [dpdk-dev] [PATCH] memzone: fix memzone size on reserving bigges= t memzone >=20 > Size of malloc heap elements include overhead, which sould not > be counted as part of memzone. >=20 > Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") > Cc: stable@dpdk.org >=20 > Signed-off-by: Anatoly Burakov > --- Acked-by: Konstantin Ananyev > lib/librte_eal/common/eal_common_memzone.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/= common/eal_common_memzone.c > index bce3321..0595b3a 100644 > --- a/lib/librte_eal/common/eal_common_memzone.c > +++ b/lib/librte_eal/common/eal_common_memzone.c > @@ -213,7 +213,8 @@ memzone_reserve_aligned_thread_unsafe(const char *nam= e, size_t len, > snprintf(mz->name, sizeof(mz->name), "%s", name); > mz->iova =3D rte_malloc_virt2iova(mz_addr); > mz->addr =3D mz_addr; > - mz->len =3D (requested_len =3D=3D 0 ? elem->size : requested_len); > + mz->len =3D (requested_len =3D=3D 0 ? > + (elem->size - MALLOC_ELEM_OVERHEAD) : requested_len); > mz->hugepage_sz =3D elem->msl->page_sz; > mz->socket_id =3D elem->msl->socket_id; > mz->flags =3D 0; > -- > 2.7.4