FD.io VPP  v19.04.2-12-g66b1689
Vector Packet Processing
gbp_contract.c File Reference
+ Include dependency graph for gbp_contract.c:

Go to the source code of this file.

Macros

#define GBP_CONTRACT_DBG(...)   vlib_log_notice (gc_logger, __VA_ARGS__);
 

Functions

index_t gbp_rule_alloc (gbp_rule_action_t action, gbp_hash_mode_t hash_mode, index_t *nhs)
 
index_t gbp_next_hop_alloc (const ip46_address_t *ip, index_t grd, const mac_address_t *mac, index_t gbd)
 
static gbp_next_hop_tgbp_next_hop_get (index_t gui)
 
static void gbp_contract_rules_free (index_t *rules)
 
static u8format_gbp_next_hop (u8 *s, va_list *args)
 
static u8format_gbp_rule_action (u8 *s, va_list *args)
 
static u8format_gbp_hash_mode (u8 *s, va_list *args)
 
static u8format_gbp_policy_node (u8 *s, va_list *args)
 
static u8format_gbp_rule (u8 *s, va_list *args)
 
static void gbp_contract_mk_adj (gbp_next_hop_t *gnh, fib_protocol_t fproto)
 
static flow_hash_config_t gbp_contract_mk_lb_hp (gbp_hash_mode_t gu_hash_mode)
 
static void gbp_contract_mk_lb (index_t gui, fib_protocol_t fproto)
 
static void gbp_contract_mk_one_lb (index_t gui)
 
static int gbp_contract_next_hop_resolve (index_t gui, index_t gnhi)
 
static void gbp_contract_rule_resolve (index_t gui)
 
static void gbp_contract_resolve (index_t *guis)
 
static void gbp_contract_mk_lbs (index_t *guis)
 
int gbp_contract_update (sclass_t sclass, sclass_t dclass, u32 acl_index, index_t *rules, u16 *allowed_ethertypes, u32 *stats_index)
 
int gbp_contract_delete (sclass_t sclass, sclass_t dclass)
 
void gbp_contract_walk (gbp_contract_cb_t cb, void *ctx)
 
static clib_error_tgbp_contract_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_gbp_contract_key (u8 *s, va_list *args)
 
u8format_gbp_contract (u8 *s, va_list *args)
 
static clib_error_tgbp_contract_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static fib_node_tgbp_next_hop_get_node (fib_node_index_t index)
 
static void gbp_next_hop_last_lock_gone (fib_node_t *node)
 
static gbp_next_hop_tgbp_next_hop_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t gbp_next_hop_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 
static clib_error_tgbp_contract_init (vlib_main_t *vm)
 

Variables

gbp_contract_db_t gbp_contract_db
 Single contract DB instance. More...
 
gbp_contract_tgbp_contract_pool
 
vlib_log_class_t gc_logger
 
fib_node_type_t gbp_next_hop_fib_type
 
gbp_rule_tgbp_rule_pool
 
gbp_next_hop_tgbp_next_hop_pool
 
vlib_combined_counter_main_t gbp_contract_permit_counters
 
vlib_combined_counter_main_t gbp_contract_drop_counters
 
static vlib_cli_command_t gbp_contract_cli_node
 (constructor) VLIB_CLI_COMMAND (gbp_contract_cli_node) More...
 
static vlib_cli_command_t gbp_contract_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_contract_show_node) More...
 
static const fib_node_vft_t gbp_next_hop_vft
 

Macro Definition Documentation

#define GBP_CONTRACT_DBG (   ...)    vlib_log_notice (gc_logger, __VA_ARGS__);

Definition at line 40 of file gbp_contract.c.

Function Documentation

u8* format_gbp_contract ( u8 s,
va_list *  args 
)

Definition at line 627 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 617 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 171 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 140 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 186 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 201 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 156 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 558 of file gbp_contract.c.

+ Here is the call graph for this function:

int gbp_contract_delete ( sclass_t  sclass,
sclass_t  dclass 
)

Definition at line 516 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* gbp_contract_init ( vlib_main_t vm)
static

Definition at line 776 of file gbp_contract.c.

+ Here is the call graph for this function:

static void gbp_contract_mk_adj ( gbp_next_hop_t gnh,
fib_protocol_t  fproto 
)
static

Definition at line 246 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_contract_mk_lb ( index_t  gui,
fib_protocol_t  fproto 
)
static

Definition at line 294 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static flow_hash_config_t gbp_contract_mk_lb_hp ( gbp_hash_mode_t  gu_hash_mode)
static

Definition at line 277 of file gbp_contract.c.

+ Here is the caller graph for this function:

static void gbp_contract_mk_lbs ( index_t guis)
static

Definition at line 436 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_contract_mk_one_lb ( index_t  gui)
static

Definition at line 360 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gbp_contract_next_hop_resolve ( index_t  gui,
index_t  gnhi 
)
static

Definition at line 367 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_contract_resolve ( index_t guis)
static

Definition at line 425 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_contract_rule_resolve ( index_t  gui)
static

Definition at line 409 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_contract_rules_free ( index_t rules)
static

Definition at line 98 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 664 of file gbp_contract.c.

+ Here is the call graph for this function:

int gbp_contract_update ( sclass_t  sclass,
sclass_t  dclass,
u32  acl_index,
index_t rules,
u16 allowed_ethertypes,
u32 stats_index 
)

Definition at line 447 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_contract_walk ( gbp_contract_cb_t  cb,
void *  ctx 
)

Definition at line 544 of file gbp_contract.c.

+ Here is the caller graph for this function:

index_t gbp_next_hop_alloc ( const ip46_address_t *  ip,
index_t  grd,
const mac_address_t mac,
index_t  gbd 
)

Definition at line 70 of file gbp_contract.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_node_back_walk_rc_t gbp_next_hop_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Definition at line 753 of file gbp_contract.c.

+ Here is the call graph for this function:

static gbp_next_hop_t* gbp_next_hop_from_fib_node ( fib_node_t node)
static

Definition at line 746 of file gbp_contract.c.

+ Here is the caller graph for this function:

static gbp_next_hop_t* gbp_next_hop_get ( index_t  gui)
inlinestatic

Definition at line 92 of file gbp_contract.c.

+ Here is the caller graph for this function:

static fib_node_t* gbp_next_hop_get_node ( fib_node_index_t  index)
static

Definition at line 730 of file gbp_contract.c.

+ Here is the call graph for this function:

static void gbp_next_hop_last_lock_gone ( fib_node_t node)
static

Definition at line 740 of file gbp_contract.c.

index_t gbp_rule_alloc ( gbp_rule_action_t  action,
gbp_hash_mode_t  hash_mode,
index_t nhs 
)

Definition at line 55 of file gbp_contract.c.

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t gbp_contract_cli_node
static
Initial value:
=
{
.path = "gbp contract",
.short_help =
"gbp contract [del] src-epg <ID> dst-epg <ID> acl-index <ACL>",
.function = gbp_contract_cli,
}
static clib_error_t * gbp_contract_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_contract.c:558

(constructor) VLIB_CLI_COMMAND (gbp_contract_cli_node)

Definition at line 607 of file gbp_contract.c.

gbp_contract_db_t gbp_contract_db

Single contract DB instance.

DP functions and databases.

Definition at line 29 of file gbp_contract.c.

vlib_combined_counter_main_t gbp_contract_drop_counters
Initial value:
= {
.name = "gbp-contracts-drop",
.stat_segment_name = "/net/gbp/contract/drop",
}

Definition at line 49 of file gbp_contract.c.

vlib_combined_counter_main_t gbp_contract_permit_counters
Initial value:
= {
.name = "gbp-contracts-permit",
.stat_segment_name = "/net/gbp/contract/permit",
}

Definition at line 44 of file gbp_contract.c.

gbp_contract_t* gbp_contract_pool

Definition at line 31 of file gbp_contract.c.

vlib_cli_command_t gbp_contract_show_node
static
Initial value:
= {
.path = "show gbp contract",
.short_help = "show gbp contract [src <SRC>] [dst <DST>]\n",
.function = gbp_contract_show,
}
static clib_error_t * gbp_contract_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_contract.c:664

(constructor) VLIB_CLI_COMMAND (gbp_contract_show_node)

Definition at line 722 of file gbp_contract.c.

fib_node_type_t gbp_next_hop_fib_type

Definition at line 35 of file gbp_contract.c.

gbp_next_hop_t* gbp_next_hop_pool

Definition at line 38 of file gbp_contract.c.

const fib_node_vft_t gbp_next_hop_vft
static
Initial value:
= {
.fnv_last_lock = gbp_next_hop_last_lock_gone,
}
static fib_node_t * gbp_next_hop_get_node(fib_node_index_t index)
Definition: gbp_contract.c:730
static void gbp_next_hop_last_lock_gone(fib_node_t *node)
Definition: gbp_contract.c:740
static fib_node_back_walk_rc_t gbp_next_hop_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: gbp_contract.c:753

Definition at line 768 of file gbp_contract.c.

gbp_rule_t* gbp_rule_pool

Definition at line 37 of file gbp_contract.c.

vlib_log_class_t gc_logger

Definition at line 33 of file gbp_contract.c.