Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/115472 _apply patch failure_ Submitter: Cristian Dumitrescu Date: Friday, August 26 2022 11:21:27 Applied on: CommitID:a61b319674a99f5f6ad45442a18a65b88df27690 Apply patch set 115472-115478 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 10794 (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 regwr \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 regwr \n"; +"pipeline regwr value \n" + "index \n" + " | table match ...\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/23319/ UNH-IOL DPDK Community Lab