MCPcopy Create free account
hub / github.com/F-Stack/f-stack / action_convert

Function action_convert

dpdk/examples/ip_pipeline/thread.c:2578–2707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2576}
2577
2578static int
2579action_convert(struct rte_table_action *a,
2580 struct table_rule_action *action,
2581 struct rte_pipeline_table_entry *data)
2582{
2583 int status;
2584
2585 /* Apply actions */
2586 if (action->action_mask & (1LLU << RTE_TABLE_ACTION_FWD)) {
2587 status = rte_table_action_apply(a,
2588 data,
2589 RTE_TABLE_ACTION_FWD,
2590 &action->fwd);
2591
2592 if (status)
2593 return status;
2594 }
2595
2596 if (action->action_mask & (1LLU << RTE_TABLE_ACTION_LB)) {
2597 status = rte_table_action_apply(a,
2598 data,
2599 RTE_TABLE_ACTION_LB,
2600 &action->lb);
2601
2602 if (status)
2603 return status;
2604 }
2605
2606 if (action->action_mask & (1LLU << RTE_TABLE_ACTION_MTR)) {
2607 status = rte_table_action_apply(a,
2608 data,
2609 RTE_TABLE_ACTION_MTR,
2610 &action->mtr);
2611
2612 if (status)
2613 return status;
2614 }
2615
2616 if (action->action_mask & (1LLU << RTE_TABLE_ACTION_TM)) {
2617 status = rte_table_action_apply(a,
2618 data,
2619 RTE_TABLE_ACTION_TM,
2620 &action->tm);
2621
2622 if (status)
2623 return status;
2624 }
2625
2626 if (action->action_mask & (1LLU << RTE_TABLE_ACTION_ENCAP)) {
2627 status = rte_table_action_apply(a,
2628 data,
2629 RTE_TABLE_ACTION_ENCAP,
2630 &action->encap);
2631
2632 if (status)
2633 return status;
2634 }
2635

Callers 3

table_rule_add_bulk_llFunction · 0.85
pipeline_table_rule_addFunction · 0.85

Calls 1

rte_table_action_applyFunction · 0.85

Tested by

no test coverage detected