| 2576 | } |
| 2577 | |
| 2578 | static int |
| 2579 | action_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 |
no test coverage detected