FD.io VPP  v19.04.4-rc0-5-ge88582fac
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

◆ 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 
)
static

Definition at line 416 of file abf_policy.c.

+ Here is the call graph for this function:

◆ abf_policy_cmd()

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 238 of file abf_policy.c.

+ Here is the call graph for this function:

◆ abf_policy_delete()

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:

◆ abf_policy_destroy()

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:

◆ abf_policy_find()

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:

◆ abf_policy_find_i()

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_get()

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:

◆ abf_policy_get_from_node()

static abf_policy_t* abf_policy_get_from_node ( fib_node_t node)
static

Definition at line 400 of file abf_policy.c.

+ Here is the caller graph for this function:

◆ abf_policy_get_index()

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:

◆ abf_policy_get_node()

static fib_node_t* abf_policy_get_node ( fib_node_index_t  index)
static

Definition at line 393 of file abf_policy.c.

+ Here is the call graph for this function:

◆ abf_policy_init()

static clib_error_t* abf_policy_init ( vlib_main_t vm)
static

Definition at line 443 of file abf_policy.c.

+ Here is the call graph for this function:

◆ abf_policy_last_lock_gone()

static void abf_policy_last_lock_gone ( fib_node_t node)
static

Definition at line 407 of file abf_policy.c.

+ Here is the call graph for this function:

◆ abf_policy_update()

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:

◆ abf_policy_walk()

void abf_policy_walk ( abf_policy_walk_cb_t  cb,
void *  ctx 
)

Walk/visit each of the ABF policies.

Definition at line 330 of file abf_policy.c.

+ Here is the caller graph for this function:

◆ abf_show_policy_cmd()

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 344 of file abf_policy.c.

+ Here is the call graph for this function:

◆ format_abf()

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

Definition at line 310 of file abf_policy.c.

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

Variable Documentation

◆ abf_policy_cmd_node

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:238

Create an ABF policy.

(constructor) VLIB_CLI_COMMAND (abf_policy_cmd_node)

Definition at line 301 of file abf_policy.c.

◆ abf_policy_db

uword* abf_policy_db
static

DB of ABF policy objects.

  • policy ID to index conversion.

Definition at line 37 of file abf_policy.c.

◆ abf_policy_fib_node_type

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_pool

abf_policy_t* abf_policy_pool
static

Pool of ABF objects.

Definition at line 31 of file abf_policy.c.

◆ abf_policy_show_policy_cmd_node

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:344

(constructor) VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node)

Definition at line 384 of file abf_policy.c.

◆ abf_policy_vft

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:416
static fib_node_t * abf_policy_get_node(fib_node_index_t index)
Definition: abf_policy.c:393
static void abf_policy_last_lock_gone(fib_node_t *node)
Definition: abf_policy.c:407

Definition at line 436 of file abf_policy.c.