29 s =
format (s,
"IP6_COP_WHITELIST: sw_if_index %d, next index %d",
36 #define foreach_ip6_cop_whitelist_error \ 37 _(DROPPED, "ip6 cop whitelist packets dropped") 40 #define _(sym,str) IP6_COP_WHITELIST_ERROR_##sym, 47 #define _(sym,string) string, 57 u32 n_left_from, * from, * to_next;
69 while (n_left_from > 0)
74 to_next, n_left_to_next);
76 while (n_left_from >= 4 && n_left_to_next >= 2)
81 u32 sw_if_index0, sw_if_index1;
85 u32 adj_index0, adj_index1;
103 to_next[0] = bi0 = from[0];
104 to_next[1] = bi1 = from[1];
128 b0->
error = node->
errors[IP6_COP_WHITELIST_ERROR_DROPPED];
151 (vcm, cpu_index, adj_index0, 1,
156 (vcm, cpu_index, adj_index1, 1,
162 b0->
error = node->
errors[IP6_COP_WHITELIST_ERROR_DROPPED];
168 b1->
error = node->
errors[IP6_COP_WHITELIST_ERROR_DROPPED];
192 to_next, n_left_to_next,
193 bi0, bi1, next0, next1);
196 while (n_left_from > 0 && n_left_to_next > 0)
235 (vcm, cpu_index, adj_index0, 1,
241 b0->
error = node->
errors[IP6_COP_WHITELIST_ERROR_DROPPED];
256 to_next, n_left_to_next,
267 .name =
"ip6-cop-whitelist",
268 .vector_size =
sizeof (
u32),
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
cop_config_main_t cop_config_mains[VNET_N_COPS]
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
ip_lookup_next_t lookup_next_index
vlib_node_registration_t ip6_cop_whitelist_node
(constructor) VLIB_REGISTER_NODE (ip6_cop_whitelist_node)
struct _vlib_node_registration vlib_node_registration_t
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
ip6_cop_whitelist_error_t
#define VLIB_INIT_FUNCTION(x)
always_inline void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 cpu_index, u32 index, u32 packet_increment, u32 byte_increment)
always_inline uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
static clib_error_t * ip6_whitelist_init(vlib_main_t *vm)
static char * ip6_cop_whitelist_error_strings[]
static uword ip6_cop_whitelist_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define foreach_ip6_cop_whitelist_error
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define CLIB_PREFETCH(addr, size, type)
u32 ip6_fib_lookup_with_table(ip6_main_t *im, u32 fib_index, ip6_address_t *dst)
vlib_combined_counter_main_t adjacency_counters
ip_lookup_main_t lookup_main
#define VLIB_NODE_FLAG_TRACE
#define VLIB_BUFFER_IS_TRACED
always_inline ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
static u8 * format_ip6_cop_whitelist_trace(u8 *s, va_list *args)
#define CLIB_CACHE_LINE_BYTES
always_inline void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vnet_config_main_t config_main