FD.io VPP  v16.06
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  handoff_dispatch_main_t
 
struct  handoff_dispatch_trace_t
 

Macros

#define MAX(a, b)   ((a) < (b) ? (b) : (a))
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define VMWARE_LENGTH_BUG_WORKAROUND   0
 
#define foreach_handoff_dispatch_error   _(EXAMPLE, "example packets")
 
#define VIRL_SPEED_LIMIT()
 
#define MPLS_BOTTOM_OF_STACK_BIT_MASK   0x00000100U
 
#define MPLS_LABEL_MASK   0xFFFFF000U
 

Enumerations

enum  handoff_dispatch_error_t { HANDOFF_DISPATCH_N_ERROR }
 

Functions

static u8format_handoff_dispatch_trace (u8 *s, va_list *args)
 
static void vlib_put_handoff_queue_elt (vlib_frame_queue_elt_t *hf)
 
static uword handoff_dispatch_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_thandoff_dispatch_init (vlib_main_t *vm)
 
u32 dpdk_get_handoff_node_index (void)
 
always_inline void dpdk_rx_next_and_error_from_mb_flags_x1 (dpdk_device_t *xd, struct rte_mbuf *mb, vlib_buffer_t *b0, u8 *next0, u8 *error0)
 
void dpdk_rx_trace (dpdk_main_t *dm, vlib_node_runtime_t *node, dpdk_device_t *xd, u16 queue_id, u32 *buffers, uword n_buffers)
 
void dpdk_efd_update_counters (dpdk_device_t *xd, u32 n_buffers, u16 enabled)
 
u32 is_efd_discardable (vlib_thread_main_t *tm, vlib_buffer_t *b0, struct rte_mbuf *mb)
 
static u32 dpdk_device_input (dpdk_main_t *dm, dpdk_device_t *xd, vlib_node_runtime_t *node, u32 cpu_index, u16 queue_id)
 
static uword dpdk_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
uword dpdk_input_rss (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
void dpdk_set_next_node (dpdk_rx_next_t next, char *name)
 
vlib_frame_queue_elt_tvlib_get_handoff_queue_elt (u32 vlib_worker_index)
 
static vlib_frame_queue_elt_tdpdk_get_handoff_queue_elt (u32 vlib_worker_index, vlib_frame_queue_elt_t **handoff_queue_elt_by_worker_index)
 
static vlib_frame_queue_tis_vlib_handoff_queue_congested (u32 vlib_worker_index, u32 queue_hi_thresh, vlib_frame_queue_t **handoff_queue_by_worker_index)
 
static u64 ipv4_get_key (ip4_header_t *ip)
 
static u64 ipv6_get_key (ip6_header_t *ip)
 
static u64 mpls_get_key (mpls_unicast_header_t *m)
 
static u64 eth_get_key (ethernet_header_t *h0)
 
void dpdk_io_thread (vlib_worker_thread_t *w, u32 instances, u32 instance_id, char *worker_name, dpdk_io_thread_callback_t callback)
 
static uword dpdk_io_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
void set_efd_bitmap (u8 *bitmap, u32 value, u32 op)
 
void efd_config (u32 enabled, u32 ip_prec, u32 ip_op, u32 mpls_exp, u32 mpls_op, u32 vlan_cos, u32 vlan_op)
 

Variables

handoff_dispatch_main_t handoff_dispatch_main
 
vlib_node_registration_t handoff_dispatch_node
 (constructor) VLIB_REGISTER_NODE (handoff_dispatch_node) More...
 
static char * handoff_dispatch_error_strings []
 
static char * dpdk_error_strings []
 
vlib_node_registration_t dpdk_input_node
 (constructor) VLIB_REGISTER_NODE (dpdk_input_node) More...
 
vlib_node_registration_t dpdk_io_input_node
 (constructor) VLIB_REGISTER_NODE (dpdk_io_input_node) More...
 

Macro Definition Documentation

#define foreach_handoff_dispatch_error   _(EXAMPLE, "example packets")

Definition at line 83 of file node.c.

#define MAX (   a,
 
)    ((a) < (b) ? (b) : (a))

Definition at line 29 of file node.c.

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 33 of file node.c.

#define MPLS_BOTTOM_OF_STACK_BIT_MASK   0x00000100U

Definition at line 975 of file node.c.

#define MPLS_LABEL_MASK   0xFFFFF000U

Definition at line 976 of file node.c.

#define VIRL_SPEED_LIMIT ( )

Definition at line 774 of file node.c.

#define VMWARE_LENGTH_BUG_WORKAROUND   0

Definition at line 49 of file node.c.

Enumeration Type Documentation

Enumerator
HANDOFF_DISPATCH_N_ERROR 

Definition at line 86 of file node.c.

Function Documentation

static u32 dpdk_device_input ( dpdk_main_t dm,
dpdk_device_t xd,
vlib_node_runtime_t node,
u32  cpu_index,
u16  queue_id 
)
inlinestatic

Definition at line 487 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dpdk_efd_update_counters ( dpdk_device_t xd,
u32  n_buffers,
u16  enabled 
)

Definition at line 398 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 dpdk_get_handoff_node_index ( void  )

Definition at line 266 of file node.c.

static vlib_frame_queue_elt_t* dpdk_get_handoff_queue_elt ( u32  vlib_worker_index,
vlib_frame_queue_elt_t **  handoff_queue_elt_by_worker_index 
)
inlinestatic

Definition at line 909 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword dpdk_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)
static

Definition at line 779 of file node.c.

+ Here is the call graph for this function:

uword dpdk_input_rss ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)

Definition at line 805 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword dpdk_io_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)
static

Definition at line 1539 of file node.c.

+ Here is the call graph for this function:

void dpdk_io_thread ( vlib_worker_thread_t w,
u32  instances,
u32  instance_id,
char *  worker_name,
dpdk_io_thread_callback_t  callback 
)

Definition at line 1079 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void dpdk_rx_next_and_error_from_mb_flags_x1 ( dpdk_device_t xd,
struct rte_mbuf *  mb,
vlib_buffer_t b0,
u8 next0,
u8 error0 
)

Definition at line 278 of file node.c.

+ Here is the caller graph for this function:

void dpdk_rx_trace ( dpdk_main_t dm,
vlib_node_runtime_t node,
dpdk_device_t xd,
u16  queue_id,
u32 buffers,
uword  n_buffers 
)

Definition at line 343 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dpdk_set_next_node ( dpdk_rx_next_t  next,
char *  name 
)

Definition at line 857 of file node.c.

+ Here is the caller graph for this function:

void efd_config ( u32  enabled,
u32  ip_prec,
u32  ip_op,
u32  mpls_exp,
u32  mpls_op,
u32  vlan_cos,
u32  vlan_op 
)

Definition at line 1977 of file node.c.

+ Here is the call graph for this function:

static u64 eth_get_key ( ethernet_header_t h0)
inlinestatic

Definition at line 1035 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_handoff_dispatch_trace ( u8 s,
va_list *  args 
)
static

Definition at line 66 of file node.c.

+ Here is the call graph for this function:

clib_error_t* handoff_dispatch_init ( vlib_main_t vm)

Definition at line 254 of file node.c.

static uword handoff_dispatch_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 107 of file node.c.

+ Here is the call graph for this function:

static u64 ipv4_get_key ( ip4_header_t ip)
inlinestatic

Definition at line 952 of file node.c.

+ Here is the caller graph for this function:

static u64 ipv6_get_key ( ip6_header_t ip)
inlinestatic

Definition at line 961 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 is_efd_discardable ( vlib_thread_main_t tm,
vlib_buffer_t b0,
struct rte_mbuf *  mb 
)

Definition at line 435 of file node.c.

+ Here is the caller graph for this function:

static vlib_frame_queue_t* is_vlib_handoff_queue_congested ( u32  vlib_worker_index,
u32  queue_hi_thresh,
vlib_frame_queue_t **  handoff_queue_by_worker_index 
)
inlinestatic

Definition at line 926 of file node.c.

+ Here is the caller graph for this function:

static u64 mpls_get_key ( mpls_unicast_header_t m)
inlinestatic

Definition at line 978 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void set_efd_bitmap ( u8 bitmap,
u32  value,
u32  op 
)

Definition at line 1963 of file node.c.

+ Here is the caller graph for this function:

vlib_frame_queue_elt_t* vlib_get_handoff_queue_elt ( u32  vlib_worker_index)
inline

Definition at line 881 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vlib_put_handoff_queue_elt ( vlib_frame_queue_elt_t hf)
inlinestatic

Definition at line 100 of file node.c.

+ Here is the caller graph for this function:

Variable Documentation

char* dpdk_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_dpdk_error
Definition: dpdk.h:477

Definition at line 271 of file node.c.

vlib_node_registration_t dpdk_input_node
Initial value:
= {
.function = dpdk_input,
.name = "dpdk-input",
.state = VLIB_NODE_STATE_DISABLED,
.format_trace = format_dpdk_rx_dma_trace,
.n_errors = DPDK_N_ERROR,
.error_strings = dpdk_error_strings,
.n_next_nodes = DPDK_RX_N_NEXT,
.next_nodes = {
[DPDK_RX_NEXT_DROP] = "error-drop",
[DPDK_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
[DPDK_RX_NEXT_IP4_INPUT] = "ip4-input-no-checksum",
[DPDK_RX_NEXT_IP6_INPUT] = "ip6-input",
[DPDK_RX_NEXT_MPLS_INPUT] = "mpls-gre-input",
},
}
static char * dpdk_error_strings[]
Definition: node.c:271
format_function_t format_dpdk_rx_dma_trace
Definition: dpdk.h:599
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
Definition: format.c:70
static uword dpdk_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
Definition: node.c:779

(constructor) VLIB_REGISTER_NODE (dpdk_input_node)

Definition at line 829 of file node.c.

vlib_node_registration_t dpdk_io_input_node
Initial value:
= {
.function = dpdk_io_input,
.name = "dpdk-io-input",
.state = VLIB_NODE_STATE_DISABLED,
.format_trace = format_dpdk_rx_dma_trace,
.n_errors = DPDK_N_ERROR,
.error_strings = dpdk_error_strings,
.n_next_nodes = DPDK_RX_N_NEXT,
.next_nodes = {
[DPDK_RX_NEXT_DROP] = "error-drop",
[DPDK_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
[DPDK_RX_NEXT_IP4_INPUT] = "ip4-input-no-checksum",
[DPDK_RX_NEXT_IP6_INPUT] = "ip6-input",
[DPDK_RX_NEXT_MPLS_INPUT] = "mpls-gre-input",
},
}
static char * dpdk_error_strings[]
Definition: node.c:271
format_function_t format_dpdk_rx_dma_trace
Definition: dpdk.h:599
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
Definition: format.c:70
static uword dpdk_io_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
Definition: node.c:1539

(constructor) VLIB_REGISTER_NODE (dpdk_io_input_node)

Definition at line 1934 of file node.c.

char* handoff_dispatch_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_handoff_dispatch_error
Definition: node.c:83

Definition at line 93 of file node.c.

handoff_dispatch_main_t handoff_dispatch_main

Definition at line 79 of file node.c.

vlib_node_registration_t handoff_dispatch_node
Initial value:
= {
.name = "handoff-dispatch",
.vector_size = sizeof (u32),
.n_next_nodes = DPDK_RX_N_NEXT,
.next_nodes = {
[DPDK_RX_NEXT_DROP] = "error-drop",
[DPDK_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
[DPDK_RX_NEXT_IP4_INPUT] = "ip4-input",
[DPDK_RX_NEXT_IP6_INPUT] = "ip6-input",
[DPDK_RX_NEXT_MPLS_INPUT] = "mpls-gre-input",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u8 * format_handoff_dispatch_trace(u8 *s, va_list *args)
Definition: node.c:66
#define VLIB_NODE_FLAG_IS_HANDOFF
Definition: node.h:222
static char * handoff_dispatch_error_strings[]
Definition: node.c:93
static uword handoff_dispatch_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:107
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
u32 flags
Definition: vhost-user.h:73

(constructor) VLIB_REGISTER_NODE (handoff_dispatch_node)

Definition at line 81 of file node.c.