#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <rte_ethdev.h>
#include <doca_log.h>
#include <doca_flow.h>
#include <doca_bitfield.h>
#include "doca_error.h"
#include "flow_common.h"
Go to the source code of this file.
|
| | DOCA_LOG_REGISTER (FLOW_RANDOM) |
| |
| static doca_error_t | create_root_pipe (struct doca_flow_port *port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_root_pipe_entry (struct doca_flow_pipe *pipe, struct doca_flow_pipe *next_pipe, doca_be32_t src_ip_addr, struct entries_status *status, struct doca_flow_pipe_entry **entry) |
| |
| static doca_error_t | add_root_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status, struct doca_flow_pipe *distribution_pipe, struct doca_flow_pipe *sampling_pipe, struct doca_flow_pipe_entry **distribution_entry, struct doca_flow_pipe_entry **sampling_entry) |
| |
| static uint16_t | get_random_mask (double percentage) |
| |
| static doca_error_t | create_random_sampling_pipe (struct doca_flow_port *port, int port_id, double percentage, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_random_sampling_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status, struct doca_flow_pipe_entry **entry) |
| |
| static doca_error_t | create_random_distribution_pipe (struct doca_flow_port *port, int nb_flows, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_random_distribution_pipe_entries (struct doca_flow_pipe *pipe, int nb_entries, struct entries_status *status) |
| |
| static doca_error_t | random_sampling_results (uint16_t port_id, struct doca_flow_pipe_entry *root_entry, struct doca_flow_pipe_entry *random_entry, double requested_percentage) |
| |
| static doca_error_t | random_distribution_results (uint16_t port_id, uint16_t nb_queues, struct doca_flow_pipe_entry *root_entry) |
| |
| doca_error_t | flow_random (int nb_steering_queues, int nb_rss_queues) |
| |
◆ GET_PERCENTAGE
| #define GET_PERCENTAGE |
( |
|
part, |
|
|
|
total |
|
) |
| (((double)part / (double)total) * 100) |
◆ PACKET_BURST
◆ RANDOM_WIDTH
◆ add_random_distribution_pipe_entries()
| static doca_error_t add_random_distribution_pipe_entries |
( |
struct doca_flow_pipe * |
pipe, |
|
|
int |
nb_entries, |
|
|
struct entries_status * |
status |
|
) |
| |
|
static |
◆ add_random_sampling_pipe_entry()
| static doca_error_t add_random_sampling_pipe_entry |
( |
struct doca_flow_pipe * |
pipe, |
|
|
struct entries_status * |
status, |
|
|
struct doca_flow_pipe_entry ** |
entry |
|
) |
| |
|
static |
◆ add_root_pipe_entries()
| static doca_error_t add_root_pipe_entries |
( |
struct doca_flow_pipe * |
pipe, |
|
|
struct entries_status * |
status, |
|
|
struct doca_flow_pipe * |
distribution_pipe, |
|
|
struct doca_flow_pipe * |
sampling_pipe, |
|
|
struct doca_flow_pipe_entry ** |
distribution_entry, |
|
|
struct doca_flow_pipe_entry ** |
sampling_entry |
|
) |
| |
|
static |
◆ add_root_pipe_entry()
| static doca_error_t add_root_pipe_entry |
( |
struct doca_flow_pipe * |
pipe, |
|
|
struct doca_flow_pipe * |
next_pipe, |
|
|
doca_be32_t |
src_ip_addr, |
|
|
struct entries_status * |
status, |
|
|
struct doca_flow_pipe_entry ** |
entry |
|
) |
| |
|
static |
◆ create_random_distribution_pipe()
| static doca_error_t create_random_distribution_pipe |
( |
struct doca_flow_port * |
port, |
|
|
int |
nb_flows, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ create_random_sampling_pipe()
| static doca_error_t create_random_sampling_pipe |
( |
struct doca_flow_port * |
port, |
|
|
int |
port_id, |
|
|
double |
percentage, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ create_root_pipe()
| static doca_error_t create_root_pipe |
( |
struct doca_flow_port * |
port, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ DOCA_LOG_REGISTER()
| DOCA_LOG_REGISTER |
( |
FLOW_RANDOM |
| ) |
|
◆ flow_random()
| doca_error_t flow_random |
( |
int |
nb_steering_queues, |
|
|
int |
nb_rss_queues |
|
) |
| |
◆ get_random_mask()
| static uint16_t get_random_mask |
( |
double |
percentage | ) |
|
|
static |
◆ random_distribution_results()
| static doca_error_t random_distribution_results |
( |
uint16_t |
port_id, |
|
|
uint16_t |
nb_queues, |
|
|
struct doca_flow_pipe_entry * |
root_entry |
|
) |
| |
|
static |
◆ random_sampling_results()
| static doca_error_t random_sampling_results |
( |
uint16_t |
port_id, |
|
|
struct doca_flow_pipe_entry * |
root_entry, |
|
|
struct doca_flow_pipe_entry * |
random_entry, |
|
|
double |
requested_percentage |
|
) |
| |
|
static |