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

Reply via email to