DOCA Documentation v1.2

3. Data Structures

Here are the data structures with brief descriptions:

doca_dpi_config_t
DPI init configuration
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_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_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_tun
Doca flow tunnel information
doca_netflow_default_record
Flow record, represent a flow at specific moment, usually after a flow ends or after some timeout. Each one is a data record that will appear in the collector. This template is based on V5 fields with additional V9 fields
doca_netflow_flowset_field
One field in netflow template, please look at doca_netflow_types for type macros
doca_netflow_template
Template for the records. struct record_example { uint32_t src_addr_V4; uint32_t dst_addr_V4; } struct doca_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_netflow_template template = { .field_count = 2; .fields = fields; };
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_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

[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

[Deep packet inspection]

Public Variables

doca_dpi_parsing_info::@0  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::@1  src_ip

Variables

doca_dpi_parsing_info::@0 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

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

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

doca_dpi_parsing_info::@1 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 inspection]

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 inspection]

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 inspection]

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

[flow]

Public Variables

bool  dec_ttl
bool  decap
struct doca_flow_encap_action encap
bool  has_encap
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

bool doca_flow_actions::has_encap [inherited]

when true, will do encap

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
bool  is_hairpin
uint16_t  queues
uint32_t  total_sessions

Variables

bool doca_flow_cfg::aging [inherited]

when true, aging is handled by doca

bool doca_flow_cfg::is_hairpin [inherited]

when true, the fwd will be hairpin queue

uint16_t doca_flow_cfg::queues [inherited]

queue id for each offload thread

uint32_t doca_flow_cfg::total_sessions [inherited]

total flows count

[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 net define]

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
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
doca_be16_t in_src_port
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
struct doca_flow_tun tun
doca_be16_t vlan_id

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

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

doca_be16_tdoca_flow_match::in_src_port [inherited]

inner layer 4 source port if tunnel is used

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

struct doca_flow_tundoca_flow_match::tun [inherited]

tunnel info

doca_be16_tdoca_flow_match::vlan_id [inherited]

outer vlan id

[flow]

Public Variables

uint32_t  aging
uint64_t  cir
uint8_t  flags
uint32_t  id
uint64_t  user_data

Variables

uint32_t doca_flow_monitor::aging [inherited]

aging time in seconds.

uint64_t doca_flow_monitor::cir [inherited]

Committed Information Rate (bytes/second).

uint8_t doca_flow_monitor::flags [inherited]

indicate which actions be included

uint32_t doca_flow_monitor::id [inherited]

meter id

uint64_t doca_flow_monitor::user_data [inherited]

aging user data input.

[flow]

Public Variables

doca_flow_actionsactions
bool  is_root
doca_flow_matchmatch
doca_flow_matchmatch_mask
doca_flow_monitormonitor
const char * name
doca_flow_port * port

Variables

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

doca_flow_port * doca_flow_pipe_cfg::port [inherited]

port for the pipeline

[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

[NetFlow]

Note:

all fields are in network byte order.


Public Variables

char  application_name[DOCA_NETFLOW_APPLICATION_NAME_DEFAULT_LENGTH]
__be32  d_octets
__be32  d_pkts
__be32  dst_addr_v4
in6_addr  dst_addr_v6
__be16  dst_as
uint8_t  dst_mask
__be16  dst_port
__be32  first
__be64  flow_id
__be16  input
__be32  last
__be32  next_hop_v4
in6_addr  next_hop_v6
__be16  output
uint8_t  protocol
__be32  src_addr_v4
in6_addr  src_addr_v6
__be16  src_as
uint8_t  src_mask
__be16  src_port
uint8_t  tcp_flags
uint8_t  tos

Variables

char doca_netflow_default_record::application_name[DOCA_NETFLOW_APPLICATION_NAME_DEFAULT_LENGTH] [inherited]

Name associated with a classification

__be32 doca_netflow_default_record::d_octets [inherited]

Octets sent in Duration.

__be32 doca_netflow_default_record::d_pkts [inherited]

Packets sent in Duration

__be32 doca_netflow_default_record::dst_addr_v4 [inherited]

Destination IPV4 Address

in6_addr doca_netflow_default_record::dst_addr_v6 [inherited]

Destination IPV6 Address

__be16 doca_netflow_default_record::dst_as [inherited]

originating AS of destination address

uint8_t doca_netflow_default_record::dst_mask [inherited]

destination address prefix mask bits

__be16 doca_netflow_default_record::dst_port [inherited]

TCP/UDP destination port number or equivalent

__be32 doca_netflow_default_record::first [inherited]

SysUptime at start of flow

__be64 doca_netflow_default_record::flow_id [inherited]

This identifies a transaction within a connection

__be16 doca_netflow_default_record::input [inherited]

Input interface index

__be32 doca_netflow_default_record::last [inherited]

and of last packet of flow

__be32 doca_netflow_default_record::next_hop_v4 [inherited]

Next hop router's IPV4 Address

in6_addr doca_netflow_default_record::next_hop_v6 [inherited]

Next hop router's IPV6 Address

__be16 doca_netflow_default_record::output [inherited]

Output interface index

uint8_t doca_netflow_default_record::protocol [inherited]

IP protocol type (for example, TCP = 6;UDP = 17)

__be32 doca_netflow_default_record::src_addr_v4 [inherited]

Source IPV4 Address

in6_addr doca_netflow_default_record::src_addr_v6 [inherited]

Source IPV6 Address

__be16 doca_netflow_default_record::src_as [inherited]

originating AS of source address

uint8_t doca_netflow_default_record::src_mask [inherited]

source address prefix mask bits

__be16 doca_netflow_default_record::src_port [inherited]

TCP/UDP source port number or equivalent

uint8_t doca_netflow_default_record::tcp_flags [inherited]

Cumulative OR of tcp flags

uint8_t doca_netflow_default_record::tos [inherited]

IP Type-of-Service

[NetFlow]

Public Variables

int  length
int  type

Variables

int doca_netflow_flowset_field::length [inherited]

field len in bytes (see link) - will be converted to uint16

int doca_netflow_flowset_field::type [inherited]

field number id (see link) - will be converted to uint16

[NetFlow]

Note:

all fields are in network byte order.


Public Variables

int  field_count
doca_netflow_flowset_fieldfields

Variables

int doca_netflow_template::field_count [inherited]

number of fields in 'fields' array - will be converted to uint16

doca_netflow_flowset_field * doca_netflow_template::fields [inherited]

array of field info

[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 for 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]

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 Jan 12, 2022.