|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
129 return (
format(s,
"%U-null action:%s",
186 static f64 time_last_seed_change = -1e100;
187 static u32 hash_seeds[3];
195 if (time_now - time_last_seed_change > 1e-1)
199 sizeof (hash_seeds));
201 hash_seeds[
i] =
r[
i];
207 time_last_seed_change = time_now;
220 u32 a0, b0, c0, m0, drop0;
222 u32 bi0, indi0, next0;
273 c0 &=
BITS (hash_bitmap) - 1;
277 bm0 = hash_bitmap[c0];
278 drop0 = (bm0 & m0) != 0;
281 hash_bitmap[c0] = bm0 | m0;
298 ICMP4_destination_unreachable,
299 ICMP4_destination_unreachable_destination_unreachable_host,
307 ICMP4_destination_unreachable,
308 ICMP4_destination_unreachable_host_administratively_prohibited,
319 ICMP6_destination_unreachable,
320 ICMP6_destination_unreachable_no_route_to_destination,
328 ICMP6_destination_unreachable,
329 ICMP6_destination_unreachable_destination_administratively_prohibited,
342 n_left_to_next, bi0, next0);
348 return frame->n_vectors;
376 .vector_size =
sizeof (
u32),
400 .vector_size =
sizeof (
u32),
static void ip_null_dpo_unlock(dpo_id_t *dpo)
clib_random_buffer_t random_buffer
vlib_node_registration_t ip6_null_dpo_node
(constructor) VLIB_REGISTER_NODE (ip6_null_dpo_node)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
@ IP_NULL_ACTION_SEND_ICMP_PROHIBIT
void icmp6_error_set_vnet_buffer(vlib_buffer_t *b, u8 type, u8 code, u32 data)
nat44_ei_hairpin_src_next_t next_index
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
#define IP_NULL_DPO_ACTION_NUM
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vlib_main_t vlib_node_runtime_t * node
enum ip_null_next_t_ ip_null_next_t
Exit nodes from a IP_NULL.
static u8 * format_ip_null_dpo(u8 *s, va_list *ap)
struct ip_null_dpo_trace_t_ ip_null_dpo_trace_t
ip_null_dpo_action_t ip_null_dpo_get_action(index_t indi)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static uword ip4_null_dpo_switch(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vnet_hw_if_output_node_runtime_t * r
void ip_null_dpo_module_init(void)
static const ip_null_dpo_t * ip_null_dpo_get(index_t indi)
static ip_null_dpo_t ip_null_dpos[2 *IP_NULL_DPO_ACTION_NUM]
the IP_NULL dpos are shared by all routes, hence they are global.
u32 ind_next_index
The next VLIB node.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
ip_null_dpo_action_t ind_action
The action to take on a packet.
enum ip_null_dpo_action_t_ ip_null_dpo_action_t
The IP NULL DPO represents the rubbish bin for IP traffic.
const static char *const *const ip_null_nodes[DPO_PROTO_NUM]
const char * ip_null_action_strings[]
Action strings.
sll srl srl sll sra u16x4 i
static u8 * format_ip_null_dpo_trace(u8 *s, va_list *args)
dpo_lock_fn_t dv_lock
A reference counting lock function.
#define hash_v3_finalize32(a, b, c)
struct _vlib_node_registration vlib_node_registration_t
static_always_inline void icmp4_error_set_vnet_buffer(vlib_buffer_t *b, u8 type, u8 code, u32 data)
static void * clib_random_buffer_get_data(clib_random_buffer_t *b, uword n_bytes)
@ IP_NULL_ACTION_SEND_ICMP_UNREACH
#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.
ip_null_next_t_
Exit nodes from a IP_NULL.
static void ip_null_dpo_lock(dpo_id_t *dpo)
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
vlib_node_registration_t ip4_null_dpo_node
(constructor) VLIB_REGISTER_NODE (ip4_null_dpo_node)
struct ip_null_dpo_t_ ip_null_dpo_t
The data-path object representing dropping the packet.
The data-path object representing dropping the packet.
A virtual function table regisitered for a DPO type.
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
const static char *const ip6_null_nodes[]
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static uword ip6_null_dpo_switch(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
void ip_null_dpo_add_and_lock(dpo_proto_t proto, ip_null_dpo_action_t action, dpo_id_t *dpo)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
const static char *const ip4_null_nodes[]
The per-protocol VLIB graph nodes that are assigned to a ip_null object.
static f64 vlib_time_now(vlib_main_t *vm)
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
const static dpo_vft_t ip_null_vft
vl_api_mac_event_action_t action
#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).
#define hash_v3_mix32(a, b, c)
static uword ip_null_dpo_switch(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ip4)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)