|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
45 #ifndef CLIB_MARCH_VARIANT
56 #define foreach_worker_handoff_error \
57 _(CONGESTION_DROP, "congestion drop")
61 #define _(sym,str) WORKER_HANDOFF_ERROR_##sym,
68 #define _(sym,string) string,
82 format (s,
"worker-handoff: sw_if_index %d, next_worker %d, buffer 0x%x",
137 && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)))
153 thread_indices,
frame->n_vectors, 1);
157 WORKER_HANDOFF_ERROR_CONGESTION_DROP,
158 frame->n_vectors - n_enq);
159 return frame->n_vectors;
164 .name =
"worker-handoff",
165 .vector_size =
sizeof (
u32),
179 #ifndef CLIB_MARCH_VARIANT
182 uword * bitmap,
int enable_disable)
191 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
195 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
198 return VNET_API_ERROR_INVALID_WORKER;
235 int enable_disable = 1;
250 else if (
unformat (input,
"symmetrical"))
252 else if (
unformat (input,
"asymmetrical"))
273 case VNET_API_ERROR_INVALID_SW_IF_INDEX:
277 case VNET_API_ERROR_INVALID_WORKER:
281 case VNET_API_ERROR_UNIMPLEMENTED:
283 "Device driver doesn't support redirection");
300 .path =
"set interface handoff",
302 "set interface handoff <interface-name> workers <workers-list> [symmetrical|asymmetrical]",
vnet_sw_interface_type_t type
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
static_always_inline u32 vlib_buffer_enqueue_to_thread(vlib_main_t *vm, vlib_node_runtime_t *node, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
int interface_handoff_enable_disable(vlib_main_t *vm, u32 sw_if_index, uword *bitmap, int enable_disable)
handoff_main_t handoff_main
vlib_get_buffers(vm, from, b, n_left_from)
vlib_node_registration_t worker_handoff_node
(constructor) VLIB_REGISTER_NODE (worker_handoff_node)
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
clib_error_t * handoff_init(vlib_main_t *vm)
#define clib_error_return(e, args...)
static vlib_cli_command_t set_interface_handoff_command
(constructor) VLIB_CLI_COMMAND (set_interface_handoff_command)
#define vlib_call_init_function(vm, x)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
u64(* hash_fn)(ethernet_header_t *)
clib_error_t * threads_init(vlib_main_t *vm)
u32 vlib_frame_queue_main_init(u32 node_index, u32 frame_queue_nelts)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VLIB_NODE_FN(node)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vnet_main_t * vnet_get_main(void)
#define VLIB_NODE_FLAG_TRACE
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static u8 * format_worker_handoff_trace(u8 *s, va_list *args)
static u64 eth_get_sym_key(ethernet_header_t *h0)
uword * thread_registrations_by_name
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
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)
#define VLIB_CLI_COMMAND(x,...)
static u64 clib_xxhash(u64 key)
struct _vlib_node_registration vlib_node_registration_t
vnet_sw_interface_t * sw_interfaces
static char * worker_handoff_error_strings[]
static clib_error_t * set_interface_handoff_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_free(V)
Free vector's memory (no header).
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
#define hash_get_mem(h, key)
per_inteface_handoff_data_t * if_data
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
#define foreach_worker_handoff_error
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
static uword clib_bitmap_last_set(uword *ai)
Return the higest numbered set bit in a bitmap.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static u64 eth_get_key(ethernet_header_t *h0)
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)
@ VNET_SW_INTERFACE_TYPE_HARDWARE
#define clib_bitmap_foreach(i, ai)
Macro to iterate across set bits in a bitmap.
static vlib_thread_main_t * vlib_get_thread_main()
static uword is_pow2(uword x)
vl_api_interface_index_t sw_if_index
__clib_export uword unformat_bitmap_list(unformat_input_t *input, va_list *va)
unformat a list of bit ranges into a bitmap (eg "0-3,5-7,11" )
vl_api_fib_path_type_t type
vnet_interface_main_t interface_main
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,...)