summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
diff options
context:
space:
mode:
authorHemant Agrawal <hemant.agrawal@nxp.com>2018-04-12 11:53:37 +0530
committerThomas Monjalon <thomas@monjalon.net>2018-04-13 01:06:57 +0200
commit964b2f3bfb07ae95fcf4570269a6bc0e1c0affec (patch)
tree8f7eac0d57d2e755836f4cc052b7c213413ee31f /drivers/bus/fslmc
parentc94eb6db0adba3f71fa469dbacffe6fca93a354d (diff)
downloaddpdk-964b2f3bfb07ae95fcf4570269a6bc0e1c0affec.zip
dpdk-964b2f3bfb07ae95fcf4570269a6bc0e1c0affec.tar.gz
dpdk-964b2f3bfb07ae95fcf4570269a6bc0e1c0affec.tar.xz
vfio: export some internal functions
This patch moves some of the internal vfio functions from eal_vfio.h to rte_vfio.h for common uses with "rte_" prefix. This patch also change the FSLMC bus usages from the internal VFIO functions to external ones with "rte_" prefix Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'drivers/bus/fslmc')
-rw-r--r--drivers/bus/fslmc/Makefile1
-rw-r--r--drivers/bus/fslmc/fslmc_vfio.c7
-rw-r--r--drivers/bus/fslmc/fslmc_vfio.h2
-rw-r--r--drivers/bus/fslmc/meson.build1
4 files changed, 4 insertions, 7 deletions
diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile
index 93870ba..3aa34e2 100644
--- a/drivers/bus/fslmc/Makefile
+++ b/drivers/bus/fslmc/Makefile
@@ -16,7 +16,6 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc
CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/mc
CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/qbman/include
-CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 625fa7c..4036e82 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -91,7 +91,8 @@ fslmc_get_container_group(int *groupid)
}
/* get group number */
- ret = vfio_get_group_no(SYSFS_FSL_MC_DEVICES, g_container, groupid);
+ ret = rte_vfio_get_group_num(SYSFS_FSL_MC_DEVICES,
+ g_container, groupid);
if (ret <= 0) {
DPAA2_BUS_ERR("Unable to find %s IOMMU group", g_container);
return -1;
@@ -124,7 +125,7 @@ vfio_connect_container(void)
}
/* Opens main vfio file descriptor which represents the "container" */
- fd = vfio_get_container_fd();
+ fd = rte_vfio_get_container_fd();
if (fd < 0) {
DPAA2_BUS_ERR("Failed to open VFIO container");
return -errno;
@@ -726,7 +727,7 @@ fslmc_vfio_setup_group(void)
}
/* Get the actual group fd */
- ret = vfio_get_group_fd(groupid);
+ ret = rte_vfio_get_group_fd(groupid);
if (ret < 0)
return ret;
vfio_group.fd = ret;
diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index e8fb344..9e2c4fe 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -10,8 +10,6 @@
#include <rte_vfio.h>
-#include "eal_vfio.h"
-
#define DPAA2_MC_DPNI_DEVID 7
#define DPAA2_MC_DPSECI_DEVID 3
#define DPAA2_MC_DPCON_DEVID 5
diff --git a/drivers/bus/fslmc/meson.build b/drivers/bus/fslmc/meson.build
index e94340e..78f9d92 100644
--- a/drivers/bus/fslmc/meson.build
+++ b/drivers/bus/fslmc/meson.build
@@ -22,6 +22,5 @@ sources = files('fslmc_bus.c',
allow_experimental_apis = true
-includes += include_directories('../../../lib/librte_eal/linuxapp/eal')
includes += include_directories('mc', 'qbman/include', 'portal')
cflags += ['-D_GNU_SOURCE']