FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
gbp_learn_node.c File Reference
+ Include dependency graph for gbp_learn_node.c:

Go to the source code of this file.

Data Structures

struct  gbp_learn_l2_t_
 
struct  gbp_learn_l2_trace_t_
 per-packet trace data More...
 
struct  gbp_learn_l3_t_
 
struct  gbp_learn_l3_trace_t_
 per-packet trace data More...
 

Macros

#define GBP_LEARN_DBG(...)   vlib_log_debug (gbp_learn_main.gl_logger, __VA_ARGS__);
 
#define foreach_gbp_learn   _(DROP, "drop")
 

Typedefs

typedef struct gbp_learn_l2_t_ gbp_learn_l2_t
 
typedef struct gbp_learn_l2_trace_t_ gbp_learn_l2_trace_t
 per-packet trace data More...
 
typedef struct gbp_learn_l3_t_ gbp_learn_l3_t
 
typedef struct gbp_learn_l3_trace_t_ gbp_learn_l3_trace_t
 per-packet trace data More...
 

Enumerations

enum  gbp_learn_error_t { GBP_LEARN_N_ERROR }
 
enum  gbp_learn_next_t { GBP_LEARN_N_NEXT }
 

Functions

static void gbp_learn_l2_cp (const gbp_learn_l2_t *gl2)
 
static void gbp_learn_l2_ip4_dp (const u8 *mac, const ip4_address_t *ip, u32 bd_index, u32 sw_if_index, sclass_t sclass, const ip4_address_t *outer_src, const ip4_address_t *outer_dst)
 
static void gbp_learn_l2_ip6_dp (const u8 *mac, const ip6_address_t *ip, u32 bd_index, u32 sw_if_index, sclass_t sclass, const ip4_address_t *outer_src, const ip4_address_t *outer_dst)
 
static void gbp_learn_l2_dp (const u8 *mac, u32 bd_index, u32 sw_if_index, sclass_t sclass, const ip4_address_t *outer_src, const ip4_address_t *outer_dst)
 
static void gbp_learn_get_outer (const ethernet_header_t *eh0, ip4_address_t *outer_src, ip4_address_t *outer_dst)
 
VLIB_NODE_FN() gbp_learn_l2_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_gbp_learn_l2_trace (u8 *s, va_list *args)
 
static void gbp_learn_l3_cp (const gbp_learn_l3_t *gl3)
 
static void gbp_learn_ip4_dp (const ip4_address_t *ip, u32 fib_index, u32 sw_if_index, sclass_t sclass, const ip4_address_t *outer_src, const ip4_address_t *outer_dst)
 
static void gbp_learn_ip6_dp (const ip6_address_t *ip, u32 fib_index, u32 sw_if_index, sclass_t sclass, const ip4_address_t *outer_src, const ip4_address_t *outer_dst)
 
static uword gbp_learn_l3 (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, fib_protocol_t fproto)
 
static u8format_gbp_learn_l3_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() gbp_learn_ip4_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gbp_learn_ip6_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (gbp_learn_ip4, static)
 
 VNET_FEATURE_INIT (gbp_learn_ip6, static)
 

Variables

static char * gbp_learn_error_strings []
 
vlib_node_registration_t gbp_learn_l2_node
 (constructor) VLIB_REGISTER_NODE (gbp_learn_l2_node) More...
 
vlib_node_registration_t gbp_learn_ip4_node
 (constructor) VLIB_REGISTER_NODE (gbp_learn_ip4_node) More...
 
vlib_node_registration_t gbp_learn_ip6_node
 (constructor) VLIB_REGISTER_NODE (gbp_learn_ip6_node) More...
 

Macro Definition Documentation

◆ foreach_gbp_learn

#define foreach_gbp_learn   _(DROP, "drop")

Definition at line 30 of file gbp_learn_node.c.

◆ GBP_LEARN_DBG

#define GBP_LEARN_DBG (   ...)    vlib_log_debug (gbp_learn_main.gl_logger, __VA_ARGS__);

Definition at line 27 of file gbp_learn_node.c.

Typedef Documentation

◆ gbp_learn_l2_t

◆ gbp_learn_l2_trace_t

per-packet trace data

◆ gbp_learn_l3_t

◆ gbp_learn_l3_trace_t

per-packet trace data

Enumeration Type Documentation

◆ gbp_learn_error_t

Enumerator
GBP_LEARN_N_ERROR 

Definition at line 33 of file gbp_learn_node.c.

◆ gbp_learn_next_t

Enumerator
GBP_LEARN_N_NEXT 

Definition at line 47 of file gbp_learn_node.c.

Function Documentation

◆ format_gbp_learn_l2_trace()

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

Definition at line 356 of file gbp_learn_node.c.

+ Here is the call graph for this function:

◆ format_gbp_learn_l3_trace()

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

Definition at line 631 of file gbp_learn_node.c.

+ Here is the call graph for this function:

◆ gbp_learn_get_outer()

static void gbp_learn_get_outer ( const ethernet_header_t eh0,
ip4_address_t outer_src,
ip4_address_t outer_dst 
)
inlinestatic

Definition at line 165 of file gbp_learn_node.c.

+ Here is the caller graph for this function:

◆ gbp_learn_ip4_dp()

static void gbp_learn_ip4_dp ( const ip4_address_t ip,
u32  fib_index,
u32  sw_if_index,
sclass_t  sclass,
const ip4_address_t outer_src,
const ip4_address_t outer_dst 
)
static

Definition at line 419 of file gbp_learn_node.c.

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

◆ gbp_learn_ip4_node()

VLIB_NODE_FN() gbp_learn_ip4_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 645 of file gbp_learn_node.c.

+ Here is the call graph for this function:

◆ gbp_learn_ip6_dp()

static void gbp_learn_ip6_dp ( const ip6_address_t ip,
u32  fib_index,
u32  sw_if_index,
sclass_t  sclass,
const ip4_address_t outer_src,
const ip4_address_t outer_dst 
)
static

Definition at line 441 of file gbp_learn_node.c.

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

◆ gbp_learn_ip6_node()

VLIB_NODE_FN() gbp_learn_ip6_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 652 of file gbp_learn_node.c.

+ Here is the call graph for this function:

◆ gbp_learn_l2_cp()

static void gbp_learn_l2_cp ( const gbp_learn_l2_t gl2)
static

Definition at line 68 of file gbp_learn_node.c.

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

◆ gbp_learn_l2_dp()

static void gbp_learn_l2_dp ( const u8 mac,
u32  bd_index,
u32  sw_if_index,
sclass_t  sclass,
const ip4_address_t outer_src,
const ip4_address_t outer_dst 
)
static

Definition at line 132 of file gbp_learn_node.c.

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

◆ gbp_learn_l2_ip4_dp()

static void gbp_learn_l2_ip4_dp ( const u8 mac,
const ip4_address_t ip,
u32  bd_index,
u32  sw_if_index,
sclass_t  sclass,
const ip4_address_t outer_src,
const ip4_address_t outer_dst 
)
static

Definition at line 94 of file gbp_learn_node.c.

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

◆ gbp_learn_l2_ip6_dp()

static void gbp_learn_l2_ip6_dp ( const u8 mac,
const ip6_address_t ip,
u32  bd_index,
u32  sw_if_index,
sclass_t  sclass,
const ip4_address_t outer_src,
const ip4_address_t outer_dst 
)
static

Definition at line 113 of file gbp_learn_node.c.

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

◆ gbp_learn_l2_node()

VLIB_NODE_FN() gbp_learn_l2_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 182 of file gbp_learn_node.c.

+ Here is the call graph for this function:

◆ gbp_learn_l3()

static uword gbp_learn_l3 ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
fib_protocol_t  fproto 
)
static

Definition at line 476 of file gbp_learn_node.c.

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

◆ gbp_learn_l3_cp()

static void gbp_learn_l3_cp ( const gbp_learn_l3_t gl3)
static

Definition at line 400 of file gbp_learn_node.c.

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

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( gbp_learn_ip4  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( gbp_learn_ip6  ,
static   
)

Variable Documentation

◆ gbp_learn_error_strings

char* gbp_learn_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_gbp_learn

Definition at line 41 of file gbp_learn_node.c.

◆ gbp_learn_ip4_node

vlib_node_registration_t gbp_learn_ip4_node
Initial value:
= {
.name = "gbp-learn-ip4",
.vector_size = sizeof (u32),
.format_trace = format_gbp_learn_l3_trace,
}
unsigned int u32
Definition: types.h:88
static u8 * format_gbp_learn_l3_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_learn_ip4_node)

Definition at line 660 of file gbp_learn_node.c.

◆ gbp_learn_ip6_node

vlib_node_registration_t gbp_learn_ip6_node
Initial value:
= {
.name = "gbp-learn-ip6",
.vector_size = sizeof (u32),
.format_trace = format_gbp_learn_l3_trace,
}
unsigned int u32
Definition: types.h:88
static u8 * format_gbp_learn_l3_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_learn_ip6_node)

Definition at line 673 of file gbp_learn_node.c.

◆ gbp_learn_l2_node

vlib_node_registration_t gbp_learn_l2_node
Initial value:
= {
.name = "gbp-learn-l2",
.vector_size = sizeof (u32),
.format_trace = format_gbp_learn_l2_trace,
.error_strings = gbp_learn_error_strings,
.n_next_nodes = GBP_LEARN_N_NEXT,
.next_nodes = {
[GBP_LEARN_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * gbp_learn_error_strings[]
static u8 * format_gbp_learn_l2_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_learn_l2_node)

Definition at line 372 of file gbp_learn_node.c.