FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
flow.c File Reference
+ Include dependency graph for flow.c:

Go to the source code of this file.

Macros

#define FLOW_IS_ETHERNET_CLASS(f)   (f->type == VNET_FLOW_TYPE_ETHERNET)
 
#define FLOW_IS_IPV4_CLASS(f)
 
#define FLOW_IS_IPV6_CLASS(f)
 
#define FLOW_HAS_VLAN_TAG(f)
 
#define FLOW_IS_L3_TYPE(f)
 
#define FLOW_IS_L4_TYPE(f)
 
#define FLOW_IS_L4_TUNNEL_TYPE(f)
 
#define BIT_IS_SET(v, b)   ((v) & (u64)1<<(b))
 

Functions

static bool mac_address_is_all_zero (const u8 addr[6])
 
static void dpdk_flow_convert_rss_types (u64 type, u64 *dpdk_rss_type)
 
static enum rte_eth_hash_function dpdk_flow_convert_rss_func (vnet_rss_function_t func)
 
static int dpdk_flow_add (dpdk_device_t *xd, vnet_flow_t *f, dpdk_flow_entry_t *fe)
 
int dpdk_flow_ops_fn (vnet_main_t *vnm, vnet_flow_dev_op_t op, u32 dev_instance, u32 flow_index, uword *private_data)
 
u8format_dpdk_flow (u8 *s, va_list *args)
 

Variables

static const struct rte_flow_attr ingress = {.ingress = 1 }
 

Macro Definition Documentation

◆ BIT_IS_SET

#define BIT_IS_SET (   v,
  b 
)    ((v) & (u64)1<<(b))

◆ FLOW_HAS_VLAN_TAG

#define FLOW_HAS_VLAN_TAG (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED) || \
(f->type == VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED))

Definition at line 50 of file flow.c.

◆ FLOW_IS_ETHERNET_CLASS

#define FLOW_IS_ETHERNET_CLASS (   f)    (f->type == VNET_FLOW_TYPE_ETHERNET)

Definition at line 29 of file flow.c.

◆ FLOW_IS_IPV4_CLASS

#define FLOW_IS_IPV4_CLASS (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP4) || \
(f->type == VNET_FLOW_TYPE_IP4_N_TUPLE) || \
(f->type == VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED) || \
(f->type == VNET_FLOW_TYPE_IP4_VXLAN) || \
(f->type == VNET_FLOW_TYPE_IP4_GTPC) || \
(f->type == VNET_FLOW_TYPE_IP4_GTPU) || \
(f->type == VNET_FLOW_TYPE_IP4_L2TPV3OIP) || \
(f->type == VNET_FLOW_TYPE_IP4_IPSEC_ESP) || \
(f->type == VNET_FLOW_TYPE_IP4_IPSEC_AH))

Definition at line 32 of file flow.c.

◆ FLOW_IS_IPV6_CLASS

#define FLOW_IS_IPV6_CLASS (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP6) || \
(f->type == VNET_FLOW_TYPE_IP6_N_TUPLE) || \
(f->type == VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED) || \
(f->type == VNET_FLOW_TYPE_IP6_VXLAN))

Definition at line 43 of file flow.c.

◆ FLOW_IS_L3_TYPE

#define FLOW_IS_L3_TYPE (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP4) || \
(f->type == VNET_FLOW_TYPE_IP6))

Definition at line 55 of file flow.c.

◆ FLOW_IS_L4_TUNNEL_TYPE

#define FLOW_IS_L4_TUNNEL_TYPE (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP4_VXLAN) || \
(f->type == VNET_FLOW_TYPE_IP6_VXLAN) || \
(f->type == VNET_FLOW_TYPE_IP4_GTPC) || \
(f->type == VNET_FLOW_TYPE_IP4_GTPU))

Definition at line 67 of file flow.c.

◆ FLOW_IS_L4_TYPE

#define FLOW_IS_L4_TYPE (   f)
Value:
((f->type == VNET_FLOW_TYPE_IP4_N_TUPLE) || \
(f->type == VNET_FLOW_TYPE_IP6_N_TUPLE) || \
(f->type == VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED) || \
(f->type == VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED))

Definition at line 60 of file flow.c.

Function Documentation

◆ dpdk_flow_add()

static int dpdk_flow_add ( dpdk_device_t xd,
vnet_flow_t f,
dpdk_flow_entry_t fe 
)
static

Definition at line 134 of file flow.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dpdk_flow_convert_rss_func()

static enum rte_eth_hash_function dpdk_flow_convert_rss_func ( vnet_rss_function_t  func)
inlinestatic

Definition at line 107 of file flow.c.

+ Here is the caller graph for this function:

◆ dpdk_flow_convert_rss_types()

static void dpdk_flow_convert_rss_types ( u64  type,
u64 dpdk_rss_type 
)
inlinestatic

Definition at line 89 of file flow.c.

+ Here is the caller graph for this function:

◆ dpdk_flow_ops_fn()

int dpdk_flow_ops_fn ( vnet_main_t vnm,
vnet_flow_dev_op_t  op,
u32  dev_instance,
u32  flow_index,
uword private_data 
)

Definition at line 547 of file flow.c.

+ Here is the call graph for this function:

◆ format_dpdk_flow()

u8* format_dpdk_flow ( u8 s,
va_list *  args 
)

Definition at line 680 of file flow.c.

◆ mac_address_is_all_zero()

static bool mac_address_is_all_zero ( const u8  addr[6])
inlinestatic

Definition at line 77 of file flow.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ingress

const struct rte_flow_attr ingress = {.ingress = 1 }
static

Definition at line 74 of file flow.c.

f
vlib_frame_t * f
Definition: interface_output.c:1080