| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#include <unistd.h>#include <rte_ethdev.h>#include <doca_log.h>#include <doca_flow.h>#include <doca_flow_ct.h>#include <doca_bitfield.h>#include "flow_ct_common.h"#include "flow_common.h"
Go to the source code of this file.
Macros | |
| #define | PACKET_BURST 128 |
| #define | NB_COUNTERS 6 |
Functions | |
| DOCA_LOG_REGISTER (FLOW_CT_TCP) | |
| static doca_error_t | create_rss_pipe (struct doca_flow_port *port, struct entries_status *status, struct doca_flow_pipe **pipe) |
| static doca_error_t | create_egress_pipe (struct doca_flow_port *port, int port_id, struct entries_status *status, struct doca_flow_pipe **pipe) |
| static doca_error_t | create_ct_miss_pipe (struct doca_flow_port *port, struct doca_flow_pipe *fwd_pipe, struct entries_status *status, struct doca_flow_pipe **pipe) |
| static doca_error_t | create_tcp_flags_filter_pipe (struct doca_flow_port *port, struct entries_status *status, struct doca_flow_pipe *fwd_pipe, struct doca_flow_pipe *fwd_miss_pipe, struct doca_flow_pipe **pipe) |
| static doca_error_t | create_ct_pipe (struct doca_flow_port *port, struct doca_flow_pipe *fwd_pipe, struct doca_flow_pipe *fwd_miss_pipe, struct doca_flow_pipe **pipe) |
| static void | parse_packet (struct rte_mbuf *packet, struct doca_flow_ct_match *match_o, struct doca_flow_ct_match *match_r, uint8_t *tcp_state) |
| static doca_error_t | process_packets (struct doca_flow_port *port, uint16_t ct_queue, struct entries_status *ct_status, uint32_t shared_handle, struct doca_flow_pipe_entry **entry) |
| static doca_error_t | print_pipe_counters (uint16_t ct_queue, struct doca_flow_pipe *ct_pipe) |
| doca_error_t | flow_ct_tcp_actions (uint16_t nb_queues, struct doca_dev *ct_dev) |
Variables | |
| static uint16_t | sessions = 0 |
| static struct doca_flow_pipe_entry * | rss_entry |
| static struct doca_flow_pipe_entry * | egress_entry |
| static struct doca_flow_pipe_entry * | tcp_flags_filter_entry |
| static struct doca_flow_pipe_entry * | ct_miss_entry |
| static struct doca_flow_pipe_entry * | ct_entry |
| #define NB_COUNTERS 6 |
Definition at line 39 of file flow_ct_tcp_actions_sample.c.
| #define PACKET_BURST 128 |
Definition at line 38 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 236 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 405 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 160 of file flow_ct_tcp_actions_sample.c.
|
static |
PUT NIC in MP-ESWITCH mode
Root pipe -> CT pipe -> CT miss pipe -> rss pipe -> SYN: create CT rule -> tcp flags filter pipe -> egress pipe -> port 1 -> rss pipe -> FIN/RST: delete CT rule CT rule actions: origin: set pkt_meta to 1 reply: NAT(reverse L3 addresses and L4 ports)
Input: port 0 and port 1, IPv4(dst=1.1.1.1) TCP packets with SYN flag set
sendp(Ether(dst="2")/IP(src="1.1.1.1",dst="2.2.2.2")/TCP(dport=1,sport=2,flags="S"),iface="eth2")
sendp(Ether(dst="2")/IP(dst="1.1.1.1",src="2.2.2.2")/TCP(sport=1,dport=2,flags=""),iface="eth2") Output: Known TCP session on port 1
IPv4 TCP 1.1.1.1:2 > 2.2.2.2:1
Definition at line 79 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 313 of file flow_ct_tcp_actions_sample.c.
| DOCA_LOG_REGISTER | ( | FLOW_CT_TCP | ) |
| doca_error_t flow_ct_tcp_actions | ( | uint16_t | nb_queues, |
| struct doca_dev * | ct_dev | ||
| ) |
Definition at line 735 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 498 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 670 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 538 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 46 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 45 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 43 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 42 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 41 of file flow_ct_tcp_actions_sample.c.
|
static |
Definition at line 44 of file flow_ct_tcp_actions_sample.c.