Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/112998 _apply patch failure_ Submitter: Satheesh Paul Antonysamy Date: Friday, June 17 2022 10:57:18 Applied on: CommitID:7342e612052ae3ec875ae018548324d29abfa9c2 Apply patch set 112998 failed: Checking patch doc/guides/sample_app_ug/ipsec_secgw.rst... Hunk #1 succeeded at 890 (offset 4 lines). Hunk #2 succeeded at 963 (offset 4 lines). Hunk #3 succeeded at 997 (offset 4 lines). Checking patch examples/ipsec-secgw/flow.c... error: while searching for: return; rule->queue = atoi(tokens[ti]); } } nb_flow_rule++; } #define MAX_RTE_FLOW_PATTERN (3) #define MAX_RTE_FLOW_ACTIONS (2) static void flow_init_single(struct flow_rule_entry *rule) { struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {}; struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {}; struct rte_flow_attr attr = {}; struct rte_flow_error err; int ret; attr.egress = 0; attr.ingress = 1; action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE; action[0].conf = &(struct rte_flow_action_queue) { .index = rule->queue, }; action[1].type = RTE_FLOW_ACTION_TYPE_END; pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; if (rule->is_ipv4) { pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4; pattern[1].spec = &rule->ipv4.spec; pattern[1].mask = &rule->ipv4.mask; } else { pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV6; pattern[1].spec = &rule->ipv6.spec; pattern[1].mask = &rule->ipv6.mask; } pattern[2].type = RTE_FLOW_ITEM_TYPE_END; ret = rte_flow_validate(rule->port, &attr, pattern, action, &err); if (ret < 0) { RTE_LOG(ERR, IPSEC, "Flow validation failed %s\n", err.message); return; } error: patch failed: examples/ipsec-secgw/flow.c:199 Hunk #8 succeeded at 286 (offset -79 lines). Hunk #9 succeeded at 349 (offset -79 lines). Checking patch examples/ipsec-secgw/flow.h... Checking patch examples/ipsec-secgw/ipsec-secgw.c... Hunk #1 succeeded at 2875 (offset -396 lines). Hunk #2 succeeded at 3130 (offset -381 lines). Applied patch doc/guides/sample_app_ug/ipsec_secgw.rst cleanly. Applying patch examples/ipsec-secgw/flow.c with 1 reject... Hunk #1 applied cleanly. Hunk #2 applied cleanly. Hunk #3 applied cleanly. Hunk #4 applied cleanly. Hunk #5 applied cleanly. Hunk #6 applied cleanly. Rejected hunk #7. Hunk #8 applied cleanly. Hunk #9 applied cleanly. Applied patch examples/ipsec-secgw/flow.h cleanly. Applied patch examples/ipsec-secgw/ipsec-secgw.c cleanly. diff a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c (rejected hunks) @@ -199,50 +234,129 @@ parse_flow_tokens(char **tokens, uint32_t n_tokens, return; rule->queue = atoi(tokens[ti]); + rule->is_queue_set = true; + continue; + } + + if (strcmp(tokens[ti], "count") == 0) { + rule->enable_count = true; + continue; + } + + if (strcmp(tokens[ti], "security") == 0) { + rule->set_security_action = true; + continue; } + + if (strcmp(tokens[ti], "set_mark") == 0) { + INCREMENT_TOKEN_INDEX(ti, n_tokens, status); + if (status->status < 0) + return; + APP_CHECK_TOKEN_IS_NUM(tokens, ti, status); + if (status->status < 0) + return; + + rule->set_mark_action = true; + rule->mark_action_val = atoi(tokens[ti]); + continue; + } + + sprintf(status->parse_msg, "Unrecognized input:%s\n", tokens[ti]); + status->status = -1; + return; } + printf("\n"); nb_flow_rule++; } -#define MAX_RTE_FLOW_PATTERN (3) -#define MAX_RTE_FLOW_ACTIONS (2) +#define MAX_RTE_FLOW_PATTERN (4) +#define MAX_RTE_FLOW_ACTIONS (5) static void flow_init_single(struct flow_rule_entry *rule) { - struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {}; struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {}; + struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {}; + struct rte_flow_action_queue queue_action; + struct rte_flow_action_mark mark_action; + int ret, pattern_idx = 0, act_idx = 0; + struct rte_flow_item_mark mark_mask; struct rte_flow_attr attr = {}; - struct rte_flow_error err; - int ret; + struct rte_flow_error err = {}; attr.egress = 0; attr.ingress = 1; - action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE; - action[0].conf = &(struct rte_flow_action_queue) { - .index = rule->queue, - }; - action[1].type = RTE_FLOW_ACTION_TYPE_END; + if (rule->is_queue_set) { + queue_action.index = rule->queue; + action[act_idx].type = RTE_FLOW_ACTION_TYPE_QUEUE; + action[act_idx].conf = &queue_action; + act_idx++; + } + + if (rule->enable_count) { + action[act_idx].type = RTE_FLOW_ACTION_TYPE_COUNT; + act_idx++; + } + + if (rule->set_security_action) { + action[act_idx].type = RTE_FLOW_ACTION_TYPE_SECURITY; + action[act_idx].conf = NULL; + act_idx++; + } + + if (rule->set_mark_action) { + mark_action.id = rule->mark_action_val; + action[act_idx].type = RTE_FLOW_ACTION_TYPE_MARK; + action[act_idx].conf = &mark_action; + act_idx++; + } - pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; + action[act_idx].type = RTE_FLOW_ACTION_TYPE_END; + action[act_idx].conf = NULL; + + if (rule->enable_mark) { + mark_mask.id = UINT32_MAX; + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_MARK; + pattern[pattern_idx].spec = &rule->mark_val; + pattern[pattern_idx].mask = &mark_mask; + pattern_idx++; + } + + if (rule->is_eth) { + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_ETH; + pattern_idx++; + } if (rule->is_ipv4) { - pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4; - pattern[1].spec = &rule->ipv4.spec; - pattern[1].mask = &rule->ipv4.mask; - } else { - pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV6; - pattern[1].spec = &rule->ipv6.spec; - pattern[1].mask = &rule->ipv6.mask; + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_IPV4; + pattern[pattern_idx].spec = &rule->ipv4.spec; + pattern[pattern_idx].mask = &rule->ipv4.mask; + pattern_idx++; + } + + if (rule->is_ipv6) { + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_IPV6; + pattern[pattern_idx].spec = &rule->ipv6.spec; + pattern[pattern_idx].mask = &rule->ipv6.mask; + pattern_idx++; + } + + if (rule->set_security_action) { + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_ESP; + pattern[pattern_idx].spec = NULL; + pattern[pattern_idx].mask = NULL; + pattern[pattern_idx].last = NULL; + pattern_idx++; } - pattern[2].type = RTE_FLOW_ITEM_TYPE_END; + pattern[pattern_idx].type = RTE_FLOW_ITEM_TYPE_END; ret = rte_flow_validate(rule->port, &attr, pattern, action, &err); if (ret < 0) { RTE_LOG(ERR, IPSEC, "Flow validation failed %s\n", err.message); + rule->flow = 0; return; } https://lab.dpdk.org/results/dashboard/patchsets/22678/ UNH-IOL DPDK Community Lab