summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2018-04-24 01:54:48 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-04-25 03:58:24 +0200
commitc7b424c03d8ed4b050fc3455ac0a0c03c22f773e (patch)
tree3c7a0d3ea295358246bd7100fe02c7e32e8ed6fb
parent83945fbd7c4954c1cfad320eb28c0dcbd5087bb3 (diff)
downloaddpdk-c7b424c03d8ed4b050fc3455ac0a0c03c22f773e.zip
dpdk-c7b424c03d8ed4b050fc3455ac0a0c03c22f773e.tar.gz
dpdk-c7b424c03d8ed4b050fc3455ac0a0c03c22f773e.tar.xz
devargs: make devargs list private
Initially, rte_devargs was meant to be populated once and sometimes accessed, then never emptied. With the new hotplug functionality having better standing, new usage appeared with repeated addition of devices and their subsequent removal. Exposing devargs_list pushed bus drivers and libraries to be careless and inconsistent in their memory management. Making it private will allow to rationalize this part of the EAL and ensure that fewer memory leaks occur during operations. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
-rw-r--r--doc/guides/rel_notes/deprecation.rst1
-rw-r--r--lib/librte_eal/common/eal_common_devargs.c3
-rw-r--r--lib/librte_eal/common/include/rte_devargs.h6
-rw-r--r--lib/librte_eal/rte_eal_version.map1
4 files changed, 3 insertions, 8 deletions
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index ac90cf5..b35aef3 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -16,7 +16,6 @@ Deprecation Notices
- removal of ``name`` and ``args`` fields.
- The enum ``rte_devtype`` was used to identify a bus and will disappear.
- - The ``rte_devargs_list`` will be made private.
- Functions previously deprecated will change or disappear:
+ ``rte_eal_devargs_add``
diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index c6c5eab..a7f374c 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -18,6 +18,9 @@
#include <rte_tailq.h>
#include "eal_private.h"
+/** user device double-linked queue type definition */
+TAILQ_HEAD(rte_devargs_list, rte_devargs);
+
/** Global list of user devices */
struct rte_devargs_list devargs_list =
TAILQ_HEAD_INITIALIZER(devargs_list);
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index aba3148..e48cc3c 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -59,12 +59,6 @@ struct rte_devargs {
char *args;
};
-/** user device double-linked queue type definition */
-TAILQ_HEAD(rte_devargs_list, rte_devargs);
-
-/** Global list of user devices */
-extern struct rte_devargs_list devargs_list;
-
/**
* Parse a devargs string.
*
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 9d2d517..beb616d 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -2,7 +2,6 @@ DPDK_2.0 {
global:
__rte_panic;
- devargs_list;
eal_parse_sysfs_value;
eal_timer_source;
lcore_config;