summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2018-05-03 09:28:00 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-05-08 22:28:58 +0200
commit0256386dc43ce0f27f4c9d6bfa58c534aaf997e2 (patch)
treed856287bd9f0dbe5c94d8298882f813583571624 /drivers/bus/fslmc
parent5751ff40fed0f7dc359e983d80c768126328561f (diff)
downloaddpdk-0256386dc43ce0f27f4c9d6bfa58c534aaf997e2.zip
dpdk-0256386dc43ce0f27f4c9d6bfa58c534aaf997e2.tar.gz
dpdk-0256386dc43ce0f27f4c9d6bfa58c534aaf997e2.tar.xz
mem: add argument to memory event callback
It may be useful to pass arbitrary data to the callback (such as device pointers), so add this to the mem event callback API. Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'drivers/bus/fslmc')
-rw-r--r--drivers/bus/fslmc/fslmc_vfio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 3800c26..6ecd64a 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -194,7 +194,8 @@ static int fslmc_map_dma(uint64_t vaddr, rte_iova_t iovaddr, size_t len);
static int fslmc_unmap_dma(uint64_t vaddr, rte_iova_t iovaddr, size_t len);
static void
-fslmc_memevent_cb(enum rte_mem_event type, const void *addr, size_t len)
+fslmc_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
+ void *arg __rte_unused)
{
struct rte_memseg_list *msl;
struct rte_memseg *ms;
@@ -347,7 +348,7 @@ int rte_fslmc_vfio_dmamap(void)
}
ret = rte_mem_event_callback_register("fslmc_memevent_clb",
- fslmc_memevent_cb);
+ fslmc_memevent_cb, NULL);
if (ret && rte_errno == ENOTSUP)
DPAA2_BUS_DEBUG("Memory event callbacks not supported");
else if (ret)