automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw115657-115661 [PATCH] [V3, 7/7] examples/pipeline: add CLI commands for direct meters
@ 2022-08-30 19:22 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-08-30 19:22 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

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

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

_apply patch failure_

Submitter: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Tuesday, August 30 2022 18:58:11 
Applied on: CommitID:4aee6110bb10b0225fa9562f2e48af233a9058a1
Apply patch set 115657-115661 failed:

Checking patch lib/pipeline/rte_swx_ctl.h...
Hunk #1 succeeded at 1219 (offset -18 lines).
Checking patch lib/pipeline/rte_swx_pipeline.c...
Hunk #1 succeeded at 8112 (offset -149 lines).
Hunk #2 succeeded at 9030 (offset -205 lines).
Hunk #3 succeeded at 10830 (offset -307 lines).
Checking patch lib/pipeline/version.map...
error: while searching for:

	#added in 22.11
	rte_swx_ctl_pipeline_find;
	rte_swx_pipeline_build_from_lib;
	rte_swx_pipeline_codegen;
	rte_swx_pipeline_find;

error: patch failed: lib/pipeline/version.map:147
Applied patch lib/pipeline/rte_swx_ctl.h cleanly.
Applied patch lib/pipeline/rte_swx_pipeline.c cleanly.
Applying patch lib/pipeline/version.map with 1 reject...
Rejected hunk #1.
diff a/lib/pipeline/version.map b/lib/pipeline/version.map	(rejected hunks)
@@ -147,6 +147,8 @@ EXPERIMENTAL {
 
 	#added in 22.11
 	rte_swx_ctl_pipeline_find;
+	rte_swx_ctl_pipeline_regarray_read_with_key;
+	rte_swx_ctl_pipeline_regarray_write_with_key;
 	rte_swx_pipeline_build_from_lib;
 	rte_swx_pipeline_codegen;
 	rte_swx_pipeline_find;
Checking patch lib/pipeline/rte_swx_ctl.h...
error: lib/pipeline/rte_swx_ctl.h: does not match index
Checking patch lib/pipeline/rte_swx_pipeline.c...
error: lib/pipeline/rte_swx_pipeline.c: does not match index
Checking patch lib/pipeline/version.map...
error: while searching for:
	rte_swx_pipeline_hash_func_register;

	#added in 22.11
	rte_swx_ctl_pipeline_find;
	rte_swx_ctl_pipeline_regarray_read_with_key;
	rte_swx_ctl_pipeline_regarray_write_with_key;

error: patch failed: lib/pipeline/version.map:146
Applying patch lib/pipeline/version.map with 1 reject...
Rejected hunk #1.
diff a/lib/pipeline/version.map b/lib/pipeline/version.map	(rejected hunks)
@@ -146,6 +146,9 @@ EXPERIMENTAL {
 	rte_swx_pipeline_hash_func_register;
 
 	#added in 22.11
+	rte_swx_ctl_meter_reset_with_key;
+	rte_swx_ctl_meter_set_with_key;
+	rte_swx_ctl_meter_stats_read_with_key;
 	rte_swx_ctl_pipeline_find;
 	rte_swx_ctl_pipeline_regarray_read_with_key;
 	rte_swx_ctl_pipeline_regarray_write_with_key;
Checking patch examples/pipeline/cli.c...
Hunk #1 succeeded at 153 (offset 11 lines).
error: while searching for:
		fclose(iospec_file);
}

static void
table_entry_free(struct rte_swx_table_entry *entry)
{
	if (!entry)
		return;

	free(entry->key);
	free(entry->key_mask);
	free(entry->action_data);
	free(entry);
}

static int
pipeline_table_entries_add(struct rte_swx_ctl_pipeline *p,
			   const char *table_name,

error: patch failed: examples/pipeline/cli.c:732
Hunk #3 succeeded at 2065 (offset 319 lines).
error: while searching for:
	void *obj __rte_unused)
{
	struct rte_swx_pipeline *p;
	const char *name;
	uint64_t value;
	uint32_t idx;
	int status;

	if (n_tokens != 5) {
		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
		return;
	}

	p = rte_swx_pipeline_find(tokens[1]);
	if (!p) {
		snprintf(out, out_size, MSG_ARG_INVALID, "pipeline_name");
		return;
	}

error: patch failed: examples/pipeline/cli.c:1720
error: while searching for:

	name = tokens[3];

	if (parser_read_uint32(&idx, tokens[4])) {
		snprintf(out, out_size, MSG_ARG_INVALID, "index");
		return;
	}

	status = rte_swx_ctl_pipeline_regarray_read(p, name, idx, &value);
	if (status) {
		snprintf(out, out_size, "Command failed.\n");
		return;
	}

	snprintf(out, out_size, "0x%" PRIx64 "\n", value);
}

static const char cmd_pipeline_regwr_help[] =
"pipeline <pipeline_name> regwr <register_array_name> <index> <value>\n";

static void
cmd_pipeline_regwr(char **tokens,

error: patch failed: examples/pipeline/cli.c:1743
error: while searching for:
	void *obj __rte_unused)
{
	struct rte_swx_pipeline *p;
	const char *name;
	uint64_t value;
	uint32_t idx;
	int status;

	if (n_tokens != 6) {
		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
		return;
	}

	p = rte_swx_pipeline_find(tokens[1]);
	if (!p) {
		snprintf(out, out_size, MSG_ARG_INVALID, "pipeline_name");
		return;
	}

error: patch failed: examples/pipeline/cli.c:1768
Hunk #7 succeeded at 2100 (offset 212 lines).
error: while searching for:
		return;
	}

	status = rte_swx_ctl_pipeline_regarray_write(p, name, idx, value);
	if (status) {
		snprintf(out, out_size, "Command failed.\n");
		return;
	}
}

static const char cmd_pipeline_meter_profile_add_help[] =

error: patch failed: examples/pipeline/cli.c:1801
Applying patch examples/pipeline/cli.c with 5 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Hunk #3 applied cleanly.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Hunk #7 applied cleanly.
Rejected hunk #8.
diff a/examples/pipeline/cli.c b/examples/pipeline/cli.c	(rejected hunks)
@@ -732,18 +780,6 @@ cmd_pipeline_build(char **tokens,
 		fclose(iospec_file);
 }
 
-static void
-table_entry_free(struct rte_swx_table_entry *entry)
-{
-	if (!entry)
-		return;
-
-	free(entry->key);
-	free(entry->key_mask);
-	free(entry->action_data);
-	free(entry);
-}
-
 static int
 pipeline_table_entries_add(struct rte_swx_ctl_pipeline *p,
 			   const char *table_name,
@@ -1720,18 +1758,20 @@ cmd_pipeline_regrd(char **tokens,
 	void *obj __rte_unused)
 {
 	struct rte_swx_pipeline *p;
-	const char *name;
+	struct rte_swx_ctl_pipeline *ctl;
+	const char *pipeline_name, *name;
 	uint64_t value;
-	uint32_t idx;
 	int status;
 
-	if (n_tokens != 5) {
+	if (n_tokens < 5) {
 		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
 		return;
 	}
 
-	p = rte_swx_pipeline_find(tokens[1]);
-	if (!p) {
+	pipeline_name = tokens[1];
+	p = rte_swx_pipeline_find(pipeline_name);
+	ctl = rte_swx_ctl_pipeline_find(pipeline_name);
+	if (!p || !ctl) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "pipeline_name");
 		return;
 	}
@@ -1743,22 +1783,77 @@ cmd_pipeline_regrd(char **tokens,
 
 	name = tokens[3];
 
-	if (parser_read_uint32(&idx, tokens[4])) {
-		snprintf(out, out_size, MSG_ARG_INVALID, "index");
+	/* index. */
+	if (!strcmp(tokens[4], "index")) {
+		uint32_t idx;
+
+		if (n_tokens != 6) {
+			snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
+			return;
+		}
+
+		if (parser_read_uint32(&idx, tokens[5])) {
+			snprintf(out, out_size, MSG_ARG_INVALID, "index");
+			return;
+		}
+
+		status = rte_swx_ctl_pipeline_regarray_read(p, name, idx, &value);
+		if (status) {
+			snprintf(out, out_size, "Command failed.\n");
+			return;
+		}
+
+		snprintf(out, out_size, "0x%" PRIx64 "\n", value);
 		return;
 	}
 
-	status = rte_swx_ctl_pipeline_regarray_read(p, name, idx, &value);
-	if (status) {
-		snprintf(out, out_size, "Command failed.\n");
+	/* table. */
+	if (!strcmp(tokens[4], "table")) {
+		struct rte_swx_table_entry *entry;
+		char *table_name;
+
+		if (n_tokens < 8) {
+			snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
+			return;
+		}
+
+		table_name = tokens[5];
+
+		if (strcmp(tokens[6], "match")) {
+			snprintf(out, out_size, MSG_ARG_NOT_FOUND, "match");
+			return;
+		}
+
+		entry = parse_table_entry(ctl, table_name, &tokens[6], n_tokens - 6);
+		if (!entry) {
+			snprintf(out, out_size, "Invalid match tokens.\n");
+			return;
+		}
+
+		status = rte_swx_ctl_pipeline_regarray_read_with_key(p,
+								     name,
+								     table_name,
+								     entry->key,
+								     &value);
+		table_entry_free(entry);
+		if (status) {
+			snprintf(out, out_size, "Command failed.\n");
+			return;
+		}
+
+		snprintf(out, out_size, "0x%" PRIx64 "\n", value);
 		return;
 	}
 
-	snprintf(out, out_size, "0x%" PRIx64 "\n", value);
+	/* anything else. */
+	snprintf(out, out_size, "Invalid token %s\n.", tokens[4]);
+	return;
 }
 
 static const char cmd_pipeline_regwr_help[] =
-"pipeline <pipeline_name> regwr <register_array_name> <index> <value>\n";
+"pipeline <pipeline_name> regwr <register_array_name> value <value>\n"
+	"index <index>\n"
+	" | table <table_name> match <field0> ...\n";
 
 static void
 cmd_pipeline_regwr(char **tokens,
@@ -1768,18 +1863,20 @@ cmd_pipeline_regwr(char **tokens,
 	void *obj __rte_unused)
 {
 	struct rte_swx_pipeline *p;
-	const char *name;
-	uint64_t value;
-	uint32_t idx;
+	struct rte_swx_ctl_pipeline *ctl;
+	const char *pipeline_name, *name;
+	uint64_t value = 0;
 	int status;
 
-	if (n_tokens != 6) {
+	if (n_tokens < 7) {
 		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
 		return;
 	}
 
-	p = rte_swx_pipeline_find(tokens[1]);
-	if (!p) {
+	pipeline_name = tokens[1];
+	p = rte_swx_pipeline_find(pipeline_name);
+	ctl = rte_swx_ctl_pipeline_find(pipeline_name);
+	if (!p || !ctl) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "pipeline_name");
 		return;
 	}
@@ -1801,11 +1898,70 @@ cmd_pipeline_regwr(char **tokens,
 		return;
 	}
 
-	status = rte_swx_ctl_pipeline_regarray_write(p, name, idx, value);
-	if (status) {
-		snprintf(out, out_size, "Command failed.\n");
+	/* index. */
+	if (!strcmp(tokens[6], "index")) {
+		uint32_t idx;
+
+		if (n_tokens != 8) {
+			snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
+			return;
+		}
+
+		if (parser_read_uint32(&idx, tokens[7])) {
+			snprintf(out, out_size, MSG_ARG_INVALID, "index");
+			return;
+		}
+
+		status = rte_swx_ctl_pipeline_regarray_write(p, name, idx, value);
+		if (status) {
+			snprintf(out, out_size, "Command failed.\n");
+			return;
+		}
+
+		snprintf(out, out_size, "0x%" PRIx64 "\n", value);
 		return;
 	}
+
+	/* table. */
+	if (!strcmp(tokens[6], "table")) {
+		struct rte_swx_table_entry *entry;
+		char *table_name;
+
+		if (n_tokens < 10) {
+			snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
+			return;
+		}
+
+		table_name = tokens[7];
+
+		if (strcmp(tokens[8], "match")) {
+			snprintf(out, out_size, MSG_ARG_NOT_FOUND, "match");
+			return;
+		}
+
+		entry = parse_table_entry(ctl, table_name, &tokens[8], n_tokens - 8);
+		if (!entry) {
+			snprintf(out, out_size, "Invalid match tokens.\n");
+			return;
+		}
+
+		status = rte_swx_ctl_pipeline_regarray_write_with_key(p,
+								      name,
+								      table_name,
+								      entry->key,
+								      value);
+		table_entry_free(entry);
+		if (status) {
+			snprintf(out, out_size, "Command failed.\n");
+			return;
+		}
+
+		return;
+	}
+
+	/* anything else. */
+	snprintf(out, out_size, "Invalid token %s\n.", tokens[6]);
+	return;
 }
 
 static const char cmd_pipeline_meter_profile_add_help[] =
Checking patch examples/pipeline/cli.c...
error: examples/pipeline/cli.c: does not match index
Checking patch examples/pipeline/examples/meter.cli...
error: while searching for:
; The table entries can later be updated at run-time through the CLI commands.
;
pipeline PIPELINE0 meter profile platinum add cir 46000000 pir 138000000 cbs 1000000 pbs 1000000
pipeline PIPELINE0 meter meters from 0 to 15 set profile platinum

;
; Pipelines-to-threads mapping.

error: patch failed: examples/pipeline/examples/meter.cli:35
Applying patch examples/pipeline/examples/meter.cli with 1 reject...
Rejected hunk #1.
diff a/examples/pipeline/examples/meter.cli b/examples/pipeline/examples/meter.cli	(rejected hunks)
@@ -35,7 +35,7 @@ pipeline PIPELINE0 build lib /tmp/meter.so io ./examples/pipeline/examples/ethde
 ; The table entries can later be updated at run-time through the CLI commands.
 ;
 pipeline PIPELINE0 meter profile platinum add cir 46000000 pir 138000000 cbs 1000000 pbs 1000000
-pipeline PIPELINE0 meter meters from 0 to 15 set profile platinum
+pipeline PIPELINE0 meter meters set profile platinum index from 0 to 15
 
 ;
 ; Pipelines-to-threads mapping.

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

UNH-IOL DPDK Community Lab

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

only message in thread, other threads:[~2022-08-30 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 19:22 |WARNING| pw115657-115661 [PATCH] [V3, 7/7] examples/pipeline: add CLI commands for direct meters 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).