|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
35 s =
format (s,
"IP_CLASSIFY: next_index %d, table %d, entry %d",
40 #define foreach_ip_classify_error \
41 _(MISS, "Classify misses") \
42 _(HIT, "Classify hits") \
43 _(CHAIN_HIT, "Classify hits after chain walk")
47 #define _(sym,str) IP_CLASSIFY_ERROR_##sym,
54 #define _(sym,string) string,
92 u32 cd_index0, cd_index1;
94 u32 table_index0, table_index1;
138 vnet_buffer (b0)->l2_classify.table_index = table_index0;
140 vnet_buffer (b1)->l2_classify.table_index = table_index1;
167 vnet_buffer (b0)->l2_classify.table_index = table_index0;
204 table_index1 =
vnet_buffer (p1)->l2_classify.table_index;
224 table_index0 =
vnet_buffer (b0)->l2_classify.table_index;
240 next0 = (e0->next_index <
node->n_next_nodes) ?
241 e0->next_index : next0;
266 next0 = (e0->next_index <
node->n_next_nodes) ?
267 e0->next_index : next0;
277 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
288 to_next, n_left_to_next,
296 IP_CLASSIFY_ERROR_MISS, misses);
298 IP_CLASSIFY_ERROR_HIT, hits);
300 IP_CLASSIFY_ERROR_CHAIN_HIT, chain_hits);
301 return frame->n_vectors;
314 .name =
"ip4-classify",
315 .vector_size =
sizeof (
u32),
316 .sibling_of =
"ip4-lookup",
335 .name =
"ip6-classify",
336 .vector_size =
sizeof (
u32),
337 .sibling_of =
"ip6-lookup",
346 #ifndef CLIB_MARCH_VARIANT
struct _vnet_classify_entry vnet_classify_entry_t
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
vlib_node_registration_t ip6_classify_node
(constructor) VLIB_REGISTER_NODE (ip6_classify_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.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_main_t vlib_node_runtime_t * node
vnet_classify_main_t vnet_classify_main
#define foreach_ip_classify_error
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vnet_classify_entry_t * vnet_classify_find_entry(vnet_classify_table_t *t, u8 *h, u64 hash, f64 now)
#define CLIB_PREFETCH(addr, size, type)
vlib_node_registration_t ip4_classify_node
(constructor) VLIB_REGISTER_NODE (ip4_classify_node)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
@ IP_LOOKUP_NEXT_DROP
Adjacency to drop this packet.
#define VLIB_NODE_FN(node)
A representation of an MPLS label for imposition in the data-path.
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define ethernet_buffer_header_size(b)
Determine the size of the Ethernet headers of the current frame in the buffer.
static void vnet_classify_prefetch_entry(vnet_classify_table_t *t, u64 hash)
static void vnet_classify_prefetch_bucket(vnet_classify_table_t *t, u64 hash)
static char * ip_classify_error_strings[]
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
ip_lookup_next_t
An adjacency is a representation of an attached L3 peer.
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
description fragment has unexpected format
static u8 * format_ip_classify_trace(u8 *s, va_list *args)
vlib_put_next_frame(vm, node, next_index, 0)
static classify_dpo_t * classify_dpo_get(index_t index)
#define VLIB_INIT_FUNCTION(x)
struct _vnet_classify_main vnet_classify_main_t
u64 vnet_classify_hash_packet(vnet_classify_table_t *t, u8 *h)
static clib_error_t * ip_classify_init(vlib_main_t *vm)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static f64 vlib_time_now(vlib_main_t *vm)
static uword ip_classify_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4)
#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).
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,...)