|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
55 want_enabled = want_enabled != 0;
91 VLIB_NODE_STATE_DISABLED : VLIB_NODE_STATE_POLLING));
119 u32 if_index = va_arg (*args,
u32);
202 .name =
"Packet generator",
237 s =
format (s,
"PG: tunnel (no-encap)");
245 .build_rewrite = NULL,
252 u32 gso_size,
u8 coalesce_enabled,
304 if (coalesce_enabled)
372 if (i1 != 0 && n_bits_left > 0)
382 s[i0] |= v[
i] &
mask;
391 while (n_bits_left >= 8)
413 s[i0] |= v[
i] &
mask;
425 void *packet_data_mask)
545 pg, s->
if_id, 0 , 0 ,
static void do_edit(pg_stream_t *stream, pg_edit_group_t *g, pg_edit_t *e, uword want_commit)
mac_address_t * allowed_mcast_macs
pg_edit_group_t * edit_groups
vnet_device_class_t pg_dev_class
pg_edit_type_t packet_size_edit_type
vlib_node_registration_t device_input_node
(constructor) VLIB_REGISTER_NODE (device_input_node)
static u32 vlib_num_workers()
static clib_error_t * pg_interface_admin_up_down(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, vnet_sw_interface_flags_t flags)
#define vec_add(V, E, N)
Add N elements to end of vector V (no header, unspecified alignment)
#define hash_set(h, key, value)
static u32 pg_eth_flag_change(vnet_main_t *vnm, vnet_hw_interface_t *hi, u32 flags)
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
static uword pow2_mask(uword x)
static void vlib_node_set_state(vlib_main_t *vm, u32 node_index, vlib_node_state_t new_state)
Set node dispatch state.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static u8 * format_pg_output_trace(u8 *s, va_list *va)
u8 * fixed_packet_data_mask
static vlib_main_t * vlib_get_worker_vlib_main(u32 worker_index)
vlib_main_t vlib_node_runtime_t * node
u8 * format_pg_tun_tx_trace(u8 *s, va_list *args)
#define hash_set_mem(h, key, value)
vl_api_tunnel_mode_t mode
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ VNET_HW_INTERFACE_FLAG_LINK_UP
static_always_inline u32 gro_flow_table_init(gro_flow_table_t **flow_table, u8 is_l2, u32 node_index)
static_always_inline int mac_address_cmp(const mac_address_t *a, const mac_address_t *b)
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
gro_flow_table_t * flow_table
static u8 * pg_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
VNET_HW_INTERFACE_CLASS(pg_interface_class, static)
#define vec_search_with_function(v, E, fn)
Search a vector for the index of the entry that matches.
static u32 random_u32(u32 *seed)
32-bit random number generator
static_always_inline void gro_flow_table_free(gro_flow_table_t *flow_table)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define hash_unset_mem(h, key)
pg_buffer_index_t * buffer_indices
#define vec_dup(V)
Return copy of vector (no header, no alignment)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
u32 sw_if_index[VLIB_N_RX_TX]
vnet_main_t * vnet_get_main(void)
static void pg_stream_free(pg_stream_t *s)
static uword pg_edit_n_alloc_bytes(pg_edit_t *e)
@ VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO
static u8 * format_pg_interface_name(u8 *s, va_list *args)
#define pool_is_free(P, E)
Use free bitmap to query whether given element is free.
static u64 pg_edit_get_value(pg_edit_t *e, int hi_or_lo)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
manual_print typedef address
#define PG_STREAM_FLAGS_IS_ENABLED
format_function_t format_vnet_buffer_no_chain
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap.
static pg_edit_group_t * pg_stream_get_group(pg_stream_t *s, u32 group_index)
uword * if_index_by_if_id
#define CLIB_CACHE_LINE_BYTES
uword * if_id_by_sw_if_index
vlib_node_function_t pg_output
enum pg_interface_mode_t_ pg_interface_mode_t
#define hash_create_vec(elts, key_bytes, value_bytes)
#define hash_get_mem(h, key)
#define vec_free(V)
Free vector's memory (no header).
pg_interface_t * interfaces
uword * stream_index_by_name
pg_edit_t * non_fixed_edits
description fragment has unexpected format
static uword ethernet_address_cast(const u8 *a)
static_always_inline u32 vlib_buffer_get_default_data_size(vlib_main_t *vm)
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
#define vec_foreach(var, vec)
Vector iterator.
void pg_edit_group_get_fixed_packet_data(pg_stream_t *s, u32 group_index, void *packet_data, void *packet_data_mask)
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V,...
static int pg_mac_address_cmp(const mac_address_t *m1, const mac_address_t *m2)
u32 pg_interface_add_or_get(pg_main_t *pg, uword if_id, u8 gso_enabled, u32 gso_size, u8 coalesce_enabled, pg_interface_mode_t mode)
u32 last_increment_packet_size
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
vnet_l3_packet_type_t vnet_link_to_l3_proto(vnet_link_t link)
Convert a link to to an Ethertype.
void pg_stream_del(pg_main_t *pg, uword index)
static vlib_main_t * vlib_get_main(void)
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags)
void pg_interface_enable_disable_coalesce(pg_interface_t *pi, u8 enable, u32 tx_node_index)
void pg_stream_enable_disable(pg_main_t *pg, pg_stream_t *s, int want_enabled)
static clib_error_t * pg_add_del_mac_address(vnet_hw_interface_t *hi, const u8 *address, u8 is_add)
pg_edit_t * non_fixed_edits
u8 ** replay_packet_templates
static void pg_edit_free(pg_edit_t *e)
@ VNET_HW_INTERFACE_CLASS_FLAG_P2P
a point 2 point interface
static void * clib_mem_alloc_aligned(uword size, uword align)
static void perform_fixed_edits(pg_stream_t *s)
static f64 vlib_time_now(vlib_main_t *vm)
void pg_stream_add(pg_main_t *pg, pg_stream_t *s_init)
u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE]
Space for inserting data before buffer start.
#define clib_fifo_free(f)
void pg_stream_change(pg_main_t *pg, pg_stream_t *s)
u8 * fixed_packet_data_mask
vl_api_interface_index_t sw_if_index
VNET_DEVICE_CLASS(pg_dev_class)
static uword clib_bitmap_is_zero(uword *ai)
predicate function; is an entire bitmap empty?
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
clib_error_t * ethernet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, const u8 *address, u32 *hw_if_index_return, ethernet_flag_change_function_t flag_change)
#define vec_del1(v, i)
Delete the element at index I.
static int pg_stream_is_enabled(pg_stream_t *s)
static_always_inline void mac_address_from_bytes(mac_address_t *mac, const u8 *bytes)
vl_api_wireguard_peer_flags_t flags