| 36 | } |
| 37 | |
| 38 | struct rte_flow * |
| 39 | generate_flow(uint16_t port_id, |
| 40 | uint16_t group, |
| 41 | uint64_t *flow_attrs, |
| 42 | uint64_t *flow_items, |
| 43 | uint64_t *flow_actions, |
| 44 | uint16_t next_table, |
| 45 | uint32_t outer_ip_src, |
| 46 | uint16_t hairpinq, |
| 47 | uint64_t encap_data, |
| 48 | uint64_t decap_data, |
| 49 | uint16_t dst_port, |
| 50 | uint8_t core_idx, |
| 51 | uint8_t rx_queues_count, |
| 52 | bool unique_data, |
| 53 | uint8_t max_priority, |
| 54 | struct rte_flow_error *error) |
| 55 | { |
| 56 | struct rte_flow_attr attr; |
| 57 | struct rte_flow_item items[MAX_ITEMS_NUM]; |
| 58 | struct rte_flow_action actions[MAX_ACTIONS_NUM]; |
| 59 | struct rte_flow *flow = NULL; |
| 60 | |
| 61 | memset(items, 0, sizeof(items)); |
| 62 | memset(actions, 0, sizeof(actions)); |
| 63 | memset(&attr, 0, sizeof(struct rte_flow_attr)); |
| 64 | |
| 65 | fill_attributes(&attr, flow_attrs, group, max_priority); |
| 66 | |
| 67 | fill_actions(actions, flow_actions, |
| 68 | outer_ip_src, next_table, hairpinq, |
| 69 | encap_data, decap_data, core_idx, |
| 70 | unique_data, rx_queues_count, dst_port); |
| 71 | |
| 72 | fill_items(items, flow_items, outer_ip_src, core_idx); |
| 73 | |
| 74 | flow = rte_flow_create(port_id, &attr, items, actions, error); |
| 75 | return flow; |
| 76 | } |
no test coverage detected