From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <keith.wiles@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 15CF31B4DB;
 Thu, 29 Nov 2018 15:54:22 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 29 Nov 2018 06:54:22 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.56,295,1539673200"; d="scan'208";a="113556881"
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by orsmga002.jf.intel.com with ESMTP; 29 Nov 2018 06:54:21 -0800
Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Thu, 29 Nov 2018 06:54:21 -0800
Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.100]) by
 FMSMSX119.amr.corp.intel.com ([169.254.14.189]) with mapi id 14.03.0415.000;
 Thu, 29 Nov 2018 06:54:21 -0800
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
CC: dpdk-dev <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] malloc: fix duplicate mem event notification
Thread-Index: AQHUh+7vxWmcCy20T0GIeOQ8DhE0xaVnXQ8A
Date: Thu, 29 Nov 2018 14:54:20 +0000
Message-ID: <D8B27CF4-BE99-4A06-8A94-86853BD480F8@intel.com>
References: <a3807707cec73b13b25cdd623440fbcb61f02134.1543501068.git.anatoly.burakov@intel.com>
In-Reply-To: <a3807707cec73b13b25cdd623440fbcb61f02134.1543501068.git.anatoly.burakov@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.252.193.14]
Content-Type: text/plain; charset="us-ascii"
Content-ID: <C13F01310104644AA15B65E0CDDE9B73@intel.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] malloc: fix duplicate mem event notification
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Nov 2018 14:54:23 -0000



> On Nov 29, 2018, at 8:21 AM, Anatoly Burakov <anatoly.burakov@intel.com> =
wrote:
>=20
> We already trigger a mem event notification inside the walk function,
> no need to do it twice.
>=20
> Fixes: f32c7c9de961 ("malloc: enable event callbacks for external memory"=
)
> Cc: stable@dpdk.org
>=20
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> lib/librte_eal/common/rte_malloc.c | 4 ----
> 1 file changed, 4 deletions(-)
>=20
> diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/r=
te_malloc.c
> index 0da5ad5e8..750a83c2c 100644
> --- a/lib/librte_eal/common/rte_malloc.c
> +++ b/lib/librte_eal/common/rte_malloc.c
> @@ -518,10 +518,6 @@ sync_memory(const char *heap_name, void *va_addr, si=
ze_t len, bool attach)
> 		rte_errno =3D -wa.result;
> 		ret =3D -1;
> 	} else {
> -		/* notify all subscribers that a new memory area was added */
> -		if (attach)
> -			eal_memalloc_mem_event_notify(RTE_MEM_EVENT_ALLOC,
> -					va_addr, len);
> 		ret =3D 0;
> 	}

This change leaves
	else {
		ret =3D 0;
	}

Needs to be:
	else
		ret =3D 0;


> unlock:
> --=20
> 2.17.1

Regards,
Keith