#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"
#include "flow_switch_common.h"
Go to the source code of this file.
|
| | DOCA_LOG_REGISTER (FLOW_SAMPLING) |
| |
| static doca_error_t | create_root_pipe (struct doca_flow_port *port, struct doca_flow_pipe *next_pipe, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_root_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status, struct doca_flow_pipe_entry **entry) |
| |
| static uint16_t | get_random_value (double percentage) |
| |
| static doca_error_t | create_random_sampling_pipe (struct doca_flow_port *port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_random_sampling_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status, double percentage, struct doca_flow_pipe_entry **entry) |
| |
| static doca_error_t | random_sampling_results (struct doca_flow_pipe_entry *root_entry, struct doca_flow_pipe_entry *random_entry, double requested_percentage) |
| |
| doca_error_t | flow_sampling (int nb_queues, struct flow_switch_ctx *ctx) |
| |
◆ GET_PERCENTAGE
| #define GET_PERCENTAGE |
( |
|
part, |
|
|
|
total |
|
) |
| (((double)part / (double)total) * 100) |
◆ RANDOM_TOTAL_RANGE
◆ RANDOM_WIDTH
◆ WAITING_TIME
◆ add_random_sampling_pipe_entry()
| static doca_error_t add_random_sampling_pipe_entry |
( |
struct doca_flow_pipe * |
pipe, |
|
|
struct entries_status * |
status, |
|
|
double |
percentage, |
|
|
struct doca_flow_pipe_entry ** |
entry |
|
) |
| |
|
static |
◆ add_root_pipe_entry()
| static doca_error_t add_root_pipe_entry |
( |
struct doca_flow_pipe * |
pipe, |
|
|
struct entries_status * |
status, |
|
|
struct doca_flow_pipe_entry ** |
entry |
|
) |
| |
|
static |
◆ create_random_sampling_pipe()
| static doca_error_t create_random_sampling_pipe |
( |
struct doca_flow_port * |
port, |
|
|
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 * |
next_pipe, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ DOCA_LOG_REGISTER()
| DOCA_LOG_REGISTER |
( |
FLOW_SAMPLING |
| ) |
|
◆ flow_sampling()
◆ get_random_value()
| static uint16_t get_random_value |
( |
double |
percentage | ) |
|
|
static |
◆ random_sampling_results()
| static doca_error_t random_sampling_results |
( |
struct doca_flow_pipe_entry * |
root_entry, |
|
|
struct doca_flow_pipe_entry * |
random_entry, |
|
|
double |
requested_percentage |
|
) |
| |
|
static |