app/flow-perf: export some config as runtime options
[dpdk.git] / app / test-flow-perf / flow_gen.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2020 Mellanox Technologies, Ltd
3  *
4  * This file contains the items, actions and attributes
5  * definition. And the methods to prepare and fill items,
6  * actions and attributes to generate rte_flow rule.
7  */
8
9 #ifndef FLOW_PERF_FLOW_GEN
10 #define FLOW_PERF_FLOW_GEN
11
12 #include <stdint.h>
13 #include <rte_flow.h>
14
15 #include "config.h"
16
17 /* Actions */
18 #define HAIRPIN_QUEUE_ACTION FLOW_ACTION_MASK(0)
19 #define HAIRPIN_RSS_ACTION   FLOW_ACTION_MASK(1)
20
21 /* Attributes */
22 #define INGRESS              FLOW_ATTR_MASK(0)
23 #define EGRESS               FLOW_ATTR_MASK(1)
24 #define TRANSFER             FLOW_ATTR_MASK(2)
25
26 struct rte_flow *
27 generate_flow(uint16_t port_id,
28         uint16_t group,
29         uint64_t *flow_attrs,
30         uint64_t *flow_items,
31         uint64_t *flow_actions,
32         uint16_t next_table,
33         uint32_t outer_ip_src,
34         uint16_t hairpinq,
35         uint64_t encap_data,
36         uint64_t decap_data,
37         uint8_t core_idx,
38         uint8_t rx_queues_count,
39         bool unique_data,
40         struct rte_flow_error *error);
41
42 #endif /* FLOW_PERF_FLOW_GEN */