|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
31 s =
format (s,
"IP4_ADL_ALLOWLIST: sw_if_index %d, next index %d",
36 #define foreach_ip4_adl_allowlist_error \
37 _(ALLOWED, "ip4 allowlist allowed") \
38 _(DROPPED, "ip4 allowlist dropped")
41 #define _(sym,str) IP4_ADL_ALLOWLIST_ERROR_##sym,
48 #define _(sym,string) string,
74 to_next, n_left_to_next);
81 u32 sw_if_index0, sw_if_index1;
85 u32 lb_index0, lb_index1;
104 to_next[0] = bi0 =
from[0];
105 to_next[1] = bi1 =
from[1];
120 &next0, sizeof (c0[0]));
133 b0->
error =
node->errors[IP4_ADL_ALLOWLIST_ERROR_DROPPED];
173 b1->
error =
node->errors[IP4_ADL_ALLOWLIST_ERROR_DROPPED];
179 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
188 && (b1->
flags & VLIB_BUFFER_IS_TRACED)))
198 to_next, n_left_to_next,
199 bi0, bi1, next0, next1);
253 b0->
error =
node->errors[IP4_ADL_ALLOWLIST_ERROR_DROPPED];
259 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
269 to_next, n_left_to_next,
277 IP4_ADL_ALLOWLIST_ERROR_ALLOWED,
280 return frame->n_vectors;
284 .name =
"ip4-adl-allowlist",
285 .vector_size =
sizeof (
u32),
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
@ DEFAULT_RX_ADL_ALLOWLIST
nat44_ei_hairpin_src_next_t next_index
static clib_error_t * ip4_allowlist_init(vlib_main_t *vm)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
dpo_type_t dpoi_type
the type
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
ip4_adl_allowlist_error_t
vlib_combined_counter_main_t lbm_via_counters
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
#define ip4_fib_table_lookup_lb
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static char * ip4_adl_allowlist_error_strings[]
load_balance_main_t load_balance_main
The one instance of load-balance main.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
static ip4_fib_t * ip4_fib_get(u32 index)
Get the FIB at the given index.
vnet_feature_config_main_t * cm
vlib_node_registration_t ip4_adl_allowlist_node
(constructor) VLIB_REGISTER_NODE (ip4_adl_allowlist_node)
struct _vlib_node_registration vlib_node_registration_t
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
description fragment has unexpected format
A collection of combined counters.
static u8 * format_ip4_adl_allowlist_trace(u8 *s, va_list *args)
vlib_put_next_frame(vm, node, next_index, 0)
#define VLIB_INIT_FUNCTION(x)
@ IP4_ADL_ALLOWLIST_N_ERROR
static load_balance_t * load_balance_get(index_t lbi)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define foreach_ip4_adl_allowlist_error
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
static_always_inline void clib_prefetch_store(void *p)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
vnet_config_main_t config_main
vl_api_fib_path_type_t type
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)