DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: announce kvargs API change
@ 2018-11-21 15:45 Thomas Monjalon
  2018-11-22 10:32 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  2018-11-23 13:17 ` [dpdk-dev] [PATCH] " Maxime Coquelin
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2018-11-21 15:45 UTC (permalink / raw)
  To: dev; +Cc: olivier.matz

In some usages, kvlist is processed one time in rte_kvargs_process(),
and it is processed a second time if need to check whether it was matched.
In order to simplify implementation of kvargs checks, a new callback
may be used for "no match" cases.

The change of the function prototype would be as below:

 int
 rte_kvargs_process(const struct rte_kvargs *kvlist,
 		const char *key_match,
-		arg_handler_t handler,
+		arg_handler_t match_handler,
+		arg_handler_t no_match_handler,
 		void *opaque_arg)

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/deprecation.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 34b28234c..7af65cd4b 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -11,6 +11,10 @@ API and ABI deprecation notices are to be posted here.
 Deprecation Notices
 -------------------
 
+* kvargs: The function ``rte_kvargs_process`` will get a new parameter
+  for a function pointer called in case of no match of the key.
+  It will ease implementation of default values or check for mandatory keys.
+
 * eal: both declaring and identifying devices will be streamlined in v18.11.
   New functions will appear to query a specific port from buses, classes of
   device and device drivers. Device declaration will be made coherent with the
-- 
2.19.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-24 17:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 15:45 [dpdk-dev] [PATCH] doc: announce kvargs API change Thomas Monjalon
2018-11-22 10:32 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2018-11-22 13:22   ` Olivier Matz
2018-11-22 14:02     ` Thomas Monjalon
2018-11-22 17:08     ` Ferruh Yigit
2018-11-23 16:31       ` Jerin Jacob
2018-11-24 17:12         ` Thomas Monjalon
2018-11-23 13:17 ` [dpdk-dev] [PATCH] " Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).