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 A46EE5A6B for ; Fri, 6 Nov 2015 06:39:49 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 05 Nov 2015 21:39:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,250,1444719600"; d="scan'208";a="594969376" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 05 Nov 2015 21:39:49 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 21:39:48 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 21:39:48 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.100]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.57]) with mapi id 14.03.0248.002; Fri, 6 Nov 2015 13:39:46 +0800 From: "Wu, Jingjing" To: "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [PATCH] i40e: fix the issue of not freeing memzone Thread-Index: AQHRGEL4Obdr8WOoKkSyo25s/PgzxZ6OeKJw Date: Fri, 6 Nov 2015 05:39:46 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8D239E5@SHSMSX104.ccr.corp.intel.com> References: <1446780365-1271-1-git-send-email-helin.zhang@intel.com> In-Reply-To: <1446780365-1271-1-git-send-email-helin.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] i40e: fix the issue of not freeing memzone 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: Fri, 06 Nov 2015 05:39:50 -0000 > - static uint64_t id =3D 0; > const struct rte_memzone *mz =3D NULL; > char z_name[RTE_MEMZONE_NAMESIZE]; >=20 > if (!mem) > return I40E_ERR_PARAM; >=20 > - id++; > - snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, id); > + snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, rte_rand()); Why change id++ to rte_rand() ? > #ifdef RTE_LIBRTE_XEN_DOM0 > mz =3D rte_memzone_reserve_bounded(z_name, size, > SOCKET_ID_ANY, 0, > alignment, RTE_PGSIZE_2M); > @@ -2929,7 +2927,6 @@ > i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw, > if (!mz) > return I40E_ERR_NO_MEMORY; >=20 > - mem->id =3D id; > mem->size =3D size; > mem->va =3D mz->addr; > #ifdef RTE_LIBRTE_XEN_DOM0 > @@ -2937,6 +2934,8 @@ > i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw, > #else > mem->pa =3D mz->phys_addr; > #endif > + mem->zone =3D (const void *)mz; > + PMD_DRV_LOG(DEBUG, "memzone allocated: %p", mem->zone); >=20 Why not print the name of mem_zone instead of pointer? Thanks Jingjing