3. Data Structures

3. Data Structures (PDF)

Here are the data structures with brief descriptions:

doca_argp_param
Program flag information
doca_argp_program_general_config
DOCA general flags values as provided to the program
doca_argp_program_type_config
Information about program configuration
doca_comm_channel_init_attr
Configuration attributes for endpoint initialization
doca_dma_job_memcpy
doca_dma_memcpy_result
doca_dpi_config_t
DPI init configuration
doca_dpi_grpc_generic_packet
Generic packet that holds payload or a whole packet as segment
doca_dpi_grpc_result
Dequeue result
doca_dpi_parsing_info
L2-L4 flow information
doca_dpi_result
Dequeue result
doca_dpi_sig_data
Extra signature data
doca_dpi_sig_info
Signature info
doca_dpi_stat_info
DPI statistics
doca_event
Activity completion event
doca_flow_action_desc
Action description
doca_flow_action_descs
Action descriptions
doca_flow_action_descs_packet
Packet action descriptions
doca_flow_action_field
Extended modification action
doca_flow_actions
Doca flow actions information
doca_flow_aged_query
Aged flow query callback context
doca_flow_cfg
Doca flow global configuration
doca_flow_encap_action
Doca flow encap data information
doca_flow_error
Doca flow error message struct
doca_flow_fwd
Forwarding configuration
doca_flow_grpc_bindable_obj
Bindable object configuration
doca_flow_grpc_fwd
Forwarding configuration wrapper
doca_flow_grpc_pipe_cfg
Pipeline configuration wrapper
doca_flow_grpc_response
General DOCA Flow response struct
doca_flow_ip_addr
Doca flow ip address
doca_flow_match
Doca flow matcher information
doca_flow_monitor
Doca monitor action configuration
doca_flow_pipe_cfg
Pipeline configuration
doca_flow_port_cfg
Doca flow port configuration
doca_flow_query
Flow query result
doca_flow_resource_meter_cfg
Doca flow meter resource configuration
doca_flow_resources
Doca flow resource quota
doca_flow_shared_resource_cfg
Doca flow shared resource configuration
doca_flow_tun
Doca flow tunnel information
doca_job
Job structure describes request arguments for service provided by context
doca_regex_buffer
doca_regex_compiled_rules_result
doca_regex_dev_caps
doca_regex_dev_info
doca_regex_device
doca_regex_job_request
doca_regex_job_response
doca_regex_match
doca_telemetry_buffer_attr_t
DOCA schema buffer attribute. Applied to all DOCA sources
doca_telemetry_field_info_t
DOCA schema field
doca_telemetry_file_write_attr_t
DOCA schema file write attribute. Applied to all DOCA sources
doca_telemetry_ipc_attr_t
DOCA schema file write attribute. Applied to all DOCA sources
doca_telemetry_ipc_timeout_attr_t
DOCA schema IPC attribute. Applied to all DOCA sources
doca_telemetry_netflow_flowset_field
One field in netflow template, please look at doca_telemetry_netflow_types for type macros
doca_telemetry_netflow_send_attr_t
DOCA netflow sending attribute. Applied to all DOCA sources
doca_telemetry_netflow_template
Template for the records. struct record_example { uint32_t src_addr_V4; uint32_t dst_addr_V4; } struct doca_telemetry_netflow_flowset_field fields[] = { {.type = DOCA_NETFLOW_IPV4_SRC_ADDR, .length = DOCA_NETFLOW_IPV4_SRC_ADDR_DEFAULT_LENGTH}, {.type = DOCA_NETFLOW_IPV4_DST_ADDR, .length = DOCA_NETFLOW_IPV4_DST_ADDR_DEFAULT_LENGTH} }; struct doca_telemetry_netflow_template netflow_template = { .field_count = 2; .fields = fields; };
doca_telemetry_opaque_events_attr_t
DOCA schema opaque events attribute. Applied to all DOCA sources
doca_telemetry_source_name_attr_t
DOCA telemetry source attributes: id and tag

[Arg Parser]

Note:

It is the programmer's responsibility to ensure the callback will copy the content of the param passed to it. The pointer pointing to the param is owned by doca_argp, and it is only valid in the scope of the called callback.


Public Variables

enumdoca_argp_type arg_type
char * arguments
callback_func callback
char * description
bool  is_cli_only
bool  is_mandatory
char * long_flag
char * short_flag

Variables

enumdoca_argp_typedoca_argp_param::arg_type [inherited]

Flag argument type

char * doca_argp_param::arguments [inherited]

Flag expected arguments

callback_funcdoca_argp_param::callback [inherited]

Flag program callback

char * doca_argp_param::description [inherited]

Flag description

bool doca_argp_param::is_cli_only [inherited]

Is flag supported only in cli mode

bool doca_argp_param::is_mandatory [inherited]

Is flag mandatory for the program

char * doca_argp_param::long_flag [inherited]

Flag short name

char * doca_argp_param::short_flag [inherited]

Flag long name

[Arg Parser]

Public Variables

char  grpc_address[MAX_SERVER_ADDRESS]
int  log_level

Variables

char doca_argp_program_general_config::grpc_address[MAX_SERVER_ADDRESS] [inherited]

The gRPC server address as provided by the user

int doca_argp_program_general_config::log_level [inherited]

The log level as provided by the user

[Arg Parser]

Public Variables

bool  is_dpdk
bool  is_grpc

Variables

bool doca_argp_program_type_config::is_dpdk [inherited]

Is the program based on DPDK API

bool doca_argp_program_type_config::is_grpc [inherited]

Is the program based on gRPC API

[Comm Channel]

Public Variables

uint32_t  cookie
uint32_t  flags
uint32_t  maxmsgs
uint32_t  msgsize

Variables

uint32_t doca_comm_channel_init_attr::cookie [inherited]

Cookie returned when polling the event_channel.

uint32_t doca_comm_channel_init_attr::flags [inherited]

Flags: 0 or DOCA_CC_INIT_FLAG_NONBLOCK.

uint32_t doca_comm_channel_init_attr::maxmsgs [inherited]

Max. # of messages on queue.

uint32_t doca_comm_channel_init_attr::msgsize [inherited]

Max. message size (bytes).

[DOCA DMA engine]

A job to be dispatched via the DMA library.

Public Variables

struct doca_job base
doca_buf * dst_buff
uint64_t  num_bytes_to_copy
const doca_buf * src_buff

Variables

struct doca_jobdoca_dma_job_memcpy::base [inherited]

Common job data

doca_buf * doca_dma_job_memcpy::dst_buff [inherited]

Destination data buffer

uint64_t doca_dma_job_memcpy::num_bytes_to_copy [inherited]

Number of bytes to copy

const doca_buf * doca_dma_job_memcpy::src_buff [inherited]

Source data buffer

[DOCA DMA engine]

Result of a DMA Memcpy job. Will be held inside the doca_event::result field.

Public Variables

doca_error_t result

Variables

doca_error_tdoca_dma_memcpy_result::result [inherited]

Operation result

[Deep packet inspection]

Public Variables

uint32_t  max_packets_per_queue
uint32_t  max_sig_match_len
uint16_t  nb_queues

Variables

uint32_t doca_dpi_config_t::max_packets_per_queue [inherited]

Number of packets concurrently processed by the DPI engine.

uint32_t doca_dpi_config_t::max_sig_match_len [inherited]

The minimum required overlap between two packets for regex match

uint16_t doca_dpi_config_t::nb_queues [inherited]

Number of DPI queues

[Remote deep packet inspection (grpc)]

Public Variables

uint16_t  seg_len
uint8_t * segment

Variables

uint16_t doca_dpi_grpc_generic_packet::seg_len [inherited]

The length of the data inside segment buffer

uint8_t * doca_dpi_grpc_generic_packet::segment [inherited]

The buffer with data to be scanned by the DPI

[Remote deep packet inspection (grpc)]

Public Variables

struct doca_dpi_sig_info info
bool  matched
doca_dpi_grpc_generic_packetpkt
int  status_flags
void * user_data

Variables

struct doca_dpi_sig_infodoca_dpi_grpc_result::info [inherited]

Signature information

bool doca_dpi_grpc_result::matched [inherited]

Indicates flow was matched

doca_dpi_grpc_generic_packet * doca_dpi_grpc_result::pkt [inherited]

Pkt provided on enqueue

int doca_dpi_grpc_result::status_flags [inherited]

doca_dpi_flow_status flags

void * doca_dpi_grpc_result::user_data [inherited]

User data provided on enqueue

[Deep packet inspectionRemote deep packet inspection (grpc)]

Public Variables

doca_dpi_parsing_info::@6  dst_ip
doca_dpi_parsing_info::@4  dst_ip
__be16  ethertype
in_addr  ipv4
in6_addr  ipv6
in_port_t  l4_dport
uint8_t  l4_protocol
in_port_t  l4_sport
doca_dpi_parsing_info::@7  src_ip
doca_dpi_parsing_info::@5  src_ip

Variables

doca_dpi_parsing_info::@6 doca_dpi_parsing_info::dst_ip [inherited]

IP destination address

doca_dpi_parsing_info::@4 doca_dpi_parsing_info::dst_ip [inherited]

IP destination address

__be16 doca_dpi_parsing_info::ethertype [inherited]

Ethertype of the packet in network byte order

Ethertype of the packet in network byte order

in_addr doca_dpi_parsing_info::ipv4 [inherited]

Ipv4 destination address in network byte order

Ipv4 source address in network byte order

in6_addr doca_dpi_parsing_info::ipv6 [inherited]

Ipv6 destination address in network byte order

Ipv6 source address in network byte order

in_port_t doca_dpi_parsing_info::l4_dport [inherited]

Layer 4 destination port in network byte order

Layer 4 destination port in network byte order

uint8_t doca_dpi_parsing_info::l4_protocol [inherited]

Layer 4 protocol

in_port_t doca_dpi_parsing_info::l4_sport [inherited]

Layer 4 source port in network byte order

Layer 4 source port in network byte order

doca_dpi_parsing_info::@7 doca_dpi_parsing_info::src_ip [inherited]

IP source address

doca_dpi_parsing_info::@5 doca_dpi_parsing_info::src_ip [inherited]

IP source address

[Deep packet inspection]

Public Variables

struct doca_dpi_sig_info info
bool  matched
rte_mbuf * pkt
int  status_flags
void * user_data

Variables

struct doca_dpi_sig_infodoca_dpi_result::info [inherited]

Signature information

bool doca_dpi_result::matched [inherited]

Indicates flow was matched

rte_mbuf * doca_dpi_result::pkt [inherited]

Pkt provided on enqueue

int doca_dpi_result::status_flags [inherited]

doca_dpi_flow_status flags

void * doca_dpi_result::user_data [inherited]

User data provided on enqueue

[Deep packet inspectionRemote deep packet inspection (grpc)]

Public Variables

char  name[1024]
uint32_t  sig_id

Variables

char doca_dpi_sig_data::name[1024] [inherited]

Signature name

uint32_t doca_dpi_sig_data::sig_id [inherited]

Signature ID as provided in the signature

[Deep packet inspectionRemote deep packet inspection (grpc)]

Public Variables

int  action
uint32_t  sig_id

Variables

int doca_dpi_sig_info::action [inherited]

The action as provided in the signature

uint32_t doca_dpi_sig_info::sig_id [inherited]

Signature ID as provided in the signature

[Deep packet inspectionRemote deep packet inspection (grpc)]

Public Variables

uint32_t  nb_http_parser_based
uint32_t  nb_matches
uint32_t  nb_other_l4
uint32_t  nb_other_l7
uint32_t  nb_scanned_pkts
uint32_t  nb_ssl_parser_based
uint32_t  nb_tcp_based
uint32_t  nb_udp_based

Variables

uint32_t doca_dpi_stat_info::nb_http_parser_based [inherited]

Total number of http signature matches

uint32_t doca_dpi_stat_info::nb_matches [inherited]

Total number of signature matches

uint32_t doca_dpi_stat_info::nb_other_l4 [inherited]

Total number of other l4 signature matches

uint32_t doca_dpi_stat_info::nb_other_l7 [inherited]

Total number of other l7 signature matches

uint32_t doca_dpi_stat_info::nb_scanned_pkts [inherited]

Total number of scanned packets

uint32_t doca_dpi_stat_info::nb_ssl_parser_based [inherited]

Total number of ssl signature matches

uint32_t doca_dpi_stat_info::nb_tcp_based [inherited]

Total number of tcp signature matches

uint32_t doca_dpi_stat_info::nb_udp_based [inherited]

Total number of udp signature matches

[DOCA Context]

Event structure defines activity completion of: 1. Completion event of submitted job. 2. CTX received event as a result of some external activity.

Public Variables

doca_data  result
int  type
doca_data  user_data

Variables

doca_data doca_event::result [inherited]

Event result defined per action type arguments. If the result is as small as 64 bit (E.g., status or similar), it can be accessed as result.u64. Otherwise the data is pointed to by result.ptr, where the size is fixed for each action type.

int doca_event::type [inherited]

The type of the event originating activity.

doca_data doca_event::user_data [inherited]

Defines the origin of the given event. For events originating from submitted jobs, this will hold the same user_data provided as part of the job. For events originating from external activity, refer to the documentation of the specific event type.

[Flow]

Public Variables

struct doca_flow_action_descs_packet inner
struct doca_flow_action_desc meta
struct doca_flow_action_descs_packet outer
struct doca_flow_action_desc tunnel

Variables

struct doca_flow_action_descs_packetdoca_flow_action_descs::inner [inherited]

action descriptions of outer packet.

struct doca_flow_action_descdoca_flow_action_descs::meta [inherited]

action description of meta data.

struct doca_flow_action_descs_packetdoca_flow_action_descs::outer [inherited]

action descriptions of outer packet.

struct doca_flow_action_descdoca_flow_action_descs::tunnel [inherited]

action description of tunnel.

[Flow]

Public Variables

struct doca_flow_action_desc dst_ip
struct doca_flow_action_desc dst_mac
struct doca_flow_action_desc dst_port
struct doca_flow_action_desc eth_type
struct doca_flow_action_desc src_ip
struct doca_flow_action_desc src_mac
struct doca_flow_action_desc src_port
struct doca_flow_action_desc ttl
struct doca_flow_action_desc vlan

Variables

struct doca_flow_action_descdoca_flow_action_descs_packet::dst_ip [inherited]

action description of destination IP.

struct doca_flow_action_descdoca_flow_action_descs_packet::dst_mac [inherited]

action description of destination MAC.

struct doca_flow_action_descdoca_flow_action_descs_packet::dst_port [inherited]

action description of destination L4 port.

struct doca_flow_action_descdoca_flow_action_descs_packet::eth_type [inherited]

action description of ether type.

struct doca_flow_action_descdoca_flow_action_descs_packet::src_ip [inherited]

action description of source IP.

struct doca_flow_action_descdoca_flow_action_descs_packet::src_mac [inherited]

action description of source MAC.

struct doca_flow_action_descdoca_flow_action_descs_packet::src_port [inherited]

action description of source L4 port.

struct doca_flow_action_descdoca_flow_action_descs_packet::ttl [inherited]

action description of IPv4 TTL.

struct doca_flow_action_descdoca_flow_action_descs_packet::vlan [inherited]

action description of VLAN.

[Flow]

Public Variables

void * address
uint32_t  offset

Variables

void * doca_flow_action_field::address [inherited]

Field address of pipe match to decide field type and byte offset.

uint32_t doca_flow_action_field::offset [inherited]

Target bit in field from the address.

[Flow]

Public Variables

bool  dec_ttl
bool  decap
struct doca_flow_encap_action encap
uint32_t  flags
bool  has_encap
doca_flow_meta  meta
struct doca_flow_ip_addr mod_dst_ip
uint8_t  mod_dst_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t mod_dst_port
struct doca_flow_ip_addr mod_src_ip
uint8_t  mod_src_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t mod_src_port

Variables

bool doca_flow_actions::dec_ttl [inherited]

decrease TTL value

bool doca_flow_actions::decap [inherited]

when true, will do decap

struct doca_flow_encap_actiondoca_flow_actions::encap [inherited]

encap data information

uint32_t doca_flow_actions::flags [inherited]

action flags

bool doca_flow_actions::has_encap [inherited]

when true, will do encap

doca_flow_meta doca_flow_actions::meta [inherited]

modify meta data, pipe action as mask

struct doca_flow_ip_addrdoca_flow_actions::mod_dst_ip [inherited]

modify destination ip address

uint8_t doca_flow_actions::mod_dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

modify destination mac address

doca_be16_tdoca_flow_actions::mod_dst_port [inherited]

modify layer 4 destination port

struct doca_flow_ip_addrdoca_flow_actions::mod_src_ip [inherited]

modify source ip address

uint8_t doca_flow_actions::mod_src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

modify source mac address

doca_be16_tdoca_flow_actions::mod_src_port [inherited]

modify layer 4 source port

[Flow]

Public Variables

uint64_t  user_data

Variables

uint64_t doca_flow_aged_query::user_data [inherited]

The user input context, otherwish the doca_flow_pipe_entry pointer

[Flow]

Public Variables

bool  aging
doca_flow_entry_process_cb cb
const char * mode_args
uint32_t  nr_shared_resources[DOCA_FLOW_SHARED_RESOURCE_MAX]
uint32_t  queue_depth
uint16_t  queues
struct doca_flow_resources resource

Variables

bool doca_flow_cfg::aging [inherited]

when true, aging is handled by doca

doca_flow_entry_process_cbdoca_flow_cfg::cb [inherited]

callback for entry create/destroy

const char * doca_flow_cfg::mode_args [inherited]

set doca flow architecture mode switch, vnf

uint32_t doca_flow_cfg::nr_shared_resources[DOCA_FLOW_SHARED_RESOURCE_MAX] [inherited]

total shared resource per type

uint32_t doca_flow_cfg::queue_depth [inherited]

Number of pre-configured queue_size, default to 128

uint16_t doca_flow_cfg::queues [inherited]

queue id for each offload thread

struct doca_flow_resourcesdoca_flow_cfg::resource [inherited]

resource quota

[Flow]

Public Variables

struct doca_flow_ip_addr dst_ip
uint8_t  dst_mac[DOCA_ETHER_ADDR_LEN]
struct doca_flow_ip_addr src_ip
uint8_t  src_mac[DOCA_ETHER_ADDR_LEN]
struct doca_flow_tun tun

Variables

struct doca_flow_ip_addrdoca_flow_encap_action::dst_ip [inherited]

destination ip address

uint8_t doca_flow_encap_action::dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

destination mac address

struct doca_flow_ip_addrdoca_flow_encap_action::src_ip [inherited]

source ip address

uint8_t doca_flow_encap_action::src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

source mac address

struct doca_flow_tundoca_flow_encap_action::tun [inherited]

tunnel info

[Flow]

Public Variables

const char * message
enumdoca_flow_error_type type

Variables

const char * doca_flow_error::message [inherited]

Human-readable error message

enumdoca_flow_error_typedoca_flow_error::type [inherited]

Cause field and error types

[Flow]

Public Variables

doca_flow_pipe * next_pipe
int  num_of_queues
uint16_t  port_id
uint32_t  rss_flags
uint32_t  rss_mark
uint16_t * rss_queues
enumdoca_flow_fwd_type type

Variables

doca_flow_pipe * doca_flow_fwd::next_pipe [inherited]

next pipe pointer

int doca_flow_fwd::num_of_queues [inherited]

number of queues

uint16_t doca_flow_fwd::port_id [inherited]

destination port id

uint32_t doca_flow_fwd::rss_flags [inherited]

rss offload types

uint32_t doca_flow_fwd::rss_mark [inherited]

markid of each queues

uint16_t * doca_flow_fwd::rss_queues [inherited]

rss queues array

enumdoca_flow_fwd_typedoca_flow_fwd::type [inherited]

indicate the forwarding type

[Flow (grpc)]

Public Variables

uint64_t  pipe_id
uint32_t  port_id
enumdoca_flow_grpc_bindable_obj_type type

Variables

uint64_t doca_flow_grpc_bindable_obj::pipe_id [inherited]

pipe id if type is pipe

uint32_t doca_flow_grpc_bindable_obj::port_id [inherited]

port id if type is port

enumdoca_flow_grpc_bindable_obj_typedoca_flow_grpc_bindable_obj::type [inherited]

bindable object type

[Flow (grpc)]

Public Variables

doca_flow_fwdfwd
uint64_t  next_pipe_id

Variables

doca_flow_fwd * doca_flow_grpc_fwd::fwd [inherited]

doca flow fwd struct

uint64_t doca_flow_grpc_fwd::next_pipe_id [inherited]

next pipe id

[Flow (grpc)]

Public Variables

uint32_t  aging_res
uint64_t  entry_id
enumdoca_flow_entry_status entry_status
struct doca_flow_error error
uint64_t  nb_entries_processed
uint64_t  pipe_id
bool  success

Variables

uint32_t doca_flow_grpc_response::aging_res [inherited]

return value from handle aging

uint64_t doca_flow_grpc_response::entry_id [inherited]

entry id

enumdoca_flow_entry_statusdoca_flow_grpc_response::entry_status [inherited]

return value of entry get status

struct doca_flow_errordoca_flow_grpc_response::error [inherited]

Otherwise, this field contains the error information

uint64_t doca_flow_grpc_response::nb_entries_processed [inherited]

return value from entries process

uint64_t doca_flow_grpc_response::pipe_id [inherited]

pipe id

bool doca_flow_grpc_response::success [inherited]

in case of success should be true

[Flow net]

Public Variables

doca_be32_t ipv4_addr
doca_be32_t ipv6_addr[4]
uint8_t  type

Variables

doca_be32_tdoca_flow_ip_addr::ipv4_addr [inherited]

ipv4 address if type is ipv4

doca_be32_tdoca_flow_ip_addr::ipv6_addr[4] [inherited]

ipv6 address if type is ipv6

uint8_t doca_flow_ip_addr::type [inherited]

ip address type

[Flow]

Public Variables

uint32_t  flags
struct doca_flow_ip_addr in_dst_ip
uint8_t  in_dst_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t in_dst_port
doca_be16_t in_eth_type
uint8_t  in_l4_type
struct doca_flow_ip_addr in_src_ip
uint8_t  in_src_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t in_src_port
uint8_t  in_tcp_flags
doca_be16_t in_vlan_id
doca_flow_meta  meta
struct doca_flow_ip_addr out_dst_ip
uint8_t  out_dst_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t out_dst_port
doca_be16_t out_eth_type
uint8_t  out_l4_type
struct doca_flow_ip_addr out_src_ip
uint8_t  out_src_mac[DOCA_ETHER_ADDR_LEN]
doca_be16_t out_src_port
uint8_t  out_tcp_flags
doca_be16_t out_vlan_id
struct doca_flow_tun tun

Variables

uint32_t doca_flow_match::flags [inherited]

match items which are no value

struct doca_flow_ip_addrdoca_flow_match::in_dst_ip [inherited]

inner destination ip address if tunnel is used

uint8_t doca_flow_match::in_dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

inner destination mac address

doca_be16_tdoca_flow_match::in_dst_port [inherited]

inner layer 4 destination port if tunnel is used

doca_be16_tdoca_flow_match::in_eth_type [inherited]

inner Ethernet layer type

uint8_t doca_flow_match::in_l4_type [inherited]

inner layer 4 protocol type if tunnel is used

struct doca_flow_ip_addrdoca_flow_match::in_src_ip [inherited]

inner source ip address if tunnel is used

uint8_t doca_flow_match::in_src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

inner source mac address

doca_be16_tdoca_flow_match::in_src_port [inherited]

inner layer 4 source port if tunnel is used

uint8_t doca_flow_match::in_tcp_flags [inherited]

inner tcp flags

doca_be16_tdoca_flow_match::in_vlan_id [inherited]

inner vlan id

doca_flow_meta doca_flow_match::meta [inherited]

Programmable meta data.

struct doca_flow_ip_addrdoca_flow_match::out_dst_ip [inherited]

outer destination ip address

uint8_t doca_flow_match::out_dst_mac[DOCA_ETHER_ADDR_LEN] [inherited]

outer destination mac address

doca_be16_tdoca_flow_match::out_dst_port [inherited]

outer layer 4 destination port

doca_be16_tdoca_flow_match::out_eth_type [inherited]

outer Ethernet layer type

uint8_t doca_flow_match::out_l4_type [inherited]

outer layer 4 protocol type

struct doca_flow_ip_addrdoca_flow_match::out_src_ip [inherited]

outer source ip address

uint8_t doca_flow_match::out_src_mac[DOCA_ETHER_ADDR_LEN] [inherited]

outer source mac address

doca_be16_tdoca_flow_match::out_src_port [inherited]

outer layer 4 source port

uint8_t doca_flow_match::out_tcp_flags [inherited]

outer tcp flags

doca_be16_tdoca_flow_match::out_vlan_id [inherited]

outer vlan id

struct doca_flow_tundoca_flow_match::tun [inherited]

tunnel info

[Flow]

Public Variables

uint32_t  aging
uint64_t  cbs
uint64_t  cir
uint8_t  flags
uint64_t  user_data

Variables

uint32_t doca_flow_monitor::aging [inherited]

aging time in seconds.

uint64_t doca_flow_monitor::cbs [inherited]

Committed Burst Size (bytes).

uint64_t doca_flow_monitor::cir [inherited]

Committed Information Rate (bytes/second).

uint8_t doca_flow_monitor::flags [inherited]

indicate which actions be included

uint64_t doca_flow_monitor::user_data [inherited]

aging user data input.

[Flow]

Public Variables

doca_flow_action_descsaction_descs
doca_flow_actionsactions
bool  is_root
doca_flow_matchmatch
doca_flow_matchmatch_mask
doca_flow_monitormonitor
const char * name
uint32_t  nb_flows
doca_flow_port * port
enumdoca_flow_pipe_type type

Variables

doca_flow_action_descs * doca_flow_pipe_cfg::action_descs [inherited]

action descriptions

doca_flow_actions * doca_flow_pipe_cfg::actions [inherited]

actions for the pipeline

bool doca_flow_pipe_cfg::is_root [inherited]

pipeline is root or not

doca_flow_match * doca_flow_pipe_cfg::match [inherited]

matcher for the pipeline

doca_flow_match * doca_flow_pipe_cfg::match_mask [inherited]

match mask for the pipeline

doca_flow_monitor * doca_flow_pipe_cfg::monitor [inherited]

monitor for the pipeline

const char * doca_flow_pipe_cfg::name [inherited]

name for the pipeline

uint32_t doca_flow_pipe_cfg::nb_flows [inherited]

Maximum number of flow rules, default is 8k if not set

doca_flow_port * doca_flow_pipe_cfg::port [inherited]

port for the pipeline

enumdoca_flow_pipe_typedoca_flow_pipe_cfg::type [inherited]

type of pipe. enum doca_flow_pipe_type

[Flow]

Public Variables

const char * devargs
uint16_t  port_id
uint16_t  priv_data_size
enumdoca_flow_port_type type

Variables

const char * doca_flow_port_cfg::devargs [inherited]

specific per port type cfg

uint16_t doca_flow_port_cfg::port_id [inherited]

dpdk port id

uint16_t doca_flow_port_cfg::priv_data_size [inherited]

user private data

enumdoca_flow_port_typedoca_flow_port_cfg::type [inherited]

mapping type of port

[Flow]

Public Variables

uint64_t  total_bytes
uint64_t  total_pkts

Variables

uint64_t doca_flow_query::total_bytes [inherited]

total bytes hit this flow

uint64_t doca_flow_query::total_pkts [inherited]

total packets hit this flow

[Flow]

Public Variables

uint64_t  cbs
uint64_t  cir

Variables

uint64_t doca_flow_resource_meter_cfg::cbs [inherited]

Committed Burst Size (bytes).

uint64_t doca_flow_resource_meter_cfg::cir [inherited]

Committed Information Rate (bytes/second).

[Flow]

Public Variables

uint32_t  nb_counters
uint32_t  nb_meters

Variables

uint32_t doca_flow_resources::nb_counters [inherited]

Number of counters to configure

uint32_t doca_flow_resources::nb_meters [inherited]

Number of traffic meters to configure

[DOCA Context]

A context of given type may serve one or more request types defined as action type (see definition of enum doca_action_type).

DOCA Job layout

SDK job --> +--------------------------+ | DOCA Job (base) | | type | | flags | | ctx | | user data | | | +------------+-------------+ <-- job arguments | | variable size | arguments | SDK specific | . | structure | . | | . | | . | | . | | . | | | +------------+-------------+

Public Variables

doca_ctx * ctx
int  flags
int  type
doca_data  user_data

Variables

doca_ctx * doca_job::ctx [inherited]

Doca CTX targeted by the job.

int doca_job::flags [inherited]

Job submission flags (see `enum doca_job_flags`).

int doca_job::type [inherited]

Defines the type of the job.

doca_data doca_job::user_data [inherited]

Job identifier provided by user. Will be returned back on completion.

DOCA RegEx buffer supporting different payload types.

All methods of this API provide assurances similar to the strong exception guarantee in that:

  • A function will complete in its entirety or not at all. They will NEVER leave an argument or the operated upon object in an undetermined state.

  • In the case of failure the operated upon object and any arguments are not modified in any way and it is as if the function call was never executed.

  • A failed function call may have written to a log source. This is not considered a change in any objects state. A type to represent a buffer to be scanned by the regex engine.

Public Variables

const void * address
uint32_t  has_mkey
uint32_t  length
uint32_t  mkey

Variables

const void * doca_regex_buffer::address [inherited]

Pointer to job data, must remain valid until the response for this job is returned

uint32_t doca_regex_buffer::has_mkey [inherited]

Is there an mkey associated with this memory. 1 = yes, 0 = no. All other values are invalid.

uint32_t doca_regex_buffer::length [inherited]

Number of bytes of data in this job.

uint32_t doca_regex_buffer::mkey [inherited]

Mkey value. Only valid when has_mkey is set.

Structure describing the result of compilation of rules into a given regex devices preferred format.

Public Variables

void * compiled_rules_data
uint32_t  compiled_rules_size
uint32_t * failure_indices
uint32_t  num_failures
uint32_t  num_successful

Variables

void * doca_regex_compiled_rules_result::compiled_rules_data [inherited]

Pointer to compiled binary rules data.

uint32_t doca_regex_compiled_rules_result::compiled_rules_size [inherited]

size of compiled binary rules data.

uint32_t * doca_regex_compiled_rules_result::failure_indices [inherited]

Array of rule IDs of rules that failed to compile. length == num_failures.

uint32_t doca_regex_compiled_rules_result::num_failures [inherited]

Number of rules that failed to compile.

uint32_t doca_regex_compiled_rules_result::num_successful [inherited]

Number of rules that successfully compiled.

Definition of an abstract implementation to be used by doca regex, Provides a separation between implementation of regex routines for the higher level functionality of the doca regex api. Structure describing the capabilities supported by a regex impl.

Public Variables

uint8_t  multi_client_supported
uint8_t  pmi_supported

Variables

uint8_t doca_regex_dev_caps::multi_client_supported [inherited]

Device has multi-client support, 0 if not supported.

uint8_t doca_regex_dev_caps::pmi_supported [inherited]

Device has PMI support, 0 if not supported.

Structure describing a regex impl.

Public Variables

uint32_t  max_job_size
const char * name
uint16_t  version[3]

Variables

uint32_t doca_regex_dev_info::max_job_size [inherited]

Maximum size of a job payload in bytes for a single job.

const char * doca_regex_dev_info::name [inherited]

A name describing this device.

uint16_t doca_regex_dev_info::version[3] [inherited]

version of the regex device [MAJOR][MINOR][PATCH].

Structure containing all the functionality required of a regex device by the DOCA regex.

Allows each DOCA regex instance to be supported by any regex_impl. Such as Hyperscan, DPDK regex, or any other regex library that can be adapted to this interface.

Public Variables

int(  ( *cleanup_fn )( doca_regex_device* inst )
Cleanup all resources acquired by the regex_impl from either one time setup or during runtime operation.
doca_regex_compiled_rules_result  ( *compile_rules_fn )( doca_regex_device* inst, char const* const *raw_rules, uint32_t num_lines )
Compile given raw rules.
int(  ( *configure_nb_qps_fn )( doca_regex_device* inst, uint32_t num_qps )
Configure the number of QP's required by the regex lib from the device.
void * cookie
int(  ( *dequeue_jobs_fn )( doca_regex_device* inst, uint16_t qpid, doca_regex_job_response* responses, uint8_t max_results, doca_regex_mempool* matches_mp )
Fetch job responses from the regex_impl.
void  ( *destroy_fn )( doca_regex_device* inst )
Function suitable to destroy this doca_regex_device.
int(  ( *enqueue_job_fn )( doca_regex_device* inst, uint16_t qpid, doca_regex_job_request const* job, uint64_t internal_job_id, bool  allow_aggregation )
Send a job to the regex engine to be processed.
int(  ( *init_fn )( doca_regex_device* inst, const char* dev_addr )
Do any one time setup work that may be required before performing regex operations.
void * mem_regs
void * pd
int(  ( *program_compiled_rules_fn )( doca_regex_device* inst, void const* data, uint32_t data_len )
Program regex device with the supplied compiled rules data.
int(  ( *query_dev_caps_fn )( doca_regex_device* inst, doca_regex_dev_caps* caps )
Query capabilities of the regex device.
int(  ( *query_dev_info_fn )( doca_regex_device* inst, doca_regex_dev_info* info )
Query information about the regex device.

Variables

int( ( *doca_regex_device::cleanup_fn )( doca_regex_device* inst )

Cleanup all resources acquired by the regex_impl from either one time setup or during runtime operation.

Parameters
inst
Instance of the impl.

Returns

0 on success or a negative posix status code.

doca_regex_compiled_rules_result ( *doca_regex_device::compile_rules_fn )( doca_regex_device* inst, char const* const *raw_rules, uint32_t num_lines )

Compile given raw rules.

Parameters
inst
Instance of the impl.
const *raw_rules
num_lines
Number of lines of text to parse.

Returns

A doca_regex_compiled_rules_result describing the number of failed rules and outlining the index of each rule that failed. Caller assumes ownership of this object.

int( ( *doca_regex_device::configure_nb_qps_fn )( doca_regex_device* inst, uint32_t num_qps )

Configure the number of QP's required by the regex lib from the device.

Parameters
inst
Instance of the impl.
num_qps
Required number of qps.

Returns

0 on success or a negative posix status code.

void * doca_regex_device::cookie [inherited]

A place to bind any required extra data into the impl.

int( ( *doca_regex_device::dequeue_jobs_fn )( doca_regex_device* inst, uint16_t qpid, doca_regex_job_response* responses, uint8_t max_results, doca_regex_mempool* matches_mp )

Fetch job responses from the regex_impl.

Parameters
inst
Instance of the impl.
qpid
responses
A pointer to an array of responses. The regex engine will place each dequeued result into this array until either the maximum number of responses are returned or all available responses have been returned
max_results
matches_mp
To get matches back from the regex search provide a non null memory pool which will return items which are least as big as a doca_regex_match. Provide A NULL pool to just get a summary of the number of matches detected.

Returns

[0..max_results] Number of jobs dequeued or a negative posix status code.

void ( *doca_regex_device::destroy_fn )( doca_regex_device* inst )

Function suitable to destroy this doca_regex_device. Set this to NULL to indicate that the engine should not attempt to destroy this object when the engine is destroyed.

Parameters
inst
Instance of the impl.

int( ( *doca_regex_device::enqueue_job_fn )( doca_regex_device* inst, uint16_t qpid, doca_regex_job_request const* job, uint64_t internal_job_id, bool  allow_aggregation )

Send a job to the regex engine to be processed.

Parameters
inst
Instance of the impl.
qpid
ID of qp to use
job
Details of the job. Caller retains ownership of these objects;
internal_job_id
Internal job id - this value should be returned by the device when dequeuing the result for this piece. The job request id is the id of the overall job which may have been broken into multiple pieces.
allow_aggregation
Give permission to the device to hold the job to potentially improve throughput. If false then the device must immediately send the job.

Returns

[0..count] Number of jobs enqueued or a negative posix status code.

int( ( *doca_regex_device::init_fn )( doca_regex_device* inst, const char* dev_addr )

Do any one time setup work that may be required before performing regex operations.

Parameters
inst
Instance of the impl.
dev_addr
PCIe address of regex device (NULL if not a HW device).

Returns

0 on success or a negative posix status code.

void * doca_regex_device::mem_regs [inherited]

Memory regions associated with the device (only applicable to HW dev).

void * doca_regex_device::pd [inherited]

Protection Domain assigned to device (only applicable to HW dev).

int( ( *doca_regex_device::program_compiled_rules_fn )( doca_regex_device* inst, void const* data, uint32_t data_len )

Program regex device with the supplied compiled rules data.

Parameters
inst
Instance of the impl.
data
A blob of memory in the same format that would be produced by compile_rules_fn. However it may have been read from a pre-compiled input file and not necessarily compiled by this regex_impl. It will be the applications responsibility to ensure that when providing a path to a pre-compiled data within doca_regex_rules_cfg that the file contains data in a format suitable for the selected regex_impl.
data_len
Number of bytes in the blob pointed to by data.

Returns

0 on success or a negative posix status code.

int( ( *doca_regex_device::query_dev_caps_fn )( doca_regex_device* inst, doca_regex_dev_caps* caps )

Query capabilities of the regex device.

Parameters
inst
Instance of the impl.
caps
Capabilities structure to populate. MUST NOT BE NULL.

Returns

0 on success or a negative posix status code.

int( ( *doca_regex_device::query_dev_info_fn )( doca_regex_device* inst, doca_regex_dev_info* info )

Query information about the regex device.

Parameters
inst
Instance of the impl.
info
Informational structure to populate. MUST NOT BE NULL.

Returns

0 on success or a negative posix status code.

[RegEx engine]

Data required to dispatch a job to a RegEx engine.

Public Variables

doca_regex_bufferbuffer
uint64_t  id
uint16_t  rule_group_ids[4]

Variables

doca_regex_buffer * doca_regex_job_request::buffer [inherited]

Data for the job

uint64_t doca_regex_job_request::id [inherited]

ID of the job, useful to correlate the response.

uint16_t doca_regex_job_request::rule_group_ids[4] [inherited]

IDs which can be used to select which group of rules are used to process this job. Set each value to a non zero value to enable this feature or 0 to ignore it.

[RegEx engine]

Result of a RegEx search

Public Variables

uint32_t  detected_matches
uint64_t  id
doca_regex_matchmatches
uint32_t  num_matches
uint64_t  status_flags

Variables

uint32_t doca_regex_job_response::detected_matches [inherited]

Total number of detected matches.

uint64_t doca_regex_job_response::id [inherited]

ID of the enqueued job.

doca_regex_match * doca_regex_job_response::matches [inherited]

Returned matches. Contains num_matches elements as a linked list

uint32_t doca_regex_job_response::num_matches [inherited]

Total number of returned matches.

uint64_t doca_regex_job_response::status_flags [inherited]

Response flags. A bit masked field for zero or more status flags. See doca_regex_status_flag

[RegEx engine]

Description of a RegEx match

Public Variables

uint32_t  length
uint32_t  match_start
doca_regex_matchnext
uint32_t  rule_id

Variables

uint32_t doca_regex_match::length [inherited]

Length of matched value.

uint32_t doca_regex_match::match_start [inherited]

Index relative to the start of the job / stream where the match begins

doca_regex_match * doca_regex_match::next [inherited]

Allows matches to be linked together for easy management and iteration

uint32_t doca_regex_match::rule_id [inherited]

ID of rule used to generate this match.

[Telemetry Service Library]

Use to set internal buffer_size. All DOCA sources will have buffers of the same size. The buffer is flushed once it is full, or upon invocation of doca_telemetry_source_flush(). The buffer size is set to 60,000 by default. data_root is the data folder for storing the data and data schema_{hash}.json files.

Public Variables

uint64_t  buffer_size
char * data_root

Variables

uint64_t doca_telemetry_buffer_attr_t::buffer_size [inherited]

Size of the internal buffer.

char * doca_telemetry_buffer_attr_t::data_root [inherited]

Path to a folder where the data and schema will be stored.

[Telemetry Service Library]

Public Variables

uint16_t  array_length
const char * description
const char * field_name
const char * type_name

Variables

uint16_t doca_telemetry_field_info_t::array_length [inherited]

Array length for this field type. Set to: 1 to register single value or >1 to register array of values.

const char * doca_telemetry_field_info_t::description [inherited]

Field descripion

const char * doca_telemetry_field_info_t::field_name [inherited]

Name of field

const char * doca_telemetry_field_info_t::type_name [inherited]

Name of type that is already in schema (including built-in types).

[Telemetry Service Library]

Use to enable/disable file write onto storage under data_root. File write is disabled by default.

Public Variables

bool  file_write_enabled
doca_telemetry_timestamp_t max_file_age
size_t  max_file_size

Variables

bool doca_telemetry_file_write_attr_t::file_write_enabled [inherited]

User defined switch for enabling/disabling local file write. Disabled by the default.

doca_telemetry_timestamp_tdoca_telemetry_file_write_attr_t::max_file_age [inherited]

Maximum file age. Once current file is older than this threshold a new file will be created.

size_t doca_telemetry_file_write_attr_t::max_file_size [inherited]

Maximum size of binary data file. Once this size is reached, a new binary file will be created.

[Telemetry Service Library]

Use to enable/disable ipc transport. Enabled by default. Default ipc_sockets_dir is '/opt/mellanox/doca/services/telemetry/ipc_sockets'

Public Variables

bool  ipc_enabled
char * ipc_sockets_dir

Variables

bool doca_telemetry_ipc_attr_t::ipc_enabled [inherited]

User defined switch for enabling/disabling IPC transport.

char * doca_telemetry_ipc_attr_t::ipc_sockets_dir [inherited]

Path to a folder containing Telemetry Service sockets.

[Telemetry Service Library]

Used to overwrite default values of timeouts for attach/reattach attempts and IPC socket timeout.

Public Variables

uint32_t  ipc_max_reconnect_time_msec
int  ipc_max_reconnect_tries
uint32_t  ipc_socket_timeout_msec

Variables

uint32_t doca_telemetry_ipc_timeout_attr_t::ipc_max_reconnect_time_msec [inherited]

Time limit for reconnect attempts. If the limit is reached, the client is considered disconnected. Default is 100 msec.

int doca_telemetry_ipc_timeout_attr_t::ipc_max_reconnect_tries [inherited]

Number of reconnect attempts during reconnection period. Default is 3.

uint32_t doca_telemetry_ipc_timeout_attr_t::ipc_socket_timeout_msec [inherited]

Timeout for IPC messaging socket. If timeout is reached during send_receive, client is considered disconnected. Default is 500 msec.

[Telemetry Service Library]

Public Variables

uint16_t  length
uint16_t  type

Variables

uint16_t doca_telemetry_netflow_flowset_field::length [inherited]

field len in bytes (see link)

uint16_t doca_telemetry_netflow_flowset_field::type [inherited]

field number id (see link)

[Telemetry Service Library]

Use to enable/disable netflow sending to a collector. Disabled by the defalt.

Public Variables

char * netflow_collector_addr
uint16_t  netflow_collector_port

Variables

char * doca_telemetry_netflow_send_attr_t::netflow_collector_addr [inherited]

User defined netflow collector's IP address

uint16_t doca_telemetry_netflow_send_attr_t::netflow_collector_port [inherited]

User defined netflow collector's port

[Telemetry Service Library]

Note:

all fields are in network byte order.


Public Variables

uint16_t  field_count
doca_telemetry_netflow_flowset_fieldfields

Variables

uint16_t doca_telemetry_netflow_template::field_count [inherited]

number of fields in 'fields' array

doca_telemetry_netflow_flowset_field * doca_telemetry_netflow_template::fields [inherited]

array of field info

[Telemetry Service Library]

Use to enable/disable opaque events transport. Disabled by default.

Public Variables

bool  opaque_events_enabled

Variables

bool doca_telemetry_opaque_events_attr_t::opaque_events_enabled [inherited]

User defined switch for enabling/disabling Opaque Events sending.

[Telemetry Service Library]

ID and Tag are used to create proper folder structure. All the data collected from the same host is written to "source_id" folder under data root. Binary file will have {source_tag}_{timestamp}.bin name format.

Public Variables

char * source_id
char * source_tag

Variables

char * doca_telemetry_source_name_attr_t::source_id [inherited]

Hostname or guid.

char * doca_telemetry_source_name_attr_t::source_tag [inherited]

User defined datafile name prefix.

© Copyright 2023, NVIDIA. Last updated on May 9, 2022.