FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
abf_policy.c File Reference
+ Include dependency graph for abf_policy.c:

Go to the source code of this file.

Functions

abf_policy_tabf_policy_get (u32 index)
 Get an ABF object from its VPP index. More...
 
static u32 abf_policy_get_index (const abf_policy_t *abf)
 
static abf_policy_tabf_policy_find_i (u32 policy_id)
 
u32 abf_policy_find (u32 policy_id)
 Find a ABF object from the client's policy ID. More...
 
void abf_policy_update (u32 policy_id, u32 acl_index, const fib_route_path_t *rpaths)
 Create or update an ABF Policy. More...
 
static void abf_policy_destroy (abf_policy_t *ap)
 
int abf_policy_delete (u32 policy_id, const fib_route_path_t *rpaths)
 Delete paths from an ABF Policy. More...
 
static clib_error_tabf_policy_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
static u8format_abf (u8 *s, va_list *args)
 
void abf_policy_walk (abf_policy_walk_cb_t cb, void *ctx)
 Walk/visit each of the ABF policies. More...
 
static clib_error_tabf_show_policy_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static fib_node_tabf_policy_get_node (fib_node_index_t index)
 
static abf_policy_tabf_policy_get_from_node (fib_node_t *node)
 
static void abf_policy_last_lock_gone (fib_node_t *node)
 
static fib_node_back_walk_rc_t abf_policy_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 
static clib_error_tabf_policy_init (vlib_main_t *vm)
 

Variables

fib_node_type_t abf_policy_fib_node_type
 FIB node type the attachment is registered. More...
 
static abf_policy_tabf_policy_pool
 Pool of ABF objects. More...
 
static uwordabf_policy_db
 DB of ABF policy objects. More...
 
static vlib_cli_command_t abf_policy_cmd_node
 Create an ABF policy. More...
 
static vlib_cli_command_t abf_policy_show_policy_cmd_node
 (constructor) VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node) More...
 
static const fib_node_vft_t abf_policy_vft
 

Function Documentation

static fib_node_back_walk_rc_t abf_policy_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Definition at line 414 of file abf_policy.c.

+ Here is the call graph for this function:

static clib_error_t* abf_policy_cmd ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)
static

Definition at line 236 of file abf_policy.c.

+ Here is the call graph for this function:

int abf_policy_delete ( u32  policy_id,
const fib_route_path_t rpaths 
)

Delete paths from an ABF Policy.

If no more paths exist, the policy is deleted.

Parameters
policy_idUser defined Policy ID
rpathsThe set of paths to forward remove

Definition at line 175 of file abf_policy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void abf_policy_destroy ( abf_policy_t ap)
static

Definition at line 161 of file abf_policy.c.

+ Here is the caller graph for this function:

u32 abf_policy_find ( u32  policy_id)

Find a ABF object from the client's policy ID.

Parameters
policy_idClient's defined policy ID
Returns
VPP's object index

Definition at line 66 of file abf_policy.c.

+ Here is the caller graph for this function:

static abf_policy_t* abf_policy_find_i ( u32  policy_id)
static

Definition at line 53 of file abf_policy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

abf_policy_t* abf_policy_get ( u32  index)

Get an ABF object from its VPP index.

Definition at line 41 of file abf_policy.c.

+ Here is the caller graph for this function:

static abf_policy_t* abf_policy_get_from_node ( fib_node_t node)
static

Definition at line 398 of file abf_policy.c.

+ Here is the caller graph for this function:

static u32 abf_policy_get_index ( const abf_policy_t abf)
static

Definition at line 47 of file abf_policy.c.

+ Here is the caller graph for this function:

static fib_node_t* abf_policy_get_node ( fib_node_index_t  index)
static

Definition at line 391 of file abf_policy.c.

+ Here is the call graph for this function:

static clib_error_t* abf_policy_init ( vlib_main_t vm)
static

Definition at line 441 of file abf_policy.c.

+ Here is the call graph for this function:

static void abf_policy_last_lock_gone ( fib_node_t node)
static

Definition at line 405 of file abf_policy.c.

+ Here is the call graph for this function:

void abf_policy_update ( u32  policy_id,
u32  acl_index,
const fib_route_path_t rpaths 
)

Create or update an ABF Policy.

Parameters
policy_idUser defined Policy ID
acl_indexThe ACL the policy with match on
rpathsThe set of paths to add to the forwarding set

Definition at line 80 of file abf_policy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void abf_policy_walk ( abf_policy_walk_cb_t  cb,
void *  ctx 
)

Walk/visit each of the ABF policies.

Definition at line 328 of file abf_policy.c.

+ Here is the caller graph for this function:

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

Definition at line 342 of file abf_policy.c.

+ Here is the call graph for this function:

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

Definition at line 308 of file abf_policy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t abf_policy_cmd_node
static
Initial value:
= {
.path = "abf policy",
.function = abf_policy_cmd,
.short_help = "abf policy [add|del] id <index> acl <index> via ...",
.is_mp_safe = 1,
}
static clib_error_t * abf_policy_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: abf_policy.c:236

Create an ABF policy.

(constructor) VLIB_CLI_COMMAND (abf_policy_cmd_node)

Definition at line 299 of file abf_policy.c.

uword* abf_policy_db
static

DB of ABF policy objects.

  • policy ID to index conversion.

Definition at line 37 of file abf_policy.c.

fib_node_type_t abf_policy_fib_node_type

FIB node type the attachment is registered.

The FIB node type for ABF policies.

Definition at line 26 of file abf_policy.c.

abf_policy_t* abf_policy_pool
static

Pool of ABF objects.

Definition at line 31 of file abf_policy.c.

vlib_cli_command_t abf_policy_show_policy_cmd_node
static
Initial value:
= {
.path = "show abf policy",
.function = abf_show_policy_cmd,
.short_help = "show abf policy <value>",
.is_mp_safe = 1,
}
static clib_error_t * abf_show_policy_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: abf_policy.c:342

(constructor) VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node)

Definition at line 382 of file abf_policy.c.

const fib_node_vft_t abf_policy_vft
static
Initial value:
= {
.fnv_get = abf_policy_get_node,
.fnv_last_lock = abf_policy_last_lock_gone,
.fnv_back_walk = abf_policy_back_walk_notify,
}
static fib_node_back_walk_rc_t abf_policy_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: abf_policy.c:414
static fib_node_t * abf_policy_get_node(fib_node_index_t index)
Definition: abf_policy.c:391
static void abf_policy_last_lock_gone(fib_node_t *node)
Definition: abf_policy.c:405

Definition at line 434 of file abf_policy.c.