44 #define foreach_llc_input_next \ 45 _ (PUNT, "error-punt") \ 46 _ (DROP, "error-drop") 50 #define _(s,n) LLC_INPUT_NEXT_##s, 78 u32 n_left_from, next_index, *from, *to_next;
92 while (n_left_from > 0)
98 while (n_left_from >= 4 && n_left_to_next >= 2)
103 u8 next0, next1, len0, len1, enqueue_code;
148 LLC_INPUT_NEXT_DROP ? LLC_ERROR_UNKNOWN_PROTOCOL :
152 LLC_INPUT_NEXT_DROP ? LLC_ERROR_UNKNOWN_PROTOCOL :
155 enqueue_code = (next0 != next_index) + 2 * (next1 != next_index);
159 switch (enqueue_code)
194 while (n_left_from > 0 && n_left_to_next > 0)
222 LLC_INPUT_NEXT_DROP ? LLC_ERROR_UNKNOWN_PROTOCOL :
234 to_next, n_left_to_next);
259 .vector_size =
sizeof (
u32),
266 #define _(s,n) [LLC_INPUT_NEXT_##s] = n,
static u8 llc_header_length(llc_header_t *h)
static void vlib_set_next_frame_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 buffer_index)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
u16 current_length
Nbytes between current data and the end of this buffer.
void llc_register_input_protocol(vlib_main_t *vm, llc_protocol_t protocol, u32 node_index)
vlib_error_t * errors
Vector of errors for this node.
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
static u8 * format_llc_input_trace(u8 *s, va_list *va)
#define foreach_llc_input_next
#define VLIB_INIT_FUNCTION(x)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define vlib_call_init_function(vm, x)
static void llc_setup_node(vlib_main_t *vm, u32 node_index)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
vlib_node_registration_t llc_input_node
(constructor) VLIB_REGISTER_NODE (llc_input_node)
static clib_error_t * osi_input_init(vlib_main_t *vm)
unformat_function_t unformat_llc_header
format_function_t format_llc_header
#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).
static uword llc_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
static llc_protocol_info_t * llc_get_protocol_info(llc_main_t *m, llc_protocol_t protocol)
#define VLIB_REGISTER_NODE(x,...)
#define CLIB_PREFETCH(addr, size, type)
#define foreach_llc_error
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
format_function_t format_llc_header_with_length
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
static char * llc_error_strings[]
#define clib_error_report(e)
static clib_error_t * llc_init(vlib_main_t *vm)
void vlib_trace_frame_buffers_only(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, uword n_buffers, uword next_buffer_stride, uword n_buffer_data_bytes_in_trace)
u8 input_next_by_protocol[256]
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u16 flags
Copy of main node flags.
#define VLIB_NODE_FLAG_TRACE
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static clib_error_t * llc_input_init(vlib_main_t *vm)