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

Go to the source code of this file.

Data Structures

struct  vxlan_tunnel_ref_t_
 A reference to a VXLAN-GBP tunnel created as a child/dependent tunnel of the tempplate GBP-VXLAN tunnel. More...
 
struct  gbp_vxlan_tx_trace_t_
 

Macros

#define GBP_VXLAN_TUN_DBG(...)   vlib_log_debug (gt_logger, __VA_ARGS__);
 

Typedefs

typedef struct vxlan_tunnel_ref_t_ vxlan_tunnel_ref_t
 A reference to a VXLAN-GBP tunnel created as a child/dependent tunnel of the tempplate GBP-VXLAN tunnel. More...
 
typedef struct gbp_vxlan_tx_trace_t_ gbp_vxlan_tx_trace_t
 

Functions

gbp_vxlan_tunnel_tgbp_vxlan_tunnel_get (index_t gti)
 
static vxlan_tunnel_ref_tvxlan_tunnel_ref_get (index_t vxri)
 
static u8format_vxlan_tunnel_ref (u8 *s, va_list *args)
 
static u32 gdb_vxlan_dep_add (gbp_vxlan_tunnel_t *gt, const ip46_address_t *src, const ip46_address_t *dst)
 
u32 vxlan_gbp_tunnel_get_parent (u32 sw_if_index)
 
gbp_vxlan_tunnel_type_t gbp_vxlan_tunnel_get_type (u32 sw_if_index)
 
u32 gbp_vxlan_tunnel_clone_and_lock (u32 sw_if_index, const ip46_address_t *src, const ip46_address_t *dst)
 
static void gdb_vxlan_dep_del (index_t vxri)
 
void vxlan_gbp_tunnel_unlock (u32 sw_if_index)
 
void vxlan_gbp_tunnel_lock (u32 sw_if_index)
 
void gbp_vxlan_walk (gbp_vxlan_cb_t cb, void *ctx)
 
static walk_rc_t gbp_vxlan_tunnel_show_one (gbp_vxlan_tunnel_t *gt, void *ctx)
 
static u8format_gbp_vxlan_tunnel_name (u8 *s, va_list *args)
 
u8format_gbp_vxlan_tunnel_layer (u8 *s, va_list *args)
 
u8format_gbp_vxlan_tunnel (u8 *s, va_list *args)
 
u8format_gbp_vxlan_tx_trace (u8 *s, va_list *args)
 
clib_error_tgbp_vxlan_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static uword gbp_vxlan_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_DEVICE_CLASS (gbp_vxlan_device_class)
 
 VNET_HW_INTERFACE_CLASS (gbp_vxlan_hw_interface_class)
 
int gbp_vxlan_tunnel_add (u32 vni, gbp_vxlan_tunnel_layer_t layer, u32 bd_rd_id, const ip4_address_t *src, u32 *sw_if_indexp)
 
int gbp_vxlan_tunnel_del (u32 vni)
 
static clib_error_tgbp_vxlan_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tgbp_vxlan_init (vlib_main_t *vm)
 

Variables

uwordgv_db
 DB of added tunnels. More...
 
vlib_log_class_t gt_logger
 Logger. More...
 
gbp_vxlan_tunnel_tgbp_vxlan_tunnel_pool
 Pool of template tunnels. More...
 
vxlan_tunnel_ref_tvxlan_tunnel_ref_pool
 Pool of child tunnels. More...
 
index_tgbp_vxlan_tunnel_db
 DB of template interfaces by SW interface index. More...
 
index_tvxlan_tunnel_ref_db
 DB of child interfaces by SW interface index. More...
 
static vlib_punt_hdl_t punt_hdl
 handle registered with the ;unt infra More...
 
static char * gbp_vxlan_tunnel_layer_strings []
 
static vlib_cli_command_t gbp_vxlan_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_vxlan_show_node) More...
 

Macro Definition Documentation

◆ GBP_VXLAN_TUN_DBG

#define GBP_VXLAN_TUN_DBG (   ...)    vlib_log_debug (gt_logger, __VA_ARGS__);

Definition at line 81 of file gbp_vxlan.c.

Typedef Documentation

◆ gbp_vxlan_tx_trace_t

◆ vxlan_tunnel_ref_t

A reference to a VXLAN-GBP tunnel created as a child/dependent tunnel of the tempplate GBP-VXLAN tunnel.

Function Documentation

◆ format_gbp_vxlan_tunnel()

u8* format_gbp_vxlan_tunnel ( u8 s,
va_list *  args 
)

Definition at line 370 of file gbp_vxlan.c.

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

◆ format_gbp_vxlan_tunnel_layer()

u8* format_gbp_vxlan_tunnel_layer ( u8 s,
va_list *  args 
)

Definition at line 361 of file gbp_vxlan.c.

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

◆ format_gbp_vxlan_tunnel_name()

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

Definition at line 353 of file gbp_vxlan.c.

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

◆ format_gbp_vxlan_tx_trace()

u8* format_gbp_vxlan_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 404 of file gbp_vxlan.c.

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

◆ format_vxlan_tunnel_ref()

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

Definition at line 99 of file gbp_vxlan.c.

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

◆ gbp_vxlan_init()

static clib_error_t* gbp_vxlan_init ( vlib_main_t vm)
static

Definition at line 678 of file gbp_vxlan.c.

+ Here is the call graph for this function:

◆ gbp_vxlan_interface_admin_up_down()

clib_error_t* gbp_vxlan_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)

Definition at line 416 of file gbp_vxlan.c.

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

◆ gbp_vxlan_interface_tx()

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

Definition at line 444 of file gbp_vxlan.c.

+ Here is the call graph for this function:

◆ gbp_vxlan_show()

static clib_error_t* gbp_vxlan_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 654 of file gbp_vxlan.c.

+ Here is the call graph for this function:

◆ gbp_vxlan_tunnel_add()

int gbp_vxlan_tunnel_add ( u32  vni,
gbp_vxlan_tunnel_layer_t  layer,
u32  bd_rd_id,
const ip4_address_t src,
u32 sw_if_indexp 
)

Definition at line 468 of file gbp_vxlan.c.

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

◆ gbp_vxlan_tunnel_clone_and_lock()

u32 gbp_vxlan_tunnel_clone_and_lock ( u32  sw_if_index,
const ip46_address_t *  src,
const ip46_address_t *  dst 
)

Definition at line 239 of file gbp_vxlan.c.

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

◆ gbp_vxlan_tunnel_del()

int gbp_vxlan_tunnel_del ( u32  vni)

Definition at line 596 of file gbp_vxlan.c.

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

◆ gbp_vxlan_tunnel_get()

gbp_vxlan_tunnel_t* gbp_vxlan_tunnel_get ( index_t  gti)

Definition at line 87 of file gbp_vxlan.c.

+ Here is the caller graph for this function:

◆ gbp_vxlan_tunnel_get_type()

gbp_vxlan_tunnel_type_t gbp_vxlan_tunnel_get_type ( u32  sw_if_index)

Definition at line 221 of file gbp_vxlan.c.

+ Here is the caller graph for this function:

◆ gbp_vxlan_tunnel_show_one()

static walk_rc_t gbp_vxlan_tunnel_show_one ( gbp_vxlan_tunnel_t gt,
void *  ctx 
)
static

Definition at line 344 of file gbp_vxlan.c.

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

◆ gbp_vxlan_walk()

void gbp_vxlan_walk ( gbp_vxlan_cb_t  cb,
void *  ctx 
)

Definition at line 330 of file gbp_vxlan.c.

+ Here is the caller graph for this function:

◆ gdb_vxlan_dep_add()

static u32 gdb_vxlan_dep_add ( gbp_vxlan_tunnel_t gt,
const ip46_address_t *  src,
const ip46_address_t *  dst 
)
static

Definition at line 113 of file gbp_vxlan.c.

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

◆ gdb_vxlan_dep_del()

static void gdb_vxlan_dep_del ( index_t  vxri)
static

Definition at line 257 of file gbp_vxlan.c.

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

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( gbp_vxlan_device_class  )
+ Here is the caller graph for this function:

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( gbp_vxlan_hw_interface_class  )
+ Here is the caller graph for this function:

◆ vxlan_gbp_tunnel_get_parent()

u32 vxlan_gbp_tunnel_get_parent ( u32  sw_if_index)

Definition at line 206 of file gbp_vxlan.c.

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

◆ vxlan_gbp_tunnel_lock()

void vxlan_gbp_tunnel_lock ( u32  sw_if_index)

Definition at line 316 of file gbp_vxlan.c.

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

◆ vxlan_gbp_tunnel_unlock()

void vxlan_gbp_tunnel_unlock ( u32  sw_if_index)

Definition at line 297 of file gbp_vxlan.c.

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

◆ vxlan_tunnel_ref_get()

static vxlan_tunnel_ref_t* vxlan_tunnel_ref_get ( index_t  vxri)
static

Definition at line 93 of file gbp_vxlan.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ gbp_vxlan_show_node

vlib_cli_command_t gbp_vxlan_show_node
static
Initial value:
= {
.path = "show gbp vxlan",
.short_help = "show gbp vxlan\n",
.function = gbp_vxlan_show,
}
static clib_error_t * gbp_vxlan_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_vxlan.c:654

(constructor) VLIB_CLI_COMMAND (gbp_vxlan_show_node)

Definition at line 670 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_db

index_t* gbp_vxlan_tunnel_db

DB of template interfaces by SW interface index.

Definition at line 63 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_layer_strings

char* gbp_vxlan_tunnel_layer_strings[]
static
Initial value:

Definition at line 75 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_pool

gbp_vxlan_tunnel_t* gbp_vxlan_tunnel_pool

Pool of template tunnels.

Definition at line 53 of file gbp_vxlan.c.

◆ gt_logger

vlib_log_class_t gt_logger

Logger.

Definition at line 48 of file gbp_vxlan.c.

◆ gv_db

uword* gv_db

DB of added tunnels.

Definition at line 43 of file gbp_vxlan.c.

◆ punt_hdl

vlib_punt_hdl_t punt_hdl
static

handle registered with the ;unt infra

Definition at line 73 of file gbp_vxlan.c.

◆ vxlan_tunnel_ref_db

index_t* vxlan_tunnel_ref_db

DB of child interfaces by SW interface index.

Definition at line 68 of file gbp_vxlan.c.

◆ vxlan_tunnel_ref_pool

vxlan_tunnel_ref_t* vxlan_tunnel_ref_pool

Pool of child tunnels.

Definition at line 58 of file gbp_vxlan.c.