NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
flow_gtp_sample.c File Reference
#include <string.h>
#include <unistd.h>
#include <rte_byteorder.h>
#include <doca_log.h>
#include <doca_flow.h>
#include "flow_common.h"
Include dependency graph for flow_gtp_sample.c:

Go to the source code of this file.

Macros

#define CHECK_DOCA_SUCCESS(op, msg)
 

Functions

 DOCA_LOG_REGISTER (FLOW_GTP)
 
int create_modify_gtp_psc_header_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe **pipe)
 
int add_modify_gtp_psc_header_entry (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t create_match_gtp_pipe_and_add_entry (struct doca_flow_port *port, struct doca_flow_pipe *modify_qfi_pipe, struct entries_status *status, struct doca_flow_pipe **pipe)
 
doca_error_t flow_gtp (int nb_queues)
 

Variables

static struct doca_flow_port * ports [2]
 
static int nb_ports = 2
 

Macro Definition Documentation

◆ CHECK_DOCA_SUCCESS

#define CHECK_DOCA_SUCCESS (   op,
  msg 
)
Value:
do { \
result = (op); \
if (result != DOCA_SUCCESS) { \
DOCA_LOG_ERR("Failed to " msg ": %s", doca_error_get_descr(result)); \
stop_doca_flow_ports(nb_ports, ports); \
doca_flow_destroy(); \
return result; \
} \
} while (0)
int32_t result
static int nb_ports
static struct doca_flow_port * ports[2]
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_SUCCESS
Definition: doca_error.h:38

Definition at line 40 of file flow_gtp_sample.c.

Function Documentation

◆ add_modify_gtp_psc_header_entry()

int add_modify_gtp_psc_header_entry ( struct doca_flow_pipe *  pipe,
struct entries_status status 
)

Definition at line 122 of file flow_gtp_sample.c.

◆ create_match_gtp_pipe_and_add_entry()

static doca_error_t create_match_gtp_pipe_and_add_entry ( struct doca_flow_port *  port,
struct doca_flow_pipe *  modify_qfi_pipe,
struct entries_status status,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 152 of file flow_gtp_sample.c.

◆ create_modify_gtp_psc_header_pipe()

int create_modify_gtp_psc_header_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe **  pipe 
)

Definition at line 59 of file flow_gtp_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( FLOW_GTP  )

◆ flow_gtp()

doca_error_t flow_gtp ( int  nb_queues)

Definition at line 211 of file flow_gtp_sample.c.

Variable Documentation

◆ nb_ports

int nb_ports = 2
static

Definition at line 36 of file flow_gtp_sample.c.

◆ ports

struct doca_flow_port* ports[2]
static

Definition at line 35 of file flow_gtp_sample.c.