From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06178A04A2; Mon, 4 Nov 2019 11:25:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDF8D3977; Mon, 4 Nov 2019 11:25:20 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 232B137B4 for ; Mon, 4 Nov 2019 11:25:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2019 02:25:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,266,1569308400"; d="scan'208";a="402933802" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.92]) ([10.237.220.92]) by fmsmga006.fm.intel.com with ESMTP; 04 Nov 2019 02:25:16 -0800 To: Rajesh Ravi Cc: Ajit Khaparde , dev@dpdk.org, Jonathan Richardson , Scott Branden , Vikram Mysore Prakash , Srinath Mannam References: <20191015053047.52260-1-ajit.khaparde@broadcom.com> <83009bb3-1e0c-a22e-eff8-41a437817cb7@intel.com> <64edebee-3686-beca-2b30-c6ec1f26c162@intel.com> <31bff5b7-169c-e158-3a87-6448272c571c@intel.com> From: "Burakov, Anatoly" Message-ID: <32f3cd1a-08bb-e4bc-c22c-53453b936dd3@intel.com> Date: Mon, 4 Nov 2019 10:25:15 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] eal: add option --iso-cmem for external custom memory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 30-Oct-19 7:50 PM, Rajesh Ravi wrote: > Thanks Anatoly. > Please find  inline below: > > [Anatoly] vfio_mem_event_callback() is called every time memory is added > to a > heap. That includes internal and external memory > > [Rajesh] malloc_heap_add_external_memory() does call > eal_memalloc_mem_event_notify [ instead of vfio_mem_event_callback() ] >               But, no callback function is getting called from inside > eal_memalloc_mem_event_notify() >               execution flow is not entering inside following loop: > > /TAILQ_FOREACH(entry, &mem_event_callback_list, next) {/ > /                 RTE_LOG(DEBUG, EAL, "Calling mem event callback > '%s:%p'\n", >                          entry->name, entry->arg); >                  entry->clb(event, start, len, entry->arg); >               }/ > > Do you mean to say,  we are supposed to explicitly register a callback > which separately builds  iommu tables in addition to calling > rte_malloc_heap_memory_add()  API? Hi, No, the callback in VFIO should be registered automatically [1] at EAL initialization (or, more precisely, when default container is initialized). Does that not happen in your case? [1] http://git.dpdk.org/dpdk/tree/lib/librte_eal/linux/eal/eal_vfio.c#n791 -- Thanks, Anatoly