[dpdk-dev] [PATCH 01/11] eal: explain argv behaviour during init
Thomas Monjalon
thomas at monjalon.net
Wed Mar 10 00:31:05 CET 2021
After argument parsing done by rte_eal_init(),
the remaining arguments are to be parsed by the application
by progressing in the argv array.
In this context, the first string represented by argv[0] is still
the same program name as the original argv[0],
while the next strings are the application arguments.
This is because rte_eal_init() manipulates the argv array
after EAL parsing, before returning to the application.
This note was missing in the doxygen comment of the API.
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
lib/librte_eal/include/rte_eal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h
index eaf6469e50..0cbeedb594 100644
--- a/lib/librte_eal/include/rte_eal.h
+++ b/lib/librte_eal/include/rte_eal.h
@@ -76,6 +76,8 @@ int rte_eal_iopl_init(void);
* @param argv
* An array of strings. The contents of the array, as well as the strings
* which are pointed to by the array, may be modified by this function.
+ * The program name pointer argv[0] is copied into the last parsed argv
+ * so that argv[0] is still the same after deducing the parsed arguments.
* @return
* - On success, the number of parsed arguments, which is greater or
* equal to zero. After the call to rte_eal_init(),
--
2.30.1
More information about the dev
mailing list