29 #include <rte_byteorder.h>
34 #include "flow_common.h"
43 #define DOCA_SAMPLE_ENTROPY_QUEUES_NUM 1
44 #define DOCA_SAMPLE_ENTROPY_ENTRIES_NUM 1
70 memset(dev_arr, 0,
sizeof(
struct doca_dev *) *
nb_ports);
71 dev_arr[0] =
ctx->doca_dev[0];
90 DOCA_LOG_INFO(
"The entropy for the given packet header is:0x%x", rte_be_to_cpu_16(entropy));
struct doca_flow_port * init_doca_flow(uint16_t port_id, uint8_t rxq_num)
#define DOCA_SAMPLE_ENTROPY_QUEUES_NUM
DOCA_LOG_REGISTER(FLOW_ENTROPY)
doca_error_t flow_entropy(struct flow_switch_ctx *ctx)
#define DOCA_SAMPLE_ENTROPY_ENTRIES_NUM
#define BE_IPV4_ADDR(a, b, c, d)
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_FLOW_L4_TYPE_EXT_UDP
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_calc_entropy(struct doca_flow_port *port, struct doca_flow_entropy_format *header, uint16_t *entropy)
Calculate the entropy.
DOCA_STABLE void doca_flow_destroy(void)
Destroy the doca flow.
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
#define DOCA_LOG_INFO(format,...)
Generates an INFO application log message.
doca_error_t stop_doca_flow_ports(int nb_ports, struct doca_flow_port *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[])
#define SHARED_RESOURCE_NUM_VALUES
#define ACTIONS_MEM_SIZE(nr_queues, entries)
#define ARRAY_INIT(array, val)
static uint32_t actions_mem_size[FLOW_SWITCH_PORTS_MAX]
static struct doca_flow_port * ports[FLOW_SWITCH_PORTS_MAX]
struct upf_accel_ctx * ctx