patch 'kvargs: add API documentation for process callback' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:24:03 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/6567e0cf763b4a317e2c97ee1d342f1ced4fca88

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6567e0cf763b4a317e2c97ee1d342f1ced4fca88 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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/kvargs/rte_kvargs.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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
@@ -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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:40.205453500 +0800
+++ 0055-kvargs-add-API-documentation-for-process-callback.patch	2023-04-09 21:45:38.669042200 +0800
@@ -1 +1 @@
-From 52ab17efdecf935792ee1d0cb749c0dbd536c083 Mon Sep 17 00:00:00 2001
+From 6567e0cf763b4a317e2c97ee1d342f1ced4fca88 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 52ab17efdecf935792ee1d0cb749c0dbd536c083 ]
@@ -13,2 +15,0 @@
-
-Cc: stable at dpdk.org


More information about the stable mailing list