|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
98 ap->
ap_id = policy_id;
134 return (VNET_API_ERROR_INVALID_VALUE);
193 return (VNET_API_ERROR_INVALID_VALUE);
265 else if (
unformat (line_input,
"id %d", &policy_id))
267 else if (
unformat (line_input,
"del"))
269 else if (
unformat (line_input,
"add"))
271 else if (
unformat (line_input,
"via %U",
295 if (
rv == VNET_API_ERROR_INVALID_VALUE)
298 "ACL index must match existing ACL index in policy");
316 .path =
"abf policy",
318 .short_help =
"abf policy [add|del] id <index> acl <index> via ...",
328 s =
format (s,
"abf:[%d]: policy:%d acl:%d",
333 s =
format (s,
"no forwarding");
368 if (
unformat (input,
"%d", &policy_id))
399 .path =
"show abf policy",
401 .short_help =
"show abf policy <value>",
u32 ap_id
The policy ID - as configured by the client.
static uword * abf_policy_db
DB of ABF policy objects.
static fib_node_t * abf_policy_get_node(fib_node_index_t index)
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 * fib_path_list_format(fib_node_index_t path_list_index, u8 *s)
vlib_main_t vlib_node_runtime_t * node
A FIB graph nodes virtual function table.
static clib_error_t * abf_show_policy_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
#define FIB_NODE_INDEX_INVALID
static abf_policy_t * abf_policy_pool
Pool of ABF objects.
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
An ACL based Forwarding 'policy'.
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
abf_policy_t * abf_policy_get(u32 index)
Get an ABF object from its VPP index.
import vnet interface_types api
static clib_error_t * abf_policy_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
static fib_node_back_walk_rc_t abf_policy_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
@ FIB_NODE_BW_REASON_FLAG_EVALUATE
#define hash_set(h, key, value)
void fib_path_list_unlock(fib_node_index_t path_list_index)
#define STRUCT_OFFSET_OF(t, f)
#define pool_foreach(VAR, POOL)
Iterate through pool.
fib_node_index_t ap_pl
The path-list describing how to forward in case of a match.
u32 abf_policy_find(u32 policy_id)
Find a ABF object from the client's policy ID.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
u32 ap_sibling
Sibling index on the path-list.
fib_node_type_t abf_policy_fib_node_type
FIB node type the attachment is registered.
@ FIB_PATH_LIST_FLAG_SHARED
u32 fib_node_index_t
A typedef of a node index.
static void abf_policy_last_lock_gone(fib_node_t *node)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * abf_policy_init(vlib_main_t *vm)
u32 fib_path_list_child_add(fib_node_index_t path_list_index, fib_node_type_t child_type, fib_node_index_t child_index)
static abf_policy_t * abf_policy_find_i(u32 policy_id)
@ FIB_NODE_BACK_WALK_CONTINUE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
int(* abf_policy_walk_cb_t)(index_t index, void *ctx)
Callback function invoked during a walk of all policies.
static u8 * format_abf(u8 *s, va_list *args)
fib_node_index_t fib_path_list_copy_and_path_remove(fib_node_index_t orig_path_list_index, fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
#define pool_foreach_index(i, v)
description fragment has unexpected format
void abf_policy_walk(abf_policy_walk_cb_t cb, void *ctx)
Walk/visit each of the ABF policies.
u32 ap_acl
ACL index to match.
#define VLIB_INIT_FUNCTION(x)
int abf_policy_delete(u32 policy_id, const fib_route_path_t *rpaths)
Delete paths from an ABF Policy.
A representation of a path as described by a route producer.
void fib_node_lock(fib_node_t *node)
void fib_path_list_child_remove(fib_node_index_t path_list_index, u32 si)
An node in the FIB graph.
#define hash_unset(h, key)
void fib_path_list_lock(fib_node_index_t path_list_index)
void fib_node_init(fib_node_t *node, fib_node_type_t type)
void fib_node_unlock(fib_node_t *node)
static vlib_cli_command_t abf_policy_cmd_node
Create an ABF policy.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ FIB_PATH_LIST_FLAG_NO_URPF
Context passed between object during a back walk.
static u32 abf_policy_get_index(const abf_policy_t *abf)
int abf_policy_update(u32 policy_id, u32 acl_index, const fib_route_path_t *rpaths)
Create or update an ABF Policy.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
fib_node_index_t fib_path_list_copy_and_path_add(fib_node_index_t orig_path_list_index, fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
fib_node_index_t fib_path_list_create(fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
static const fib_node_vft_t abf_policy_vft
static vlib_cli_command_t abf_policy_show_policy_cmd_node
(constructor) VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node)
fib_node_type_t fib_node_register_new_type(const fib_node_vft_t *vft)
Create a new FIB node type and Register the function table for it.
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
fib_node_t ap_node
Linkage into the FIB graph.
static void abf_policy_destroy(abf_policy_t *ap)
static abf_policy_t * abf_policy_get_from_node(fib_node_t *node)