NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
flow_hash_pipe_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 "flow_switch_common.h"
Include dependency graph for flow_hash_pipe_sample.c:

Go to the source code of this file.

Macros

#define NB_ENTRIES   2 /* number of entries in the created hash pipe */
 

Functions

 DOCA_LOG_REGISTER (FLOW_HASH_PIPE)
 
static doca_error_t create_hash_pipe (struct doca_flow_port *port, struct doca_flow_pipe **pipe)
 
static doca_error_t create_hash_pipe_sw (struct doca_flow_port *port, struct doca_flow_pipe **pipe)
 
static doca_error_t add_hash_pipe_entries (struct doca_flow_pipe *pipe, struct entries_status *status)
 
static doca_error_t calc_hash (struct doca_flow_pipe *pipe)
 
doca_error_t flow_hash_pipe (int nb_queues, int nb_ports, struct flow_switch_ctx *ctx)
 

Variables

static struct doca_flow_pipe_entry * entries [NB_ENTRIES]
 

Macro Definition Documentation

◆ NB_ENTRIES

#define NB_ENTRIES   2 /* number of entries in the created hash pipe */

Definition at line 39 of file flow_hash_pipe_sample.c.

Function Documentation

◆ add_hash_pipe_entries()

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

Definition at line 180 of file flow_hash_pipe_sample.c.

◆ calc_hash()

static doca_error_t calc_hash ( struct doca_flow_pipe *  pipe)
static

Definition at line 224 of file flow_hash_pipe_sample.c.

◆ create_hash_pipe()

static doca_error_t create_hash_pipe ( struct doca_flow_port *  port,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 52 of file flow_hash_pipe_sample.c.

◆ create_hash_pipe_sw()

static doca_error_t create_hash_pipe_sw ( struct doca_flow_port *  port,
struct doca_flow_pipe **  pipe 
)
static

Definition at line 115 of file flow_hash_pipe_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( FLOW_HASH_PIPE  )

◆ flow_hash_pipe()

doca_error_t flow_hash_pipe ( int  nb_queues,
int  nb_ports,
struct flow_switch_ctx ctx 
)

Definition at line 249 of file flow_hash_pipe_sample.c.

Variable Documentation

◆ entries

struct doca_flow_pipe_entry* entries[NB_ENTRIES]
static

Definition at line 41 of file flow_hash_pipe_sample.c.