NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
Doca Flow Net
Collaboration diagram for Doca Flow Net:

Data Structures

struct  doca_flow_header_eth_vlan
 doca flow vlan header More...
 
struct  doca_flow_header_eth
 doca flow eth header More...
 
struct  doca_flow_ip_addr
 doca flow ip address More...
 
struct  doca_flow_header_ib_bth
 doca flow BTH header in match data More...
 
struct  doca_flow_header_l4_port
 doca flow tcp or udp port header in match data More...
 
struct  doca_flow_header_udp
 doca flow udp header in match data More...
 
struct  doca_flow_header_roce_v2
 doca flow ROCEv2 header in match data More...
 
struct  doca_flow_header_tcp
 doca flow tcp header in match data More...
 
struct  doca_flow_header_icmp
 doca flow icmp header in match data More...
 
struct  doca_flow_header_ip4
 doca flow ipv4 header in match data More...
 
struct  doca_flow_header_ip6
 doca flow ipv6 header in match data More...
 
struct  doca_flow_ct_ip4
 
struct  doca_flow_ct_ip6
 
struct  doca_flow_header_mpls
 doca flow MPLS header. More...
 
struct  doca_flow_header_geneve
 doca flow GENEVE header. More...
 
union  doca_flow_geneve_option
 doca flow GENEVE option single DW. More...
 
struct  doca_flow_header_psp
 doca flow psp header in match data and modify/encap actions More...
 
struct  doca_flow_tun
 doca flow tunnel information More...
 

Macros

#define DOCA_FLOW_ETHER_ADDR_LEN   (6)
 
#define DOCA_FLOW_PROTO_ICMP   (1)
 
#define DOCA_FLOW_PROTO_ICMP6   (58)
 
#define DOCA_FLOW_PROTO_IPV4   (4)
 
#define DOCA_FLOW_PROTO_IPV6   (41)
 
#define DOCA_FLOW_PROTO_TCP   (6)
 
#define DOCA_FLOW_PROTO_UDP   (17)
 
#define DOCA_FLOW_PROTO_IB_BTH   (16)
 
#define DOCA_FLOW_PROTO_GRE   (47)
 
#define DOCA_FLOW_PROTO_ESP   (50)
 
#define DOCA_FLOW_PROTO_IP4_IN_IP   (4)
 
#define DOCA_FLOW_PROTO_IP6_IN_IP   (41)
 
#define DOCA_FLOW_GTPU_DEFAULT_PORT   (2152)
 
#define DOCA_FLOW_VXLAN_DEFAULT_PORT   (4789)
 
#define DOCA_FLOW_VXLAN_GPE_DEFAULT_PORT   (4790)
 
#define DOCA_FLOW_MPLS_DEFAULT_PORT   (6635)
 
#define DOCA_FLOW_GENEVE_DEFAULT_PORT   (6081)
 
#define DOCA_FLOW_PSP_DEFAULT_PORT   (1000)
 
#define DOCA_FLOW_ROCEV2_DEFAULT_PORT   (4791)
 
#define DOCA_FLOW_ETHER_TYPE_IPV4   (0x0800)
 
#define DOCA_FLOW_ETHER_TYPE_IPV6   (0x86DD)
 
#define DOCA_FLOW_ETHER_TYPE_TEB   (0x6558)
 
#define DOCA_FLOW_ETHER_TYPE_ARP   (0x0806)
 
#define DOCA_FLOW_ETHER_TYPE_VLAN   (0x8100)
 
#define DOCA_FLOW_ETHER_TYPE_QINQ   (0x88A8)
 
#define DOCA_FLOW_UDP_HEADER_LEN   8
 
#define DOCA_FLOW_ESP_HEADER_LEN   (4 * sizeof(doca_be32_t))
 
#define DOCA_FLOW_ESP_HEADER_MARKER_LEN_4B   4
 
#define DOCA_FLOW_ESP_HEADER_MARKER_LEN_8B   8
 
#define DOCA_FLOW_CRYPTO_KEY_LEN_MAX   32
 
#define DOCA_FLOW_GENEVE_OPT_LEN_MAX   63
 
#define DOCA_FLOW_ENCAP_GENEVE_OPT_LEN_MAX   19
 
#define DOCA_FLOW_GENEVE_DATA_OPTION_LEN_MAX   31
 
#define DOCA_FLOW_GENEVE_NUM_OF_OPTIONS_MAX   8
 
#define DOCA_FLOW_MPLS_LABELS_MAX   5
 
#define DOCA_FLOW_PSP_HEADER_LEN   (6 * sizeof(doca_be32_t))
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_IPV4   1
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_IPV6   2
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_ETH   3
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_NSH   4
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_MPLS   5
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_GBP   6
 
#define DOCA_FLOW_VXLAN_GPE_TYPE_VBNG   7
 
#define DOCA_FLOW_GTP_EXT_PSC   (0x85)
 
#define DOCA_FLOW_IB_BTH_DST_QP_LEN   3
 
#define DOCA_FLOW_IB_BTH_PSN_LEN   3
 
#define DOCA_FLOW_CRYPTO_HEADER_LEN_MAX
 

Enumerations

enum  doca_flow_l3_type { DOCA_FLOW_L3_TYPE_NONE = 0 , DOCA_FLOW_L3_TYPE_IP4 , DOCA_FLOW_L3_TYPE_IP6 }
 doca flow layer 3 packet type More...
 
enum  doca_flow_l4_type_ext {
  DOCA_FLOW_L4_TYPE_EXT_NONE = 0 , DOCA_FLOW_L4_TYPE_EXT_TCP , DOCA_FLOW_L4_TYPE_EXT_UDP , DOCA_FLOW_L4_TYPE_EXT_ICMP ,
  DOCA_FLOW_L4_TYPE_EXT_ICMP6 , DOCA_FLOW_L4_TYPE_EXT_TRANSPORT , DOCA_FLOW_L4_TYPE_EXT_ROCE_V2
}
 doca flow layer 4 packet extend type More...
 
enum  doca_flow_ip_fragment_flags { DOCA_FLOW_IP4_FLAG_MORE_FRAGMENTS = (1 << 13) , DOCA_FLOW_IP4_FLAG_DONT_FRAGMENT = (1 << 14) }
 doca flow IP fragment flags More...
 
enum  doca_flow_tun_type {
  DOCA_FLOW_TUN_NONE = 0 , DOCA_FLOW_TUN_VXLAN , DOCA_FLOW_TUN_GTPU , DOCA_FLOW_TUN_GRE ,
  DOCA_FLOW_TUN_ESP , DOCA_FLOW_TUN_MPLS_O_UDP , DOCA_FLOW_TUN_GENEVE , DOCA_FLOW_TUN_PSP ,
  DOCA_FLOW_TUN_IP_IN_IP , DOCA_FLOW_TUN_MAX
}
 doca flow tunnel type More...
 
enum  doca_flow_tun_ext_vxlan_type { DOCA_FLOW_TUN_EXT_VXLAN_STANDARD = 0 , DOCA_FLOW_TUN_EXT_VXLAN_GPE , DOCA_FLOW_TUN_EXT_VXLAN_GBP }
 doca flow tunnel extension vxlan type More...
 
enum  doca_flow_tun_ext_gre_type { DOCA_FLOW_TUN_EXT_GRE_STANDARD = 0 , DOCA_FLOW_TUN_EXT_GRE_NVGRE }
 doca flow tun extension gre type More...
 

Detailed Description

DOCA HW offload flow net structure define. For more details please refer to the user guide on DOCA devzone.

Macro Definition Documentation

◆ DOCA_FLOW_CRYPTO_HEADER_LEN_MAX

#define DOCA_FLOW_CRYPTO_HEADER_LEN_MAX
Value:
(DOCA_FLOW_ETHER_ADDR_LEN * 2 + sizeof(doca_be16_t) + sizeof(doca_be16_t) * 2 * 2 + sizeof(doca_be32_t) * 15 + \
#define DOCA_FLOW_PSP_HEADER_LEN
Definition: doca_flow_net.h:95
#define DOCA_FLOW_ETHER_ADDR_LEN
Definition: doca_flow_net.h:36
uint32_t doca_be32_t
Definition: doca_types.h:121
uint16_t doca_be16_t
Declare DOCA endianity types.
Definition: doca_types.h:120

Crypto tunnel header may consist of:

  • Ethernet addresses
  • Ethernet type
  • optional VLAN and 802.1Q headers
  • IPv4 (with full options) or IPv6 (w/o options)
  • optional UDP header
  • PSP (or other crypto protocol) header

Definition at line 121 of file doca_flow_net.h.

◆ DOCA_FLOW_CRYPTO_KEY_LEN_MAX

#define DOCA_FLOW_CRYPTO_KEY_LEN_MAX   32

Crypto key maximal length in bytes

Definition at line 77 of file doca_flow_net.h.

◆ DOCA_FLOW_ENCAP_GENEVE_OPT_LEN_MAX

#define DOCA_FLOW_ENCAP_GENEVE_OPT_LEN_MAX   19

Max GENEVE options length in single encap data (in 4 bytes granularity). Encap total size is 128

Definition at line 83 of file doca_flow_net.h.

◆ DOCA_FLOW_ESP_HEADER_LEN

#define DOCA_FLOW_ESP_HEADER_LEN   (4 * sizeof(doca_be32_t))

IPsec ESP header maximal length in bytes

Definition at line 68 of file doca_flow_net.h.

◆ DOCA_FLOW_ESP_HEADER_MARKER_LEN_4B

#define DOCA_FLOW_ESP_HEADER_MARKER_LEN_4B   4

IPsec ESP marker header length 4 bytes

Definition at line 71 of file doca_flow_net.h.

◆ DOCA_FLOW_ESP_HEADER_MARKER_LEN_8B

#define DOCA_FLOW_ESP_HEADER_MARKER_LEN_8B   8

IPsec ESP marker header length 8 bytes

Definition at line 74 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_ADDR_LEN

#define DOCA_FLOW_ETHER_ADDR_LEN   (6)

length of ether add length.

Definition at line 36 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_ARP

#define DOCA_FLOW_ETHER_TYPE_ARP   (0x0806)

ARP Protocl

Definition at line 60 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_IPV4

#define DOCA_FLOW_ETHER_TYPE_IPV4   (0x0800)

Ethernet frame types IPv4 Protocol.

Definition at line 57 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_IPV6

#define DOCA_FLOW_ETHER_TYPE_IPV6   (0x86DD)

IPv6 Protocol.

Definition at line 58 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_QINQ

#define DOCA_FLOW_ETHER_TYPE_QINQ   (0x88A8)

Multiple VLAN tags Protocol.

Definition at line 62 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_TEB

#define DOCA_FLOW_ETHER_TYPE_TEB   (0x6558)

Transparent Ethernet Bridging.

Definition at line 59 of file doca_flow_net.h.

◆ DOCA_FLOW_ETHER_TYPE_VLAN

#define DOCA_FLOW_ETHER_TYPE_VLAN   (0x8100)

Single VLAN tag Protocol.

Definition at line 61 of file doca_flow_net.h.

◆ DOCA_FLOW_GENEVE_DATA_OPTION_LEN_MAX

#define DOCA_FLOW_GENEVE_DATA_OPTION_LEN_MAX   31

Max data length in single GENEVE option (in 4 bytes granularity).

Definition at line 86 of file doca_flow_net.h.

◆ DOCA_FLOW_GENEVE_DEFAULT_PORT

#define DOCA_FLOW_GENEVE_DEFAULT_PORT   (6081)

default GENEVE port id.

Definition at line 52 of file doca_flow_net.h.

◆ DOCA_FLOW_GENEVE_NUM_OF_OPTIONS_MAX

#define DOCA_FLOW_GENEVE_NUM_OF_OPTIONS_MAX   8

Upper bound for GENEVE TLV options number.

Definition at line 89 of file doca_flow_net.h.

◆ DOCA_FLOW_GENEVE_OPT_LEN_MAX

#define DOCA_FLOW_GENEVE_OPT_LEN_MAX   63

Max GENEVE options length in single packet (in 4 bytes granularity).

Definition at line 80 of file doca_flow_net.h.

◆ DOCA_FLOW_GTP_EXT_PSC

#define DOCA_FLOW_GTP_EXT_PSC   (0x85)

GTP next extension type definitions. GTP PSC extension

Definition at line 107 of file doca_flow_net.h.

◆ DOCA_FLOW_GTPU_DEFAULT_PORT

#define DOCA_FLOW_GTPU_DEFAULT_PORT   (2152)

gtpu upd port id.

Definition at line 48 of file doca_flow_net.h.

◆ DOCA_FLOW_IB_BTH_DST_QP_LEN

#define DOCA_FLOW_IB_BTH_DST_QP_LEN   3

bth destination queue pair length in bytes

Definition at line 109 of file doca_flow_net.h.

◆ DOCA_FLOW_IB_BTH_PSN_LEN

#define DOCA_FLOW_IB_BTH_PSN_LEN   3

bth PSN length in bytes

Definition at line 110 of file doca_flow_net.h.

◆ DOCA_FLOW_MPLS_DEFAULT_PORT

#define DOCA_FLOW_MPLS_DEFAULT_PORT   (6635)

default MPLS port id.

Definition at line 51 of file doca_flow_net.h.

◆ DOCA_FLOW_MPLS_LABELS_MAX

#define DOCA_FLOW_MPLS_LABELS_MAX   5

Max MPLS labels in single match.

Definition at line 92 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_ESP

#define DOCA_FLOW_PROTO_ESP   (50)

Encapsulated Security Payload Protocol.

Definition at line 45 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_GRE

#define DOCA_FLOW_PROTO_GRE   (47)

Cisco GRE tunnels (rfc 1701,1702).

Definition at line 44 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_IB_BTH

#define DOCA_FLOW_PROTO_IB_BTH   (16)

Base Transport Header Protocol

Definition at line 43 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_ICMP

#define DOCA_FLOW_PROTO_ICMP   (1)

Internet Control Message Protocol v4.

Definition at line 37 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_ICMP6

#define DOCA_FLOW_PROTO_ICMP6   (58)

Internet Control Message Protocol v6.

Definition at line 38 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_IP4_IN_IP

#define DOCA_FLOW_PROTO_IP4_IN_IP   (4)

IPv4 encapsulated by IPv4/6.

Definition at line 46 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_IP6_IN_IP

#define DOCA_FLOW_PROTO_IP6_IN_IP   (41)

IPv6 encapsulated by IPv4/6.

Definition at line 47 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_IPV4

#define DOCA_FLOW_PROTO_IPV4   (4)

Internet Protocol v4.

Definition at line 39 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_IPV6

#define DOCA_FLOW_PROTO_IPV6   (41)

Internet Protocol v6.

Definition at line 40 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_TCP

#define DOCA_FLOW_PROTO_TCP   (6)

Transmission Control Protocol.

Definition at line 41 of file doca_flow_net.h.

◆ DOCA_FLOW_PROTO_UDP

#define DOCA_FLOW_PROTO_UDP   (17)

User Datagram Protocol.

Definition at line 42 of file doca_flow_net.h.

◆ DOCA_FLOW_PSP_DEFAULT_PORT

#define DOCA_FLOW_PSP_DEFAULT_PORT   (1000)

default PSP port id.

Definition at line 53 of file doca_flow_net.h.

◆ DOCA_FLOW_PSP_HEADER_LEN

#define DOCA_FLOW_PSP_HEADER_LEN   (6 * sizeof(doca_be32_t))

PSP header maximal length in bytes

Definition at line 95 of file doca_flow_net.h.

◆ DOCA_FLOW_ROCEV2_DEFAULT_PORT

#define DOCA_FLOW_ROCEV2_DEFAULT_PORT   (4791)

default ROCEV2 port id.

Definition at line 54 of file doca_flow_net.h.

◆ DOCA_FLOW_UDP_HEADER_LEN

#define DOCA_FLOW_UDP_HEADER_LEN   8

UDP header length in bytes

Definition at line 65 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_DEFAULT_PORT

#define DOCA_FLOW_VXLAN_DEFAULT_PORT   (4789)

default vxlan port id.

Definition at line 49 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_DEFAULT_PORT

#define DOCA_FLOW_VXLAN_GPE_DEFAULT_PORT   (4790)

default vxlan-gpe port id.

Definition at line 50 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_ETH

#define DOCA_FLOW_VXLAN_GPE_TYPE_ETH   3

Ethernet Protocol.

Definition at line 100 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_GBP

#define DOCA_FLOW_VXLAN_GPE_TYPE_GBP   6

GBP Protocol.

Definition at line 103 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_IPV4

#define DOCA_FLOW_VXLAN_GPE_TYPE_IPV4   1

VXLAN GPE next protocol definition IPv4 Protocol.

Definition at line 98 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_IPV6

#define DOCA_FLOW_VXLAN_GPE_TYPE_IPV6   2

IPv6 Protocol.

Definition at line 99 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_MPLS

#define DOCA_FLOW_VXLAN_GPE_TYPE_MPLS   5

MPLS Protocol.

Definition at line 102 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_NSH

#define DOCA_FLOW_VXLAN_GPE_TYPE_NSH   4

NSH Protocol.

Definition at line 101 of file doca_flow_net.h.

◆ DOCA_FLOW_VXLAN_GPE_TYPE_VBNG

#define DOCA_FLOW_VXLAN_GPE_TYPE_VBNG   7

vBNG Protocol.

Definition at line 104 of file doca_flow_net.h.

Enumeration Type Documentation

◆ doca_flow_ip_fragment_flags

doca flow IP fragment flags

Those flags are used in 'flags_fragment_offset' ip4 field.

Enumerator
DOCA_FLOW_IP4_FLAG_MORE_FRAGMENTS 

Ipv4 More Fragments (MF) flag

DOCA_FLOW_IP4_FLAG_DONT_FRAGMENT 

Ipv4 Don't Fragment (DF) flag

Definition at line 272 of file doca_flow_net.h.

◆ doca_flow_l3_type

doca flow layer 3 packet type

Enumerator
DOCA_FLOW_L3_TYPE_NONE 

l3 type is not set

DOCA_FLOW_L3_TYPE_IP4 

l3 type is ipv4

DOCA_FLOW_L3_TYPE_IP6 

l3 type is ipv6

Definition at line 136 of file doca_flow_net.h.

◆ doca_flow_l4_type_ext

doca flow layer 4 packet extend type

Enumerator
DOCA_FLOW_L4_TYPE_EXT_NONE 

l4 ext type is not set

DOCA_FLOW_L4_TYPE_EXT_TCP 

l4 ext type is tcp

DOCA_FLOW_L4_TYPE_EXT_UDP 

l4 ext type is udp

DOCA_FLOW_L4_TYPE_EXT_ICMP 

l4 ext type is icmp

DOCA_FLOW_L4_TYPE_EXT_ICMP6 

l4 ext type is icmp6

DOCA_FLOW_L4_TYPE_EXT_TRANSPORT 

l4 ext type is transport

DOCA_FLOW_L4_TYPE_EXT_ROCE_V2 

l4 ext type is rocev2

Definition at line 174 of file doca_flow_net.h.

◆ doca_flow_tun_ext_gre_type

doca flow tun extension gre type

Enumerator
DOCA_FLOW_TUN_EXT_GRE_STANDARD 

GRE tunnel extension is STANDARD

DOCA_FLOW_TUN_EXT_GRE_NVGRE 

GRE tunnel extension is NVGRE

Definition at line 460 of file doca_flow_net.h.

◆ doca_flow_tun_ext_vxlan_type

doca flow tunnel extension vxlan type

Enumerator
DOCA_FLOW_TUN_EXT_VXLAN_STANDARD 

Vxlan tunnel extension is Standard

DOCA_FLOW_TUN_EXT_VXLAN_GPE 

Vxlan tunnel extension is GPE type

DOCA_FLOW_TUN_EXT_VXLAN_GBP 

Vxlan tunnel extension is GBP type

Definition at line 448 of file doca_flow_net.h.

◆ doca_flow_tun_type

doca flow tunnel type

Enumerator
DOCA_FLOW_TUN_NONE 

tunnel is not set

DOCA_FLOW_TUN_VXLAN 

tunnel is vxlan type

DOCA_FLOW_TUN_GTPU 

tunnel is gtpu type

DOCA_FLOW_TUN_GRE 

tunnel is gre type

DOCA_FLOW_TUN_ESP 

tunnel is ipsec esp type

DOCA_FLOW_TUN_MPLS_O_UDP 

tunnel is mpls over udp type

DOCA_FLOW_TUN_GENEVE 

tunnel is geneve type

DOCA_FLOW_TUN_PSP 

tunnel is psp type

DOCA_FLOW_TUN_IP_IN_IP 

tunnel is IPv4-in-IP or IPv6-in-IP type

DOCA_FLOW_TUN_MAX 

end of tunnel type list

Definition at line 422 of file doca_flow_net.h.