#include <string.h>
#include <unistd.h>
#include <rte_byteorder.h>
#include <rte_ethdev.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_net.h>
#include <doca_log.h>
#include <doca_flow.h>
#include <doca_dev.h>
#include "flow_common.h"
#include "flow_switch_common.h"
Go to the source code of this file.
|
| enum | ingress_vport_entry_type { INGRESS_TO_PORT0
, INGRESS_TO_PORT1
, INGRESS_TO_PORT2
, INGRESS_TO_PORT_MAX
} |
| |
| enum | switch_rss_basic_pipe_type { SWITCH_RSS_BASIC_PIPE_CONST_RSS
, SWITCH_RSS_BASIC_PIPE_DYN_RSS
, SWITCH_RSS_BASIC_PIPE_SHARED_RSS
, SWITCH_RSS_BASIC_PIPE_MAX
} |
| |
| enum | switch_rss_control_entry_type { SWITCH_RSS_CONTROL_IMM_RSS
, SWITCH_RSS_CONTROL_SHARED_RSS
, SWITCH_RSS_CONTROL_MAX
} |
| |
| enum | ingress_root_entry_type {
INGRESS_ROOT_TO_BASIC = SWITCH_RSS_BASIC_PIPE_MAX
, INGRESS_ROOT_TO_CONTROL = INGRESS_ROOT_TO_BASIC + SWITCH_RSS_CONTROL_MAX
, INGRESS_ROOT_TO_EGRESS = INGRESS_ROOT_TO_CONTROL * 2
, INGRESS_ROOT_TO_VPORT = INGRESS_ROOT_TO_EGRESS + 1
,
INGRESS_ROOT_TO_MAX = INGRESS_ROOT_TO_VPORT
} |
| |
| enum | switch_rss_pipe_dir_type { SWITCH_RSS_PIPE_DIR_N2H
, SWITCH_RSS_PIPE_DIR_BI
, SWITCH_RSS_PIPE_DIR_MAX
} |
| |
|
| | DOCA_LOG_REGISTER (FLOW_SWITCH_SWITCH_RSS) |
| |
| static void | handle_rx_tx_pkts (uint32_t port_id, uint16_t nb_queues) |
| |
| static doca_error_t | create_rss_pipe (struct doca_flow_port *port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_rss_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status) |
| |
| static doca_error_t | create_switch_rss_control_pipe (struct doca_flow_port *port, enum switch_rss_pipe_dir_type dir, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | create_switch_rss_pipe (struct doca_flow_port *port, enum switch_rss_pipe_dir_type dir, enum switch_rss_basic_pipe_type type, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | create_switch_egress_pipe (struct doca_flow_port *sw_port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | create_switch_ingress_pipe (struct doca_flow_port *sw_port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | create_switch_vport_pipe (struct doca_flow_port *sw_port, struct doca_flow_pipe **pipe) |
| |
| static doca_error_t | add_switch_egress_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status) |
| |
| static doca_error_t | add_switch_ingress_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status) |
| |
| static doca_error_t | add_switch_vport_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status) |
| |
| static int | create_switch_rss_pipes (struct doca_flow_port *port, enum switch_rss_pipe_dir_type dir) |
| |
| static int | add_switch_rss_pipe_entries (enum switch_rss_pipe_dir_type dir, struct entries_status *status) |
| |
| doca_error_t | flow_switch_rss (int nb_queues, int nb_ports, struct flow_switch_ctx *ctx) |
| |
◆ MAX_PKTS
◆ MAX_RSS_QUEUE
◆ NB_EGRESS_ENTRIES
◆ NB_INGRESS_ENTRIES
◆ NB_TOTAL_ENTRIES
◆ NB_VPORT_ENTRIES
◆ WAIT_SECS
◆ ingress_root_entry_type
| Enumerator |
|---|
| INGRESS_ROOT_TO_BASIC | |
| INGRESS_ROOT_TO_CONTROL | |
| INGRESS_ROOT_TO_EGRESS | |
| INGRESS_ROOT_TO_VPORT | |
| INGRESS_ROOT_TO_MAX | |
Definition at line 64 of file flow_switch_rss_sample.c.
◆ ingress_vport_entry_type
| Enumerator |
|---|
| INGRESS_TO_PORT0 | |
| INGRESS_TO_PORT1 | |
| INGRESS_TO_PORT2 | |
| INGRESS_TO_PORT_MAX | |
Definition at line 44 of file flow_switch_rss_sample.c.
◆ switch_rss_basic_pipe_type
| Enumerator |
|---|
| SWITCH_RSS_BASIC_PIPE_CONST_RSS | |
| SWITCH_RSS_BASIC_PIPE_DYN_RSS | |
| SWITCH_RSS_BASIC_PIPE_SHARED_RSS | |
| SWITCH_RSS_BASIC_PIPE_MAX | |
Definition at line 51 of file flow_switch_rss_sample.c.
◆ switch_rss_control_entry_type
| Enumerator |
|---|
| SWITCH_RSS_CONTROL_IMM_RSS | |
| SWITCH_RSS_CONTROL_SHARED_RSS | |
| SWITCH_RSS_CONTROL_MAX | |
Definition at line 58 of file flow_switch_rss_sample.c.
◆ switch_rss_pipe_dir_type
| Enumerator |
|---|
| SWITCH_RSS_PIPE_DIR_N2H | |
| SWITCH_RSS_PIPE_DIR_BI | |
| SWITCH_RSS_PIPE_DIR_MAX | |
Definition at line 72 of file flow_switch_rss_sample.c.
◆ add_rss_pipe_entry()
◆ add_switch_egress_pipe_entries()
◆ add_switch_ingress_pipe_entries()
◆ add_switch_rss_pipe_entries()
◆ add_switch_vport_pipe_entries()
◆ create_rss_pipe()
| static doca_error_t create_rss_pipe |
( |
struct doca_flow_port * |
port, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ create_switch_egress_pipe()
| static doca_error_t create_switch_egress_pipe |
( |
struct doca_flow_port * |
sw_port, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ create_switch_ingress_pipe()
| static doca_error_t create_switch_ingress_pipe |
( |
struct doca_flow_port * |
sw_port, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ create_switch_rss_control_pipe()
◆ create_switch_rss_pipe()
◆ create_switch_rss_pipes()
◆ create_switch_vport_pipe()
| static doca_error_t create_switch_vport_pipe |
( |
struct doca_flow_port * |
sw_port, |
|
|
struct doca_flow_pipe ** |
pipe |
|
) |
| |
|
static |
◆ DOCA_LOG_REGISTER()
| DOCA_LOG_REGISTER |
( |
FLOW_SWITCH_SWITCH_RSS |
| ) |
|
◆ flow_switch_rss()
◆ handle_rx_tx_pkts()
| static void handle_rx_tx_pkts |
( |
uint32_t |
port_id, |
|
|
uint16_t |
nb_queues |
|
) |
| |
|
static |
◆ basic_queue_map
◆ control_queue_map
◆ egress_entries
◆ entry_basic_switch_rss
◆ entry_control_switch_rss
◆ ingress_entries
◆ pipe_basic_switch_rss
◆ pipe_control_switch_rss
◆ pipe_egress
| struct doca_flow_pipe* pipe_egress |
|
static |
◆ pipe_ingress
| struct doca_flow_pipe* pipe_ingress |
|
static |
◆ pipe_rss
| struct doca_flow_pipe* pipe_rss |
|
static |
◆ pipe_vport
| struct doca_flow_pipe* pipe_vport |
|
static |
◆ rss_entry
| struct doca_flow_pipe_entry* rss_entry |
|
static |
◆ vport_entries