FD.io VPP  v19.08.3-2-gbabecb413
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 void gdb_vxlan_dep_del (u32 sw_if_index)
 
static gbp_itf_hdl_t 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_itf_hdl_t vxlan_gbp_tunnel_lock_itf (u32 sw_if_index)
 
gbp_vxlan_tunnel_type_t gbp_vxlan_tunnel_get_type (u32 sw_if_index)
 
gbp_itf_hdl_t gbp_vxlan_tunnel_clone_and_lock (u32 sw_if_index, const ip46_address_t *src, const ip46_address_t *dst)
 
void vxlan_gbp_tunnel_unlock (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...
 
static vlib_log_class_t gt_logger
 Logger. More...
 
static gbp_vxlan_tunnel_tgbp_vxlan_tunnel_pool
 Pool of template tunnels. More...
 
static vxlan_tunnel_ref_tvxlan_tunnel_ref_pool
 Pool of child tunnels. More...
 
static index_tgbp_vxlan_tunnel_db
 DB of template interfaces by SW interface index. More...
 
static 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 79 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 344 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 335 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 327 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 375 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 96 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 626 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 387 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 415 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 599 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 439 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()

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

Definition at line 271 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 550 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 84 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 253 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 318 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 304 of file gbp_vxlan.c.

+ Here is the caller graph for this function:

◆ gdb_vxlan_dep_add()

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

Definition at line 134 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 ( u32  sw_if_index)
static

Definition at line 109 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 222 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_itf()

gbp_itf_hdl_t vxlan_gbp_tunnel_lock_itf ( u32  sw_if_index)

Definition at line 237 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 289 of file gbp_vxlan.c.

◆ vxlan_tunnel_ref_get()

static vxlan_tunnel_ref_t* vxlan_tunnel_ref_get ( index_t  vxri)
static

Definition at line 90 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:599

(constructor) VLIB_CLI_COMMAND (gbp_vxlan_show_node)

Definition at line 618 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_db

index_t* gbp_vxlan_tunnel_db
static

DB of template interfaces by SW interface index.

Definition at line 61 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_layer_strings

char* gbp_vxlan_tunnel_layer_strings[]
static
Initial value:

Definition at line 73 of file gbp_vxlan.c.

◆ gbp_vxlan_tunnel_pool

gbp_vxlan_tunnel_t* gbp_vxlan_tunnel_pool
static

Pool of template tunnels.

Definition at line 51 of file gbp_vxlan.c.

◆ gt_logger

vlib_log_class_t gt_logger
static

Logger.

Definition at line 46 of file gbp_vxlan.c.

◆ gv_db

uword* gv_db

DB of added tunnels.

Definition at line 41 of file gbp_vxlan.c.

◆ punt_hdl

vlib_punt_hdl_t punt_hdl
static

handle registered with the ;unt infra

Definition at line 71 of file gbp_vxlan.c.

◆ vxlan_tunnel_ref_db

index_t* vxlan_tunnel_ref_db
static

DB of child interfaces by SW interface index.

Definition at line 66 of file gbp_vxlan.c.

◆ vxlan_tunnel_ref_pool

vxlan_tunnel_ref_t* vxlan_tunnel_ref_pool
static

Pool of child tunnels.

Definition at line 56 of file gbp_vxlan.c.