#include <rte_byteorder.h>
#include <rte_common.h>
#include <doca_flow.h>
#include <doca_dev.h>
Go to the source code of this file.
|
| #define | BE_IPV4_ADDR(a, b, c, d) (RTE_BE32(((uint32_t)a << 24) + (b << 16) + (c << 8) + d)) /* create IPV4 address */ |
| |
| #define | SET_IPV6_ADDR(addr, a, b, c, d) |
| |
| #define | SET_MAC_ADDR(addr, a, b, c, d, e, f) |
| |
| #define | BUILD_VNI(uint24_vni) (RTE_BE32((uint32_t)uint24_vni << 8)) /* create VNI */ |
| |
| #define | DEFAULT_TIMEOUT_US (10000) /* default timeout for processing entries */ |
| |
| #define | NB_ACTIONS_ARR (1) /* default length for action array */ |
| |
| #define | SHARED_RESOURCE_NUM_VALUES (8) /* Number of doca_flow_shared_resource_type values */ |
| |
| #define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| |
| #define | MIN_ACTIONS_MEM_SIZE_PER_QUEUE (256) /* Minimal actions memory size required per queue */ |
| |
| #define | INITIAL_ACTIONS_MEM_SIZE (2048) /* Needed when app creates a small number of entries */ |
| |
| #define | ACTIONS_MEM_SIZE(nr_queues, entries) |
| |
| #define | ARRAY_DIM(a) (sizeof(a) / sizeof((a)[0])) |
| |
| #define | ARRAY_INIT(array, val) |
| |
| #define | DEFS_REG_OPCODE(opcode_str, ___sname, ___field) |
| |
|
| doca_error_t | init_doca_flow (int nb_queues, const char *mode, struct flow_resources *resource, uint32_t nr_shared_resources[]) |
| |
| doca_error_t | init_doca_flow_with_defs (int nb_queues, const char *mode, struct flow_resources *resource, uint32_t nr_shared_resources[], struct doca_flow_definitions *defs) |
| |
| doca_error_t | init_doca_flow_cb (int nb_queues, const char *mode, struct flow_resources *resource, uint32_t nr_shared_resources[], doca_flow_entry_process_cb cb, doca_flow_pipe_process_cb pipe_process_cb, struct doca_flow_definitions *defs) |
| |
| doca_error_t | init_doca_flow_ports (int nb_ports, struct doca_flow_port *ports[], bool is_hairpin, struct doca_dev *dev_arr[], uint32_t actions_mem_size[]) |
| |
| doca_error_t | init_doca_flow_ports_with_op_state (int nb_ports, struct doca_flow_port *ports[], bool is_hairpin, struct doca_dev *dev_arr[], enum doca_flow_port_operation_state *states, uint32_t actions_mem_size[]) |
| |
| doca_error_t | stop_doca_flow_ports (int nb_ports, struct doca_flow_port *ports[]) |
| |
| void | check_for_valid_entry (struct doca_flow_pipe_entry *entry, uint16_t pipe_queue, enum doca_flow_entry_status status, enum doca_flow_entry_op op, void *user_ctx) |
| |
| doca_error_t | set_flow_pipe_cfg (struct doca_flow_pipe_cfg *cfg, const char *name, enum doca_flow_pipe_type type, bool is_root) |
| |
| doca_error_t | flow_process_entries (struct doca_flow_port *port, struct entries_status *status, uint32_t nr_entries) |
| |
◆ ACTIONS_MEM_SIZE
| #define ACTIONS_MEM_SIZE |
( |
|
nr_queues, |
|
|
|
entries |
|
) |
| |
Value: rte_align32pow2( \
static struct doca_flow_pipe_entry * entries[NB_ENTRIES]
#define DOCA_FLOW_MAX_ENTRY_ACTIONS_MEM_SIZE
meter mark color
#define MIN_ACTIONS_MEM_SIZE_PER_QUEUE
#define INITIAL_ACTIONS_MEM_SIZE
Definition at line 66 of file flow_common.h.
◆ ARRAY_DIM
| #define ARRAY_DIM |
( |
|
a | ) |
(sizeof(a) / sizeof((a)[0])) |
◆ ARRAY_INIT
| #define ARRAY_INIT |
( |
|
array, |
|
|
|
val |
|
) |
| |
Value: do { \
for (
size_t i = 0; i <
ARRAY_DIM(array); i++) { \
array[i] = val; \
} \
} while (0)
Definition at line 71 of file flow_common.h.
◆ BE_IPV4_ADDR
| #define BE_IPV4_ADDR |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| (RTE_BE32(((uint32_t)a << 24) + (b << 16) + (c << 8) + d)) /* create IPV4 address */ |
◆ BUILD_VNI
| #define BUILD_VNI |
( |
|
uint24_vni | ) |
(RTE_BE32((uint32_t)uint24_vni << 8)) /* create VNI */ |
◆ DEFAULT_TIMEOUT_US
| #define DEFAULT_TIMEOUT_US (10000) /* default timeout for processing entries */ |
◆ DEFS_REG_OPCODE
| #define DEFS_REG_OPCODE |
( |
|
opcode_str, |
|
|
|
___sname, |
|
|
|
___field |
|
) |
| |
Value: do { \
int rc; \
int __off =
offsetof(
struct ___sname, ___field); \
int __sz = sizeof(((struct ___sname *)0)->___field); \
\
if (rc < 0) \
return rc; \
} while (0)
DOCA_EXPERIMENTAL doca_error_t doca_flow_definitions_add_field(struct doca_flow_definitions *defs, const char *field_opcode_str, uint32_t field_offset, uint32_t field_length)
Add a field to the definitions object.
Definition at line 77 of file flow_common.h.
◆ INITIAL_ACTIONS_MEM_SIZE
| #define INITIAL_ACTIONS_MEM_SIZE (2048) /* Needed when app creates a small number of entries */ |
◆ MAX
| #define MAX |
( |
|
a, |
|
|
|
b |
|
) |
| (((a) > (b)) ? (a) : (b)) |
◆ MIN_ACTIONS_MEM_SIZE_PER_QUEUE
| #define MIN_ACTIONS_MEM_SIZE_PER_QUEUE (256) /* Minimal actions memory size required per queue */ |
◆ NB_ACTIONS_ARR
| #define NB_ACTIONS_ARR (1) /* default length for action array */ |
◆ SET_IPV6_ADDR
| #define SET_IPV6_ADDR |
( |
|
addr, |
|
|
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| |
Value: do { \
addr[0] = a & 0xffffffff; \
addr[1] = b & 0xffffffff; \
addr[2] = c & 0xffffffff; \
addr[3] = d & 0xffffffff; \
} while (0)
Definition at line 40 of file flow_common.h.
◆ SET_MAC_ADDR
| #define SET_MAC_ADDR |
( |
|
addr, |
|
|
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d, |
|
|
|
e, |
|
|
|
f |
|
) |
| |
Value: do { \
addr[0] = a & 0xff; \
addr[1] = b & 0xff; \
addr[2] = c & 0xff; \
addr[3] = d & 0xff; \
addr[4] = e & 0xff; \
addr[5] = f & 0xff; \
} while (0)
Definition at line 47 of file flow_common.h.
◆ SHARED_RESOURCE_NUM_VALUES
◆ check_for_valid_entry()
◆ flow_process_entries()
◆ init_doca_flow()
| doca_error_t init_doca_flow |
( |
int |
nb_queues, |
|
|
const char * |
mode, |
|
|
struct flow_resources * |
resource, |
|
|
uint32_t |
nr_shared_resources[] |
|
) |
| |
◆ init_doca_flow_cb()
◆ init_doca_flow_ports()
| doca_error_t init_doca_flow_ports |
( |
int |
nb_ports, |
|
|
struct doca_flow_port * |
ports[], |
|
|
bool |
is_hairpin, |
|
|
struct doca_dev * |
dev_arr[], |
|
|
uint32_t |
actions_mem_size[] |
|
) |
| |
◆ init_doca_flow_ports_with_op_state()
◆ init_doca_flow_with_defs()
| doca_error_t init_doca_flow_with_defs |
( |
int |
nb_queues, |
|
|
const char * |
mode, |
|
|
struct flow_resources * |
resource, |
|
|
uint32_t |
nr_shared_resources[], |
|
|
struct doca_flow_definitions * |
defs |
|
) |
| |
◆ set_flow_pipe_cfg()
◆ stop_doca_flow_ports()
| doca_error_t stop_doca_flow_ports |
( |
int |
nb_ports, |
|
|
struct doca_flow_port * |
ports[] |
|
) |
| |