| 1154 | } |
| 1155 | |
| 1156 | static int |
| 1157 | action_default_check(struct table_rule_action *action, |
| 1158 | struct pipeline *p, |
| 1159 | uint32_t table_id) |
| 1160 | { |
| 1161 | if ((action == NULL) || |
| 1162 | (action->action_mask != (1LLU << RTE_TABLE_ACTION_FWD)) || |
| 1163 | (p == NULL) || |
| 1164 | (table_id >= p->n_tables)) |
| 1165 | return -1; |
| 1166 | |
| 1167 | if (action->action_mask & (1LLU << RTE_TABLE_ACTION_FWD)) { |
| 1168 | if ((action->fwd.action == RTE_PIPELINE_ACTION_PORT) && |
| 1169 | (action->fwd.id >= p->n_ports_out)) |
| 1170 | return -1; |
| 1171 | |
| 1172 | if ((action->fwd.action == RTE_PIPELINE_ACTION_TABLE) && |
| 1173 | (action->fwd.id >= p->n_tables)) |
| 1174 | return -1; |
| 1175 | } |
| 1176 | |
| 1177 | return 0; |
| 1178 | } |
| 1179 | |
| 1180 | union table_rule_match_low_level { |
| 1181 | struct rte_table_acl_rule_add_params acl_add; |
no outgoing calls
no test coverage detected