|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
45 #define foreach_ppp_input_next \
46 _ (PUNT, "error-punt") \
47 _ (DROP, "error-drop")
51 #define _(s,n) PPP_INPUT_NEXT_##s,
114 u32 i0, i1, protocol0, protocol1, enqueue_code;
163 enqueue_code = (i0 != i_next) + 2 * (i1 != i_next);
167 switch (enqueue_code)
249 to_next, n_left_to_next);
263 #define ppp_error(n,s) s,
273 .vector_size =
sizeof (
u32),
282 #define _(s,n) [PPP_INPUT_NEXT_##s] = n,
301 (
sizeof (
rt->next_by_protocol[0]),
304 vec_validate (
rt->sparse_index_by_next_index, PPP_INPUT_NEXT_DROP);
305 vec_validate (
rt->sparse_index_by_next_index, PPP_INPUT_NEXT_PUNT);
306 rt->sparse_index_by_next_index[PPP_INPUT_NEXT_DROP]
308 rt->sparse_index_by_next_index[PPP_INPUT_NEXT_PUNT]
364 rt->sparse_index_by_next_index[
rt->next_by_protocol[
i]] =
i;
static void ppp_setup_node(vlib_main_t *vm, u32 node_index)
static char * ppp_error_strings[]
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static uword ppp_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
static clib_error_t * ppp_input_runtime_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)
vlib_main_t vlib_node_runtime_t * node
#define vlib_call_init_function(vm, x)
format_function_t format_ppp_header_with_length
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_node_registration_t ppp_input_node
(constructor) VLIB_REGISTER_NODE (ppp_input_node)
vlib_main_t vlib_node_runtime_t vlib_frame_t * from_frame
#define clib_error_report(e)
#define SPARSE_VEC_INVALID_INDEX
static u8 * format_ppp_input_trace(u8 *s, va_list *va)
#define vec_elt(v, i)
Get vector value at index i.
#define CLIB_PREFETCH(addr, size, type)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#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.
format_function_t format_ppp_header
#define sparse_vec_validate(v, i)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
VLIB_WORKER_INIT_FUNCTION(hdlc_input_runtime_init)
static uword sparse_vec_index(void *v, uword sparse_index)
sll srl srl sll sra u16x4 i
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
unformat_function_t unformat_ppp_header
struct _vlib_node_registration vlib_node_registration_t
static void sparse_vec_index2(void *v, u32 si0, u32 si1, u32 *i0_return, u32 *i1_return)
#define foreach_ppp_input_next
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
static void vlib_set_next_frame_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 buffer_index)
#define VLIB_INIT_FUNCTION(x)
vl_api_ip_proto_t protocol
static clib_error_t * ppp_init(vlib_main_t *vm)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
vnet_interface_output_runtime_t * rt
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
void ppp_register_input_protocol(vlib_main_t *vm, ppp_protocol_t protocol, u32 node_index)
static ppp_protocol_info_t * ppp_get_protocol_info(ppp_main_t *em, ppp_protocol_t protocol)
static clib_error_t * ppp_input_init(vlib_main_t *vm)
#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 void * sparse_vec_new(uword elt_bytes, uword sparse_index_bits)
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)