|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #include <netinet/in.h>
41 u32 match_acl_in_index;
49 #define foreach_acl_fa_error \
50 _(ACL_DROP, "ACL deny packets") \
51 _(ACL_PERMIT, "ACL permit packets") \
52 _(ACL_NEW_SESSION, "new sessions added") \
53 _(ACL_EXIST_SESSION, "existing session packets") \
54 _(ACL_CHECK, "checked packets") \
55 _(ACL_RESTART_SESSION_TIMER, "restart session timer") \
56 _(ACL_TOO_MANY_SESSIONS, "too many sessions to add new") \
61 #define _(sym,str) ACL_FA_ERROR_##sym,
84 s =
format (s,
"%s: sw_if_index %d next_index %x ethertype %x",
85 is_output ?
"OUT-ETHER-WHITELIST" :
"IN-ETHER-WHITELIST",
102 #define foreach_nonip_in_error \
103 _(DROP, "dropped inbound non-whitelisted non-ip packets") \
104 _(PERMIT, "permitted inbound whitelisted non-ip packets") \
107 #define foreach_nonip_out_error \
108 _(DROP, "dropped outbound non-whitelisted non-ip packets") \
109 _(PERMIT, "permitted outbound whitelisted non-ip packets") \
116 #define _(sym,str) FA_IN_NONIP_ERROR_##sym,
123 #define _(sym,string) string,
130 #define _(sym,str) FA_OUT_NONIP_ERROR_##sym,
137 #define _(sym,string) string,
149 ?
am->output_etype_whitelist_by_sw_if_index
150 :
am->input_etype_whitelist_by_sw_if_index;
158 if (whitelist[
i] == ethertype)
163 #define get_u16(addr) ( *((u16 *)(addr)) )
195 ethertype = clib_net_to_host_u16 (
get_u16 (l3h0 - 2));
206 && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)))
222 return frame->n_vectors;
244 .name =
"acl-plugin-in-nonip-l2",
245 .vector_size =
sizeof (
u32),
259 .arc_name =
"l2-input-nonip",
260 .node_name =
"acl-plugin-in-nonip-l2",
266 .name =
"acl-plugin-out-nonip-l2",
267 .vector_size =
sizeof (
u32),
281 .arc_name =
"l2-output-nonip",
282 .node_name =
"acl-plugin-out-nonip-l2",
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
nat44_ei_hairpin_src_next_t next_index
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u8 * format_l2_nonip_in_trace(u8 *s, va_list *args)
#define foreach_nonip_out_error
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
static uword nonip_in_out_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_output)
#define vec_elt(v, i)
Get vector value at index i.
VNET_FEATURE_INIT(acl_in_l2_nonip_fa_feature, static)
#define foreach_nonip_in_error
vlib_error_t * errors
Vector of errors for this node.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
vlib_node_registration_t acl_in_nonip_node
(constructor) VLIB_REGISTER_NODE (acl_in_nonip_node)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
struct _vlib_node_registration vlib_node_registration_t
static char * fa_out_nonip_error_strings[]
static int is_permitted_ethertype(acl_main_t *am, int sw_if_index0, int is_output, u16 ethertype)
#define foreach_acl_fa_error
description fragment has unexpected format
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define VNET_FEATURES(...)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static u8 * format_l2_nonip_out_trace(u8 *s, va_list *args)
u16 nexts[VLIB_FRAME_SIZE]
static char * fa_in_nonip_error_strings[]
vl_api_mac_event_action_t action
vl_api_interface_index_t sw_if_index
vl_api_fib_path_type_t type
vlib_node_registration_t acl_out_nonip_node
(constructor) VLIB_REGISTER_NODE (acl_out_nonip_node)
static u8 * format_nonip_in_out_trace(u8 *s, u32 is_output, va_list *args)
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,...)