67 s =
format (s,
"l2-input: sw_if_index %d dst %U src %U [%U]",
77 #ifndef CLIB_MARCH_VARIANT 81 #define foreach_l2input_error \ 82 _(L2INPUT, "L2 input packets") \ 83 _(DROP, "L2 input drops") 87 #define _(sym,str) L2INPUT_ERROR_##sym, 94 #define _(sym,string) string, 139 #define get_u16(addr) ( *((u16 *)(addr)) ) 140 u16 ethertype = clib_net_to_host_u16 (
get_u16 (l3h0 - 2));
144 feat_mask &= ~(L2INPUT_FEAT_FWD |
145 L2INPUT_FEAT_UU_FLOOD |
146 L2INPUT_FEAT_UU_FWD | L2INPUT_FEAT_GBP_FWD);
148 if (ethertype != ETHERNET_TYPE_ARP)
149 feat_mask &= ~(L2INPUT_FEAT_ARP_UFWD);
152 if (ethertype != ETHERNET_TYPE_ARP &&
153 (ethertype != ETHERNET_TYPE_IP6 || protocol != IP_PROTOCOL_ICMP6))
154 feat_mask &= ~(L2INPUT_FEAT_ARP_TERM);
163 if (ethertype == ETHERNET_TYPE_ARP)
167 clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_request))
173 icmp6_neighbor_solicitation_or_advertisement_header_t *ndh0;
175 if (ndh0->icmp.type == ICMP6_neighbor_solicitation)
219 feat_mask = L2INPUT_FEAT_DROP;
225 vnet_buffer (b0)->l2.feature_bitmap = feature_bitmap;
251 u32 sw_if_index0, sw_if_index1, sw_if_index2, sw_if_index3;
280 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
291 if (b[1]->
flags & VLIB_BUFFER_IS_TRACED)
302 if (b[2]->
flags & VLIB_BUFFER_IS_TRACED)
313 if (b[3]->
flags & VLIB_BUFFER_IS_TRACED)
354 L2INPUT_ERROR_L2INPUT, frame->
n_vectors);
372 .vector_size =
sizeof (
u32),
l2_input_config_t * configs
vl_api_wireguard_peer_flags_t flags
vl_api_ip_proto_t protocol
#define clib_memcpy_fast(a, b, c)
#define VLIB_NODE_FN(node)
#define static_always_inline
u8 * format_ethernet_address(u8 *s, va_list *args)
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vl_api_fib_path_type_t type
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 feat_next_node_index[32]
static u32 feat_bitmap_get_next_node_index(u32 *next_nodes, u32 bitmap)
Return the graph node index for the feature corresponding to the first set bit in the bitmap...
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static uword ethernet_address_cast(const u8 *a)
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
#define VLIB_REGISTER_NODE(x,...)
#define CLIB_PREFETCH(addr, size, type)
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
static void * ip6_next_header(ip6_header_t *i)
vlib_main_t vlib_node_runtime_t * node
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static_always_inline l2fib_seq_num_t l2_fib_mk_seq_num(u8 bd_sn, u8 if_sn)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
#define VLIB_NODE_FLAG_TRACE
#define CLIB_CACHE_LINE_BYTES
vl_api_interface_index_t sw_if_index