automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw100033-100037 [PATCH] [v2, 5/5] kvargs: fix comments style
@ 2021-10-05 11:14 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-10-05 11:14 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 14868 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/100033

_apply patch failure_

Submitter: Olivier Matz <olivier.matz@6wind.com>
Date: Wednesday, September 29 2021 21:39:43 
Applied on: CommitID:086d426406bd3f6fac96a15bbd871c7fe714bc2d
Apply patch set 100033-100037 failed:

Checking patch lib/kvargs/rte_kvargs.h...
error: while searching for:
 *   - A pointer to an allocated rte_kvargs structure on success
 *   - NULL on error
 */
__rte_experimental
struct rte_kvargs *rte_kvargs_parse_delim(const char *args,
		const char *const valid_keys[],
		const char *valid_ends);

error: patch failed: lib/kvargs/rte_kvargs.h:98
Checking patch lib/kvargs/version.map...
error: while searching for:
	rte_kvargs_count;
	rte_kvargs_free;
	rte_kvargs_parse;
	rte_kvargs_process;

	local: *;

error: patch failed: lib/kvargs/version.map:4
error: while searching for:
EXPERIMENTAL {
	global:

	rte_kvargs_parse_delim;
	rte_kvargs_strcmp;

	# added in 21.05

error: patch failed: lib/kvargs/version.map:12
Applying patch lib/kvargs/rte_kvargs.h with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/version.map with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h	(rejected hunks)
@@ -98,7 +98,6 @@ struct rte_kvargs *rte_kvargs_parse(const char *args,
  *   - A pointer to an allocated rte_kvargs structure on success
  *   - NULL on error
  */
-__rte_experimental
 struct rte_kvargs *rte_kvargs_parse_delim(const char *args,
 		const char *const valid_keys[],
 		const char *valid_ends);
diff a/lib/kvargs/version.map b/lib/kvargs/version.map	(rejected hunks)
@@ -4,6 +4,7 @@ DPDK_22 {
 	rte_kvargs_count;
 	rte_kvargs_free;
 	rte_kvargs_parse;
+	rte_kvargs_parse_delim;
 	rte_kvargs_process;
 
 	local: *;
@@ -12,7 +13,6 @@ DPDK_22 {
 EXPERIMENTAL {
 	global:
 
-	rte_kvargs_parse_delim;
 	rte_kvargs_strcmp;
 
 	# added in 21.05
Checking patch lib/kvargs/rte_kvargs.h...
error: while searching for:
 *   NULL if no key matches the input,
 *   a value associated with a matching key otherwise.
 */
__rte_experimental
const char *rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key);

/**

error: patch failed: lib/kvargs/rte_kvargs.h:130
Checking patch lib/kvargs/version.map...
error: while searching for:

	rte_kvargs_count;
	rte_kvargs_free;
	rte_kvargs_parse;
	rte_kvargs_parse_delim;
	rte_kvargs_process;

error: patch failed: lib/kvargs/version.map:3
error: while searching for:

	rte_kvargs_strcmp;

	# added in 21.05
	rte_kvargs_get;
};

error: patch failed: lib/kvargs/version.map:15
Applying patch lib/kvargs/rte_kvargs.h with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/version.map with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h	(rejected hunks)
@@ -130,7 +130,6 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
  *   NULL if no key matches the input,
  *   a value associated with a matching key otherwise.
  */
-__rte_experimental
 const char *rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key);
 
 /**
diff a/lib/kvargs/version.map b/lib/kvargs/version.map	(rejected hunks)
@@ -3,6 +3,7 @@ DPDK_22 {
 
 	rte_kvargs_count;
 	rte_kvargs_free;
+	rte_kvargs_get;
 	rte_kvargs_parse;
 	rte_kvargs_parse_delim;
 	rte_kvargs_process;
@@ -15,6 +16,4 @@ EXPERIMENTAL {
 
 	rte_kvargs_strcmp;
 
-	# added in 21.05
-	rte_kvargs_get;
 };
Checking patch drivers/bus/auxiliary/auxiliary_params.c...
error: while searching for:
	      const void *_kvlist)
{
	const struct rte_kvargs *kvlist = _kvlist;
	int ret;

	ret = rte_kvargs_process(kvlist,
			auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME],
			rte_kvargs_strcmp, (void *)(uintptr_t)dev->name);

	return ret != 0 ? -1 : 0;
}

void *

error: patch failed: drivers/bus/auxiliary/auxiliary_params.c:25
Checking patch drivers/bus/vdev/vdev_params.c...
error: while searching for:
vdev_dev_match(const struct rte_device *dev,
	       const void *_kvlist)
{
	int ret;
	const struct rte_kvargs *kvlist = _kvlist;
	char *name;

	/* cannot pass const dev->name to rte_kvargs_process() */
	name = strdup(dev->name);
	if (name == NULL)
		return -1;
	ret = rte_kvargs_process(kvlist,
		vdev_params_keys[RTE_VDEV_PARAM_NAME],
		rte_kvargs_strcmp, name);
	free(name);
	if (ret != 0)
		return -1;

	return 0;

error: patch failed: drivers/bus/vdev/vdev_params.c:26
Checking patch lib/kvargs/rte_kvargs.c...
error: while searching for:
	free(kvlist);
}

/* Lookup a value in an rte_kvargs list by its key. */
const char *
rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key)
{
	unsigned int i;

	if (kvlist == NULL || key == NULL)
		return NULL;
	for (i = 0; i < kvlist->count; ++i) {
		if (strcmp(kvlist->pairs[i].key, key) == 0)
			return kvlist->pairs[i].value;
	}
	return NULL;
}

/*
 * Parse the arguments "key=value,key=value,..." string and return
 * an allocated structure that contains a key/value list. Also

error: patch failed: lib/kvargs/rte_kvargs.c:204
Checking patch lib/kvargs/rte_kvargs.h...
error: while searching for:
/**
 * Get the value associated with a given key.
 *
 * If multiple key matches, the value of the first one is returned.
 *
 * The memory returned is allocated as part of the rte_kvargs structure,
 * it must never be modified.

error: patch failed: lib/kvargs/rte_kvargs.h:116
error: while searching for:
 */
const char *rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key);

/**
 * Call a handler function for each key/value matching the key
 *

error: patch failed: lib/kvargs/rte_kvargs.h:132
Checking patch lib/kvargs/version.map...
error: while searching for:

	rte_kvargs_strcmp;

};

error: patch failed: lib/kvargs/version.map:16
Applying patch drivers/bus/auxiliary/auxiliary_params.c with 1 reject...
Rejected hunk #1.
Applying patch drivers/bus/vdev/vdev_params.c with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/rte_kvargs.c with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/rte_kvargs.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch lib/kvargs/version.map with 1 reject...
Rejected hunk #1.
diff a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c	(rejected hunks)
@@ -25,13 +25,12 @@ auxiliary_dev_match(const struct rte_device *dev,
 	      const void *_kvlist)
 {
 	const struct rte_kvargs *kvlist = _kvlist;
-	int ret;
+	const char *key = auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME];
 
-	ret = rte_kvargs_process(kvlist,
-			auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME],
-			rte_kvargs_strcmp, (void *)(uintptr_t)dev->name);
+	if (rte_kvargs_get_with_value(kvlist, key, dev->name) == NULL)
+		return -1;
 
-	return ret != 0 ? -1 : 0;
+	return 0;
 }
 
 void *
diff a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c	(rejected hunks)
@@ -26,19 +26,10 @@ static int
 vdev_dev_match(const struct rte_device *dev,
 	       const void *_kvlist)
 {
-	int ret;
 	const struct rte_kvargs *kvlist = _kvlist;
-	char *name;
+	const char *key = vdev_params_keys[RTE_VDEV_PARAM_NAME];
 
-	/* cannot pass const dev->name to rte_kvargs_process() */
-	name = strdup(dev->name);
-	if (name == NULL)
-		return -1;
-	ret = rte_kvargs_process(kvlist,
-		vdev_params_keys[RTE_VDEV_PARAM_NAME],
-		rte_kvargs_strcmp, name);
-	free(name);
-	if (ret != 0)
+	if (rte_kvargs_get_with_value(kvlist, key, dev->name) == NULL)
 		return -1;
 
 	return 0;
diff a/lib/kvargs/rte_kvargs.c b/lib/kvargs/rte_kvargs.c	(rejected hunks)
@@ -204,21 +204,34 @@ rte_kvargs_free(struct rte_kvargs *kvlist)
 	free(kvlist);
 }
 
-/* Lookup a value in an rte_kvargs list by its key. */
+/* Lookup a value in an rte_kvargs list by its key and value. */
 const char *
-rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key)
+rte_kvargs_get_with_value(const struct rte_kvargs *kvlist, const char *key,
+			  const char *value)
 {
 	unsigned int i;
 
-	if (kvlist == NULL || key == NULL)
+	if (kvlist == NULL)
 		return NULL;
 	for (i = 0; i < kvlist->count; ++i) {
-		if (strcmp(kvlist->pairs[i].key, key) == 0)
-			return kvlist->pairs[i].value;
+		if (key != NULL && strcmp(kvlist->pairs[i].key, key) != 0)
+			continue;
+		if (value != NULL && strcmp(kvlist->pairs[i].value, value) != 0)
+			continue;
+		return kvlist->pairs[i].value;
 	}
 	return NULL;
 }
 
+/* Lookup a value in an rte_kvargs list by its key. */
+const char *
+rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key)
+{
+	if (kvlist == NULL || key == NULL)
+		return NULL;
+	return rte_kvargs_get_with_value(kvlist, key, NULL);
+}
+
 /*
  * Parse the arguments "key=value,key=value,..." string and return
  * an allocated structure that contains a key/value list. Also
diff a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h	(rejected hunks)
@@ -116,7 +116,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
 /**
  * Get the value associated with a given key.
  *
- * If multiple key matches, the value of the first one is returned.
+ * If multiple keys match, the value of the first one is returned.
  *
  * The memory returned is allocated as part of the rte_kvargs structure,
  * it must never be modified.
@@ -132,6 +132,33 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
  */
 const char *rte_kvargs_get(const struct rte_kvargs *kvlist, const char *key);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Get the value associated with a given key and value.
+ *
+ * Find the first entry in the kvlist whose key and value match the
+ * ones passed as argument.
+ *
+ * The memory returned is allocated as part of the rte_kvargs structure,
+ * it must never be modified.
+ *
+ * @param kvlist
+ *   A list of rte_kvargs pair of 'key=value'.
+ * @param key
+ *   The matching key. If NULL, any key will match.
+ * @param value
+ *   The matching value. If NULL, any value will match.
+ *
+ * @return
+ *   NULL if no key matches the input,
+ *   a value associated with a matching key otherwise.
+ */
+__rte_experimental
+const char *rte_kvargs_get_with_value(const struct rte_kvargs *kvlist,
+				      const char *key, const char *value);
+
 /**
  * Call a handler function for each key/value matching the key
  *
diff a/lib/kvargs/version.map b/lib/kvargs/version.map	(rejected hunks)
@@ -16,4 +16,6 @@ EXPERIMENTAL {
 
 	rte_kvargs_strcmp;
 
+	# added in 21.11
+	rte_kvargs_get_with_value;
 };
Checking patch lib/kvargs/rte_kvargs.c...
error: while searching for:
	free(copy);
	return kvlist;
}

int
rte_kvargs_strcmp(const char *key __rte_unused,
		  const char *value, void *opaque)
{
	const char *str = opaque;

	return -abs(strcmp(str, value));
}

error: patch failed: lib/kvargs/rte_kvargs.c:283
Checking patch lib/kvargs/rte_kvargs.h...
error: while searching for:
unsigned rte_kvargs_count(const struct rte_kvargs *kvlist,
	const char *key_match);

/**
 * Generic kvarg handler for string comparison.
 *
 * This function can be used for a generic string comparison processing
 * on a list of kvargs.
 *
 * @param key
 *   kvarg pair key.
 *
 * @param value
 *   kvarg pair value.
 *
 * @param opaque
 *   Opaque pointer to a string.
 *
 * @return
 *   0 if the strings match.
 *   !0 otherwise or on error.
 *
 *   Unlike strcmp, comparison ordering is not kept.
 *   In order for rte_kvargs_process to stop processing on match error,
 *   a negative value is returned even if strcmp had returned a positive one.
 */
__rte_experimental
int rte_kvargs_strcmp(const char *key, const char *value, void *opaque);

#ifdef __cplusplus
}
#endif

error: patch failed: lib/kvargs/rte_kvargs.h:197
Checking patch lib/kvargs/version.map...
error: while searching for:
EXPERIMENTAL {
	global:

	rte_kvargs_strcmp;

	# added in 21.11
	rte_kvargs_get_with_value;
};

error: patch failed: lib/kvargs/version.map:14
Applying patch lib/kvargs/rte_kvargs.c with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/rte_kvargs.h with 1 reject...
Rejected hunk #1.
Applying patch lib/kvargs/version.map with 1 reject...
Rejected hunk #1.
diff a/lib/kvargs/rte_kvargs.c b/lib/kvargs/rte_kvargs.c	(rejected hunks)
@@ -283,12 +283,3 @@ rte_kvargs_parse_delim(const char *args, const char * const valid_keys[],
 	free(copy);
 	return kvlist;
 }
-
-int
-rte_kvargs_strcmp(const char *key __rte_unused,
-		  const char *value, void *opaque)
-{
-	const char *str = opaque;
-
-	return -abs(strcmp(str, value));
-}
diff a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h	(rejected hunks)
@@ -197,32 +197,6 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
 unsigned rte_kvargs_count(const struct rte_kvargs *kvlist,
 	const char *key_match);
 
-/**
- * Generic kvarg handler for string comparison.
- *
- * This function can be used for a generic string comparison processing
- * on a list of kvargs.
- *
- * @param key
- *   kvarg pair key.
- *
- * @param value
- *   kvarg pair value.
- *
- * @param opaque
- *   Opaque pointer to a string.
- *
- * @return
- *   0 if the strings match.
- *   !0 otherwise or on error.
- *
- *   Unlike strcmp, comparison ordering is not kept.
- *   In order for rte_kvargs_process to stop processing on match error,
- *   a negative value is returned even if strcmp had returned a positive one.
- */
-__rte_experimental
-int rte_kvargs_strcmp(const char *key, const char *value, void *opaque);
-
 #ifdef __cplusplus
 }
 #endif
diff a/lib/kvargs/version.map b/lib/kvargs/version.map	(rejected hunks)
@@ -14,8 +14,6 @@ DPDK_22 {
 EXPERIMENTAL {
 	global:
 
-	rte_kvargs_strcmp;
-
 	# added in 21.11
 	rte_kvargs_get_with_value;
 };
Checking patch lib/kvargs/rte_kvargs.h...
error: while searching for:
 *   A list of rte_kvargs pair of 'key=value'.
 * @param key
 *   The matching key.

 * @return
 *   NULL if no key matches the input,
 *   a value associated with a matching key otherwise.

error: patch failed: lib/kvargs/rte_kvargs.h:125
error: while searching for:
 *   The rte_kvargs structure
 * @param key_match
 *   The key that should match, or NULL to count all associations

 * @return
 *   The number of entries
 */

error: patch failed: lib/kvargs/rte_kvargs.h:190
Applying patch lib/kvargs/rte_kvargs.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h	(rejected hunks)
@@ -125,7 +125,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
  *   A list of rte_kvargs pair of 'key=value'.
  * @param key
  *   The matching key.
-
+ *
  * @return
  *   NULL if no key matches the input,
  *   a value associated with a matching key otherwise.
@@ -190,7 +190,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
  *   The rte_kvargs structure
  * @param key_match
  *   The key that should match, or NULL to count all associations
-
+ *
  * @return
  *   The number of entries
  */

https://lab.dpdk.org/results/dashboard/patchsets/19064/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-05 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 11:14 [dpdk-test-report] |WARNING| pw100033-100037 [PATCH] [v2, 5/5] kvargs: fix comments style dpdklab

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).