34 .name =
"device-input",
37 .
state = VLIB_NODE_STATE_DISABLED,
67 .arc_name =
"device-input",
73 .arc_name =
"device-input",
74 .node_name =
"l2-patch",
79 .arc_name =
"device-input",
80 .node_name =
"worker-handoff",
85 .arc_name =
"device-input",
86 .node_name =
"span-input",
91 .arc_name =
"device-input",
92 .node_name =
"p2p-ethernet-input",
97 .arc_name =
"device-input",
98 .node_name =
"ethernet-input",
152 if (thread_index != 0 &&
153 (thread_index < vdm->first_worker_thread_index ||
194 uword old_thread_index;
198 return VNET_API_ERROR_INVALID_INTERFACE;
201 return VNET_API_ERROR_INVALID_INTERFACE;
216 return VNET_API_ERROR_INVALID_INTERFACE;
268 return VNET_API_ERROR_INVALID_INTERFACE;
275 return VNET_API_ERROR_UNSUPPORTED;
279 return VNET_API_ERROR_INVALID_QUEUE;
296 enabled_node_state = VLIB_NODE_STATE_POLLING;
298 enabled_node_state = VLIB_NODE_STATE_INTERRUPT;
304 VLIB_NODE_STATE_DISABLED)
322 return VNET_API_ERROR_INVALID_INTERFACE;
326 return VNET_API_ERROR_INVALID_QUEUE;
340 return VNET_API_ERROR_INVALID_INTERFACE;
358 if (tr && tr->
count > 0)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static clib_error_t * vnet_device_init(vlib_main_t *vm)
uword first_worker_thread_index
u32 * input_node_thread_index_by_queue
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vnet_device_per_worker_data_t * workers
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
uword next_worker_thread_index
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
uword * dq_runtime_index_by_queue
vlib_main_t ** vlib_mains
uword last_worker_thread_index
#define vlib_worker_thread_barrier_sync(X)
vnet_hw_interface_rx_mode
#define VLIB_INIT_FUNCTION(x)
static uword device_input_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static vlib_node_state_t vlib_node_get_state(vlib_main_t *vm, u32 node_index)
Get node dispatch state.
const u32 device_input_next_node_advance[((VNET_DEVICE_INPUT_N_NEXT_NODES/CLIB_CACHE_LINE_BYTES)+1)*CLIB_CACHE_LINE_BYTES]
static void vnet_device_queue_update(vnet_main_t *vnm, vnet_device_input_runtime_t *rt)
int vnet_hw_interface_get_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, vnet_hw_interface_rx_mode *mode)
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
#define vec_del1(v, i)
Delete the element at index I.
#define VNET_DEVICE_INPUT_NEXT_NODES
#define VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE
vnet_hw_interface_rx_mode mode
const u32 device_input_next_node_flags[((VNET_DEVICE_INPUT_N_NEXT_NODES/CLIB_CACHE_LINE_BYTES)+1)*CLIB_CACHE_LINE_BYTES]
void vnet_hw_interface_assign_rx_thread(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, uword thread_index)
vhost_vring_state_t state
static void vlib_node_set_state(vlib_main_t *vm, u32 node_index, vlib_node_state_t new_state)
Set node dispatch state.
uword * thread_registrations_by_name
#define VNET_FEATURES(...)
static vlib_main_t * vlib_get_main(void)
u8 device_input_feature_arc_index
Feature arc index for device-input.
VNET_FEATURE_INIT(l2_patch, static)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
static uword ethernet_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
VNET_FEATURE_ARC_INIT(device_input, static)
#define hash_get_mem(h, key)
int vnet_hw_interface_unassign_rx_thread(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
#define VLIB_REGISTER_NODE(x,...)
static vlib_thread_main_t * vlib_get_thread_main()
#define vec_foreach(var, vec)
Vector iterator.
vnet_hw_interface_rx_mode default_rx_mode
int vnet_hw_interface_set_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, vnet_hw_interface_rx_mode mode)
#define CLIB_CACHE_LINE_BYTES
vnet_feature_main_t feature_main
static int vnet_device_queue_sort(void *a1, void *a2)
vnet_device_main_t vnet_device_main
vlib_node_registration_t device_input_node
(constructor) VLIB_REGISTER_NODE (device_input_node)