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

Go to the source code of this file.

Macros

#define WAITING_TIME   10
 
#define NB_INGRESS_PIPE_ENTRIES   (4)
 
#define NB_MODIFY_PIPE_ENTRIES   (2)
 
#define NB_ENCAP_PIPE_ENTRIES   (2)
 
#define NB_EGRESS_PIPE_ENTRIES   (NB_MODIFY_PIPE_ENTRIES + NB_ENCAP_PIPE_ENTRIES)
 
#define TOTAL_ENTRIES   (NB_INGRESS_PIPE_ENTRIES + NB_EGRESS_PIPE_ENTRIES)
 

Functions

 DOCA_LOG_REGISTER (FLOW_IPV6_FLOW_LABEL)
 
static doca_error_t create_ingress_pipe (struct doca_flow_port *port, int port_id, struct entries_status *status, uint32_t *nb_entries)
 
static doca_error_t add_encap_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t create_encap_pipe (struct doca_flow_port *port, struct doca_flow_pipe *next_pipe, struct entries_status *status, uint32_t *nb_entries)
 
static void fill_copy_to_outer_ipv6_fl_desc (const char *src_str, uint32_t src_bit_offset, struct doca_flow_action_desc *desc, struct doca_flow_action_descs *descs)
 
static doca_error_t create_modify_pipe (struct doca_flow_port *port, int port_id, struct doca_flow_pipe **pipe, uint32_t *nb_entries)
 
static doca_error_t add_modify_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t prepare_egress_pipeline (struct doca_flow_port *pair_port, int pair_port_id, struct entries_status *status)
 
static doca_error_t prepare_ingress_pipeline (struct doca_flow_port *port, int port_id, struct entries_status *status)
 
doca_error_t flow_ipv6_flow_label (int nb_queues)
 

Macro Definition Documentation

◆ NB_EGRESS_PIPE_ENTRIES

#define NB_EGRESS_PIPE_ENTRIES   (NB_MODIFY_PIPE_ENTRIES + NB_ENCAP_PIPE_ENTRIES)

Definition at line 46 of file flow_ipv6_flow_label_sample.c.

◆ NB_ENCAP_PIPE_ENTRIES

#define NB_ENCAP_PIPE_ENTRIES   (2)

Definition at line 45 of file flow_ipv6_flow_label_sample.c.

◆ NB_INGRESS_PIPE_ENTRIES

#define NB_INGRESS_PIPE_ENTRIES   (4)

Definition at line 43 of file flow_ipv6_flow_label_sample.c.

◆ NB_MODIFY_PIPE_ENTRIES

#define NB_MODIFY_PIPE_ENTRIES   (2)

Definition at line 44 of file flow_ipv6_flow_label_sample.c.

◆ TOTAL_ENTRIES

#define TOTAL_ENTRIES   (NB_INGRESS_PIPE_ENTRIES + NB_EGRESS_PIPE_ENTRIES)

Definition at line 47 of file flow_ipv6_flow_label_sample.c.

◆ WAITING_TIME

#define WAITING_TIME   10

Definition at line 42 of file flow_ipv6_flow_label_sample.c.

Function Documentation

◆ add_encap_pipe_entries()

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

Definition at line 177 of file flow_ipv6_flow_label_sample.c.

◆ add_modify_pipe_entries()

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

Definition at line 480 of file flow_ipv6_flow_label_sample.c.

◆ create_encap_pipe()

static doca_error_t create_encap_pipe ( struct doca_flow_port *  port,
struct doca_flow_pipe *  next_pipe,
struct entries_status status,
uint32_t *  nb_entries 
)
static

Definition at line 264 of file flow_ipv6_flow_label_sample.c.

◆ create_ingress_pipe()

static doca_error_t create_ingress_pipe ( struct doca_flow_port *  port,
int  port_id,
struct entries_status status,
uint32_t *  nb_entries 
)
static

Definition at line 57 of file flow_ipv6_flow_label_sample.c.

◆ create_modify_pipe()

static doca_error_t create_modify_pipe ( struct doca_flow_port *  port,
int  port_id,
struct doca_flow_pipe **  pipe,
uint32_t *  nb_entries 
)
static

Definition at line 395 of file flow_ipv6_flow_label_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( FLOW_IPV6_FLOW_LABEL  )

◆ fill_copy_to_outer_ipv6_fl_desc()

static void fill_copy_to_outer_ipv6_fl_desc ( const char *  src_str,
uint32_t  src_bit_offset,
struct doca_flow_action_desc desc,
struct doca_flow_action_descs descs 
)
static

Definition at line 370 of file flow_ipv6_flow_label_sample.c.

◆ flow_ipv6_flow_label()

doca_error_t flow_ipv6_flow_label ( int  nb_queues)

Definition at line 593 of file flow_ipv6_flow_label_sample.c.

◆ prepare_egress_pipeline()

static doca_error_t prepare_egress_pipeline ( struct doca_flow_port *  pair_port,
int  pair_port_id,
struct entries_status status 
)
static

Definition at line 517 of file flow_ipv6_flow_label_sample.c.

◆ prepare_ingress_pipeline()

static doca_error_t prepare_ingress_pipeline ( struct doca_flow_port *  port,
int  port_id,
struct entries_status status 
)
static

Definition at line 565 of file flow_ipv6_flow_label_sample.c.