34 .name =
"device-input",
37 .
state = VLIB_NODE_STATE_DISABLED,
57 .arc_name =
"device-input",
63 .arc_name =
"device-input",
64 .node_name =
"l2-patch",
69 .arc_name =
"device-input",
70 .node_name =
"worker-handoff",
75 .arc_name =
"device-input",
76 .node_name =
"span-input",
81 .arc_name =
"device-input",
82 .node_name =
"p2p-ethernet-input",
87 .arc_name =
"device-input",
88 .node_name =
"ethernet-input",
142 if (thread_index != 0 &&
143 (thread_index < vdm->first_worker_thread_index ||
184 uword old_thread_index;
188 return VNET_API_ERROR_INVALID_INTERFACE;
191 return VNET_API_ERROR_INVALID_INTERFACE;
206 return VNET_API_ERROR_INVALID_INTERFACE;
258 return VNET_API_ERROR_INVALID_INTERFACE;
265 return VNET_API_ERROR_UNSUPPORTED;
269 return VNET_API_ERROR_INVALID_QUEUE;
286 enabled_node_state = VLIB_NODE_STATE_POLLING;
288 enabled_node_state = VLIB_NODE_STATE_INTERRUPT;
294 VLIB_NODE_STATE_DISABLED)
312 return VNET_API_ERROR_INVALID_INTERFACE;
316 return VNET_API_ERROR_INVALID_QUEUE;
330 return VNET_API_ERROR_INVALID_INTERFACE;
348 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
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)