DPDK  19.11.10
Data Structures | Macros | Enumerations
rte_eth_ctrl.h File Reference
#include <stdint.h>
#include <rte_common.h>
#include <rte_ether.h>
#include "rte_flow.h"
#include "rte_ethdev.h"

Go to the source code of this file.

Data Structures

struct  rte_eth_mac_filter
 
struct  rte_eth_ethertype_filter
 
struct  rte_eth_flex_filter
 
struct  rte_eth_syn_filter
 
struct  rte_eth_ntuple_filter
 
struct  rte_eth_tunnel_filter_conf
 
struct  rte_eth_global_cfg
 
struct  rte_eth_input_set_conf
 
struct  rte_eth_l2_flow
 
struct  rte_eth_ipv4_flow
 
struct  rte_eth_udpv4_flow
 
struct  rte_eth_tcpv4_flow
 
struct  rte_eth_sctpv4_flow
 
struct  rte_eth_ipv6_flow
 
struct  rte_eth_udpv6_flow
 
struct  rte_eth_tcpv6_flow
 
struct  rte_eth_sctpv6_flow
 
struct  rte_eth_mac_vlan_flow
 
struct  rte_eth_tunnel_flow
 
union  rte_eth_fdir_flow
 
struct  rte_eth_fdir_flow_ext
 
struct  rte_eth_fdir_input
 
struct  rte_eth_fdir_action
 
struct  rte_eth_fdir_filter
 
struct  rte_eth_fdir_masks
 
struct  rte_eth_flex_payload_cfg
 
struct  rte_eth_fdir_flex_mask
 
struct  rte_eth_fdir_flex_conf
 
struct  rte_eth_fdir_info
 
struct  rte_eth_fdir_stats
 
struct  rte_eth_fdir_filter_info
 
struct  rte_eth_hash_global_conf
 
struct  rte_eth_hash_filter_info
 
struct  rte_eth_l2_tunnel_conf
 

Macros

#define RTE_ETHTYPE_FLAGS_MAC   0x0001
 
#define RTE_ETHTYPE_FLAGS_DROP   0x0002
 
#define RTE_FLEX_FILTER_MAXLEN   128
 
#define RTE_FLEX_FILTER_MASK_SIZE   (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT)
 
#define RTE_NTUPLE_FLAGS_DST_IP   0x0001
 
#define RTE_NTUPLE_FLAGS_SRC_IP   0x0002
 
#define RTE_NTUPLE_FLAGS_DST_PORT   0x0004
 
#define RTE_NTUPLE_FLAGS_SRC_PORT   0x0008
 
#define RTE_NTUPLE_FLAGS_PROTO   0x0010
 
#define RTE_NTUPLE_FLAGS_TCP_FLAG   0x0020
 
#define RTE_NTUPLE_TCP_FLAGS_MASK   0x3F
 
#define ETH_TUNNEL_FILTER_OMAC   0x01
 
#define ETH_TUNNEL_FILTER_OIP   0x02
 
#define ETH_TUNNEL_FILTER_TENID   0x04
 
#define ETH_TUNNEL_FILTER_IMAC   0x08
 
#define ETH_TUNNEL_FILTER_IVLAN   0x10
 
#define ETH_TUNNEL_FILTER_IIP   0x20
 
#define RTE_ETH_FDIR_MAX_FLEXLEN   16
 
#define RTE_ETH_INSET_SIZE_MAX   128
 

Enumerations

enum  rte_filter_type
 
enum  rte_filter_op {
  RTE_ETH_FILTER_NOP = 0, RTE_ETH_FILTER_ADD, RTE_ETH_FILTER_UPDATE, RTE_ETH_FILTER_DELETE,
  RTE_ETH_FILTER_FLUSH, RTE_ETH_FILTER_GET, RTE_ETH_FILTER_SET, RTE_ETH_FILTER_INFO,
  RTE_ETH_FILTER_STATS
}
 
enum  rte_mac_filter_type { RTE_MAC_PERFECT_MATCH = 1, RTE_MACVLAN_PERFECT_MATCH, RTE_MAC_HASH_MATCH, RTE_MACVLAN_HASH_MATCH }
 
enum  rte_tunnel_iptype { RTE_TUNNEL_IPTYPE_IPV4 = 0, RTE_TUNNEL_IPTYPE_IPV6 }
 
enum  rte_eth_global_cfg_type
 
enum  rte_eth_input_set_field
 
enum  rte_filter_input_set_op { , RTE_ETH_INPUT_SET_SELECT, RTE_ETH_INPUT_SET_ADD }
 
enum  rte_eth_fdir_tunnel_type
 
enum  rte_eth_fdir_behavior
 
enum  rte_eth_fdir_status { RTE_ETH_FDIR_NO_REPORT_STATUS = 0, RTE_ETH_FDIR_REPORT_ID, RTE_ETH_FDIR_REPORT_ID_FLEX_4, RTE_ETH_FDIR_REPORT_FLEX_8 }
 
enum  rte_eth_payload_type
 
enum  rte_fdir_mode {
  RTE_FDIR_MODE_NONE = 0, RTE_FDIR_MODE_SIGNATURE, RTE_FDIR_MODE_PERFECT, RTE_FDIR_MODE_PERFECT_MAC_VLAN,
  RTE_FDIR_MODE_PERFECT_TUNNEL
}
 
enum  rte_eth_fdir_filter_info_type { , RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT }
 
enum  rte_eth_hash_filter_info_type { , RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT, RTE_ETH_HASH_FILTER_GLOBAL_CONFIG, RTE_ETH_HASH_FILTER_INPUT_SET_SELECT }
 

Detailed Description

Deprecated:

Please use rte_flow API instead of this legacy one.

Ethernet device features and related data structures used by control APIs should be defined in this file.

Definition in file rte_eth_ctrl.h.

Macro Definition Documentation

◆ RTE_ETHTYPE_FLAGS_MAC

#define RTE_ETHTYPE_FLAGS_MAC   0x0001

Define all structures for Ethertype Filter type.If set, compare mac

Definition at line 86 of file rte_eth_ctrl.h.

◆ RTE_ETHTYPE_FLAGS_DROP

#define RTE_ETHTYPE_FLAGS_DROP   0x0002

If set, drop packet when match

Definition at line 87 of file rte_eth_ctrl.h.

◆ RTE_FLEX_FILTER_MAXLEN

#define RTE_FLEX_FILTER_MAXLEN   128

bytes to use in flex filter.

Definition at line 101 of file rte_eth_ctrl.h.

◆ RTE_FLEX_FILTER_MASK_SIZE

#define RTE_FLEX_FILTER_MASK_SIZE   (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT)

mask bytes in flex filter.

Definition at line 102 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_DST_IP

#define RTE_NTUPLE_FLAGS_DST_IP   0x0001

Define all structures for ntuple Filter type.If set, dst_ip is part of ntuple

Definition at line 135 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_SRC_IP

#define RTE_NTUPLE_FLAGS_SRC_IP   0x0002

If set, src_ip is part of ntuple

Definition at line 136 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_DST_PORT

#define RTE_NTUPLE_FLAGS_DST_PORT   0x0004

If set, dst_port is part of ntuple

Definition at line 137 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_SRC_PORT

#define RTE_NTUPLE_FLAGS_SRC_PORT   0x0008

If set, src_port is part of ntuple

Definition at line 138 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_PROTO

#define RTE_NTUPLE_FLAGS_PROTO   0x0010

If set, protocol is part of ntuple

Definition at line 139 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_FLAGS_TCP_FLAG

#define RTE_NTUPLE_FLAGS_TCP_FLAG   0x0020

If set, tcp flag is involved

Definition at line 140 of file rte_eth_ctrl.h.

◆ RTE_NTUPLE_TCP_FLAGS_MASK

#define RTE_NTUPLE_TCP_FLAGS_MASK   0x3F

TCP flags filter can match.

Definition at line 153 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_OMAC

#define ETH_TUNNEL_FILTER_OMAC   0x01

filter type of tunneling packetfilter by outer MAC addr

Definition at line 184 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_OIP

#define ETH_TUNNEL_FILTER_OIP   0x02

filter by outer IP Addr

Definition at line 185 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_TENID

#define ETH_TUNNEL_FILTER_TENID   0x04

filter by tenant ID

Definition at line 186 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_IMAC

#define ETH_TUNNEL_FILTER_IMAC   0x08

filter by inner MAC addr

Definition at line 187 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_IVLAN

#define ETH_TUNNEL_FILTER_IVLAN   0x10

filter by inner VLAN ID

Definition at line 188 of file rte_eth_ctrl.h.

◆ ETH_TUNNEL_FILTER_IIP

#define ETH_TUNNEL_FILTER_IIP   0x20

filter by inner IP addr

Definition at line 189 of file rte_eth_ctrl.h.

◆ RTE_ETH_FDIR_MAX_FLEXLEN

#define RTE_ETH_FDIR_MAX_FLEXLEN   16

Max length of flexbytes.

Definition at line 252 of file rte_eth_ctrl.h.

◆ RTE_ETH_INSET_SIZE_MAX

#define RTE_ETH_INSET_SIZE_MAX   128

Max length of input set.

Definition at line 253 of file rte_eth_ctrl.h.

Enumeration Type Documentation

◆ rte_filter_type

Feature filter types

Definition at line 29 of file rte_eth_ctrl.h.

◆ rte_filter_op

Generic operations on filters

Enumerator
RTE_ETH_FILTER_NOP 

used to check whether the type filter is supported

RTE_ETH_FILTER_ADD 

add filter entry

RTE_ETH_FILTER_UPDATE 

update filter entry

RTE_ETH_FILTER_DELETE 

delete filter entry

RTE_ETH_FILTER_FLUSH 

flush all entries

RTE_ETH_FILTER_GET 

get filter entry

RTE_ETH_FILTER_SET 

configurations

RTE_ETH_FILTER_INFO 

retrieve information

RTE_ETH_FILTER_STATS 

retrieve statistics

Definition at line 47 of file rte_eth_ctrl.h.

◆ rte_mac_filter_type

MAC filter type

Enumerator
RTE_MAC_PERFECT_MATCH 

exact match of MAC addr.

RTE_MACVLAN_PERFECT_MATCH 

exact match of MAC addr and VLAN ID.

RTE_MAC_HASH_MATCH 

hash match of MAC addr.

RTE_MACVLAN_HASH_MATCH 

hash match of MAC addr and exact match of VLAN ID.

Definition at line 64 of file rte_eth_ctrl.h.

◆ rte_tunnel_iptype

Select IPv4 or IPv6 for tunnel filters.

Enumerator
RTE_TUNNEL_IPTYPE_IPV4 

IPv4.

RTE_TUNNEL_IPTYPE_IPV6 

IPv6.

Definition at line 205 of file rte_eth_ctrl.h.

◆ rte_eth_global_cfg_type

Global eth device configuration type.

Definition at line 235 of file rte_eth_ctrl.h.

◆ rte_eth_input_set_field

Input set fields for Flow Director and Hash filters

Definition at line 258 of file rte_eth_ctrl.h.

◆ rte_filter_input_set_op

Filters input set operations

Enumerator
RTE_ETH_INPUT_SET_SELECT 

select input set

RTE_ETH_INPUT_SET_ADD 

add input set entry

Definition at line 314 of file rte_eth_ctrl.h.

◆ rte_eth_fdir_tunnel_type

Tunnel type for flow director.

Definition at line 428 of file rte_eth_ctrl.h.

◆ rte_eth_fdir_behavior

Behavior will be taken if FDIR match

Definition at line 488 of file rte_eth_ctrl.h.

◆ rte_eth_fdir_status

Flow director report status It defines what will be reported if FDIR entry is matched.

Enumerator
RTE_ETH_FDIR_NO_REPORT_STATUS 

Report nothing.

RTE_ETH_FDIR_REPORT_ID 

Only report FD ID.

RTE_ETH_FDIR_REPORT_ID_FLEX_4 

Report FD ID and 4 flex bytes.

RTE_ETH_FDIR_REPORT_FLEX_8 

Report 8 flex bytes.

Definition at line 498 of file rte_eth_ctrl.h.

◆ rte_eth_payload_type

Payload type

Definition at line 556 of file rte_eth_ctrl.h.

◆ rte_fdir_mode

Flow Director setting modes: none, signature or perfect.

Enumerator
RTE_FDIR_MODE_NONE 

Disable FDIR support.

RTE_FDIR_MODE_SIGNATURE 

Enable FDIR signature filter mode.

RTE_FDIR_MODE_PERFECT 

Enable FDIR perfect filter mode.

RTE_FDIR_MODE_PERFECT_MAC_VLAN 

Enable FDIR filter mode - MAC VLAN.

RTE_FDIR_MODE_PERFECT_TUNNEL 

Enable FDIR filter mode - tunnel.

Definition at line 604 of file rte_eth_ctrl.h.

◆ rte_eth_fdir_filter_info_type

Flow Director filter information types.

Enumerator
RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT 

Flow Director filter input set configuration

Definition at line 672 of file rte_eth_ctrl.h.

◆ rte_eth_hash_filter_info_type

Hash filter information types.

  • RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT is for getting/setting the information/configuration of 'symmetric hash enable' per port.
  • RTE_ETH_HASH_FILTER_GLOBAL_CONFIG is for getting/setting the global configurations of hash filters. Those global configurations are valid for all ports of the same NIC.
  • RTE_ETH_HASH_FILTER_INPUT_SET_SELECT is for setting the global hash input set fields
Enumerator
RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT 

Symmetric hash enable per port

RTE_ETH_HASH_FILTER_GLOBAL_CONFIG 

Configure globally for hash filter

RTE_ETH_HASH_FILTER_INPUT_SET_SELECT 

Global Hash filter input set configuration

Definition at line 702 of file rte_eth_ctrl.h.