summaryrefslogtreecommitdiffstats
path: root/lib/librte_rawdev/rte_rawdev.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-01 11:59:50 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-01 12:00:19 +0000
commit8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 (patch)
tree208e3bc33c220854d89d010e3abf720a2e62e546 /lib/librte_rawdev/rte_rawdev.c
parentb63264c8342e6a1b6971c79550d2af2024b6a4de (diff)
New upstream version 18.11-rc1upstream/18.11-rc1
Change-Id: Iaa71986dd6332e878d8f4bf493101b2bbc6313bb Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_rawdev/rte_rawdev.c')
-rw-r--r--lib/librte_rawdev/rte_rawdev.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index 62b6b97e..9f1e3592 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -35,21 +35,19 @@
/* dynamic log identifier */
int librawdev_logtype;
-struct rte_rawdev rte_rawdevices[RTE_RAWDEV_MAX_DEVS];
+static struct rte_rawdev rte_rawdevices[RTE_RAWDEV_MAX_DEVS];
-struct rte_rawdev *rte_rawdevs = &rte_rawdevices[0];
+struct rte_rawdev *rte_rawdevs = rte_rawdevices;
static struct rte_rawdev_global rawdev_globals = {
.nb_devs = 0
};
-struct rte_rawdev_global *rte_rawdev_globals = &rawdev_globals;
-
/* Raw device, northbound API implementation */
uint8_t
rte_rawdev_count(void)
{
- return rte_rawdev_globals->nb_devs;
+ return rawdev_globals.nb_devs;
}
uint16_t
@@ -60,7 +58,7 @@ rte_rawdev_get_dev_id(const char *name)
if (!name)
return -EINVAL;
- for (i = 0; i < rte_rawdev_globals->nb_devs; i++)
+ for (i = 0; i < rawdev_globals.nb_devs; i++)
if ((strcmp(rte_rawdevices[i].name, name)
== 0) &&
(rte_rawdevices[i].attached ==