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

Go to the source code of this file.

Macros

#define NB_ACTION_DESC   (1)
 
#define NB_VXLAN_ENTRIES   (1)
 
#define NB_GPE_ENTRIES   (1)
 
#define NB_MODIFY_HDR_ENTRIES   (1)
 
#define TOTAL_ENTRIES   (NB_VXLAN_ENTRIES + NB_GPE_ENTRIES + NB_MODIFY_HDR_ENTRIES)
 

Functions

 DOCA_LOG_REGISTER (FLOW_MODIFY_HEADER)
 
static doca_error_t create_vxlan_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe **pipe)
 
static doca_error_t add_vxlan_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t create_vxlan_gpe_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe *miss_pipe, struct doca_flow_pipe **pipe)
 
static doca_error_t add_vxlan_gpe_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t create_modify_header_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe *miss_pipe, struct doca_flow_pipe **pipe)
 
static doca_error_t add_modify_header_pipe_entry (struct doca_flow_pipe *pipe, struct entries_status *status)
 
doca_error_t flow_modify_header (int nb_queues)
 

Macro Definition Documentation

◆ NB_ACTION_DESC

#define NB_ACTION_DESC   (1)

Definition at line 37 of file flow_modify_header_sample.c.

◆ NB_GPE_ENTRIES

#define NB_GPE_ENTRIES   (1)

Definition at line 39 of file flow_modify_header_sample.c.

◆ NB_MODIFY_HDR_ENTRIES

#define NB_MODIFY_HDR_ENTRIES   (1)

Definition at line 40 of file flow_modify_header_sample.c.

◆ NB_VXLAN_ENTRIES

#define NB_VXLAN_ENTRIES   (1)

Definition at line 38 of file flow_modify_header_sample.c.

◆ TOTAL_ENTRIES

#define TOTAL_ENTRIES   (NB_VXLAN_ENTRIES + NB_GPE_ENTRIES + NB_MODIFY_HDR_ENTRIES)

Definition at line 41 of file flow_modify_header_sample.c.

Function Documentation

◆ add_modify_header_pipe_entry()

static doca_error_t add_modify_header_pipe_entry ( struct doca_flow_pipe *  pipe,
struct entries_status status 
)
static

Definition at line 360 of file flow_modify_header_sample.c.

◆ add_vxlan_gpe_pipe_entry()

static doca_error_t add_vxlan_gpe_pipe_entry ( struct doca_flow_pipe *  pipe,
struct entries_status status 
)
static

Definition at line 230 of file flow_modify_header_sample.c.

◆ add_vxlan_pipe_entry()

static doca_error_t add_vxlan_pipe_entry ( struct doca_flow_pipe *  pipe,
struct entries_status status 
)
static

Definition at line 116 of file flow_modify_header_sample.c.

◆ create_modify_header_pipe()

static doca_error_t create_modify_header_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe *  miss_pipe,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 277 of file flow_modify_header_sample.c.

◆ create_vxlan_gpe_pipe()

static doca_error_t create_vxlan_gpe_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe *  miss_pipe,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 161 of file flow_modify_header_sample.c.

◆ create_vxlan_pipe()

static doca_error_t create_vxlan_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 53 of file flow_modify_header_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( FLOW_MODIFY_HEADER  )

◆ flow_modify_header()

doca_error_t flow_modify_header ( int  nb_queues)

Definition at line 390 of file flow_modify_header_sample.c.