DOCA-AR 1.0
 
Loading...
Searching...
No Matches
doca_ar_env.c File Reference

build base enviroment of DPDK and Doca-Flow More...

#include "doca_ar_env.h"

Functions

 DOCA_LOG_REGISTER (DOCA_AR_ENV)
 
int init_doca_flow (int nb_queues, const char *mode, struct doca_flow_resources resource, uint32_t nr_shared_resources[], struct doca_flow_error *error)
 
void destroy_doca_flow_ports (int nb_ports, struct doca_flow_port *ports[])
 destroy_doca_flow_ports function copied from doca-flow samples common directory
 
int init_doca_flow_ports (int nb_ports, struct doca_flow_port *ports[], bool is_hairpin)
 init_doca_flow_ports function copied from doca-flow samples common directory
 
int doca_ar_env_init (int argc, char **argv)
 build doca-flow and dpdk env
 
void doca_ar_env_destroy ()
 release all the resource of dpdk and doca-flow
 

Variables

struct doca_flow_port * ports [NB_PORTS]
 pointer of doca-flow port
 
struct application_dpdk_config dpdk_config
 dpdk config
 
int to_host_port = 0
 port connected with host pf
 
int to_net_port = 1
 port connected with uplink port
 

Detailed Description

build base enviroment of DPDK and Doca-Flow

Author
Mark Chen (markc.nosp@m.hen7.nosp@m.7888@.nosp@m.gmai.nosp@m.l.com)
Version
1.0
Date
2024-01-07

Function Documentation

◆ destroy_doca_flow_ports()

void destroy_doca_flow_ports ( int nb_ports,
struct doca_flow_port * ports[] )

destroy_doca_flow_ports function copied from doca-flow samples common directory

Parameters
nb_ports
ports

◆ doca_ar_env_destroy()

void doca_ar_env_destroy ( )

release all the resource of dpdk and doca-flow

◆ doca_ar_env_init()

int doca_ar_env_init ( int argc,
char ** argv )

build doca-flow and dpdk env

Parameters
argc
argv
Returns
int

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( DOCA_AR_ENV )

◆ init_doca_flow()

int init_doca_flow ( int nb_queues,
const char * mode,
struct doca_flow_resources resource,
uint32_t nr_shared_resources[],
struct doca_flow_error * error )

◆ init_doca_flow_ports()

int init_doca_flow_ports ( int nb_ports,
struct doca_flow_port * ports[],
bool is_hairpin )

init_doca_flow_ports function copied from doca-flow samples common directory

Parameters
nb_ports
ports

Variable Documentation

◆ dpdk_config

struct application_dpdk_config dpdk_config
Initial value:
= {
.port_config.nb_ports = 2,
.port_config.nb_queues = 1,
.port_config.nb_hairpin_q = 1,
.sft_config = {0},
}

dpdk config

◆ ports

struct doca_flow_port* ports[NB_PORTS]

pointer of doca-flow port

◆ to_host_port

int to_host_port = 0

port connected with host pf

◆ to_net_port

int to_net_port = 1

port connected with uplink port