patch 'kvargs: add API documentation for process callback' has been queued to stable release 20.11.8
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Mar 15 23:46:07 CET 2023
Hi,
FYI, your patch has been queued to stable release 20.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/23. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0929f2bd19ef9c4a3775d392d37ac1459382c1cb
Thanks.
Luca Boccassi
---
>From 0929f2bd19ef9c4a3775d392d37ac1459382c1cb Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 2 Mar 2023 07:50:04 +0000
Subject: [PATCH] kvargs: add API documentation for process callback
[ upstream commit 52ab17efdecf935792ee1d0cb749c0dbd536c083 ]
The rte_kvargs_process() is used to parse KV pairs, it also supports
to parse 'only keys' (e.g. socket_id) type. And the callback function
(which prototype is arg_handler_t) parameter 'value' is NULL when
parsing 'only keys'.
But there is no detailed definition of 'value' may be NULL, so this
patch adds it.
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_kvargs/rte_kvargs.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
index 5b2e164287..a53da40278 100644
--- a/lib/librte_kvargs/rte_kvargs.h
+++ b/lib/librte_kvargs/rte_kvargs.h
@@ -36,7 +36,19 @@ extern "C" {
/** separator character used between key and value */
#define RTE_KVARGS_KV_DELIM "="
-/** Type of callback function used by rte_kvargs_process() */
+/**
+ * Callback prototype used by rte_kvargs_process().
+ *
+ * @param key
+ * The key to consider, it will not be NULL.
+ * @param value
+ * The value corresponding to the key, it may be NULL (e.g. only with key)
+ * @param opaque
+ * An opaque pointer coming from the caller.
+ * @return
+ * - >=0 handle key success.
+ * - <0 on error.
+ */
typedef int (*arg_handler_t)(const char *key, const char *value, void *opaque);
/** A key/value association */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-03-15 22:44:50.556810137 +0000
+++ 0016-kvargs-add-API-documentation-for-process-callback.patch 2023-03-15 22:44:49.567849926 +0000
@@ -1 +1 @@
-From 52ab17efdecf935792ee1d0cb749c0dbd536c083 Mon Sep 17 00:00:00 2001
+From 0929f2bd19ef9c4a3775d392d37ac1459382c1cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52ab17efdecf935792ee1d0cb749c0dbd536c083 ]
+
@@ -14,2 +15,0 @@
-Cc: stable at dpdk.org
-
@@ -19 +19 @@
- lib/kvargs/rte_kvargs.h | 14 +++++++++++++-
+ lib/librte_kvargs/rte_kvargs.h | 14 +++++++++++++-
@@ -22,4 +22,4 @@
-diff --git a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h
-index 359a9f5b09..4900b750bc 100644
---- a/lib/kvargs/rte_kvargs.h
-+++ b/lib/kvargs/rte_kvargs.h
+diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
+index 5b2e164287..a53da40278 100644
+--- a/lib/librte_kvargs/rte_kvargs.h
++++ b/lib/librte_kvargs/rte_kvargs.h
More information about the stable
mailing list