22 .class_name =
"interface",
23 .subclass_name =
"rx-queue",
26 #define log_debug(fmt, ...) vlib_log_debug (if_rxq_log.class, fmt, __VA_ARGS__) 27 #define log_err(fmt, ...) vlib_log_err (if_rxq_log.class, fmt, __VA_ARGS__) 36 if (thread_index != 0 && (thread_index < vdm->first_worker_thread_index ||
50 return ((
u64) hw_if_index << 32) | queue_id;
74 clib_panic (
"Trying to register already registered queue id (%u) in the " 92 log_debug (
"register: interface %v queue-id %u thread %u", hi->
name,
93 queue_id, thread_index);
152 log_debug (
"set_file_index: interface %v queue-id %u file-index %u",
163 vm, node_index, hi->
name);
179 if (rxq->
mode == mode)
181 log_debug (
"set_rx_queue_mode: interface %v queue-id %u mode " 187 if (dc->rx_mode_change_function)
193 log_err (
"setting rx mode on the interface %v queue-id %u failed.\n" 197 return VNET_API_ERROR_UNSUPPORTED;
202 log_debug (
"set_rx_queue_mode: interface %v queue-id %u mode set to %U",
226 log_debug (
"set_rx_queue_thread_index: interface %v queue-id %u " 227 "thread-index set to %u",
void vnet_hw_if_generate_rxq_int_poll_vector(vlib_main_t *vm, vlib_node_runtime_t *node)
format_function_t format_vnet_hw_if_rx_mode
vnet_interface_output_runtime_t * rt
format_function_t format_vlib_node_name
uword first_worker_thread_index
u8 runtime_data[0]
Function dependent node-runtime data.
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
vnet_interface_main_t interface_main
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#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
struct _vnet_device_class vnet_device_class_t
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
uword last_worker_thread_index
static vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
vnet_hw_if_rx_mode default_rx_mode
vnet_main_t * vnet_get_main(void)
clib_file_main_t file_main
void vnet_hw_if_unregister_rx_queue(vnet_main_t *vnm, u32 queue_index)
#define log_debug(fmt,...)
u32 vnet_hw_if_register_rx_queue(vnet_main_t *vnm, u32 hw_if_index, u32 queue_id, u32 thread_index)
u16 state
Input node state.
static_always_inline vnet_hw_if_rx_queue_t * vnet_hw_if_get_rx_queue(vnet_main_t *vnm, u32 queue_index)
vnet_hw_if_rxq_poll_vector_t * rxq_poll_vector
#define vec_del1(v, i)
Delete the element at index I.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
uword * rxq_index_by_hw_if_index_and_queue_id
vl_api_tunnel_mode_t mode
vnet_hw_if_rx_queue_t * hw_if_rx_queues
VLIB_REGISTER_LOG_CLASS(if_rxq_log, static)
int vnet_hw_if_set_rx_queue_mode(vnet_main_t *vnm, u32 queue_index, vnet_hw_if_rx_mode mode)
static void clib_file_set_polling_thread(clib_file_main_t *um, uword index, u32 thread_index)
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
vnet_interface_main_t * im
static_always_inline void clib_interrupt_clear(void *in, int int_num)
#define pool_put_index(p, i)
Free pool element with given index.
static void hash_unset_mem_free(uword **h, const void *key)
static_always_inline int clib_interrupt_get_next(void *in, int last)
static vlib_main_t * vlib_get_main(void)
u32 vnet_hw_if_get_rx_queue_index_by_id(vnet_main_t *vnm, u32 hw_if_index, u32 queue_id)
void vnet_hw_if_set_input_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_main_t vlib_node_runtime_t * node
void vnet_hw_if_unregister_all_rx_queues(vnet_main_t *vnm, u32 hw_if_index)
void vnet_hw_if_set_rx_queue_thread_index(vnet_main_t *vnm, u32 queue_index, u32 thread_index)
#define clib_error_free(e)
#define hash_get_mem(h, key)
static u64 rx_queue_key(u32 hw_if_index, u32 queue_id)
static u32 next_thread_index(vnet_main_t *vnm, u32 thread_index)
vnet_hw_if_rx_mode vnet_hw_if_get_rx_queue_mode(vnet_main_t *vnm, u32 queue_index)
static void hash_set_mem_alloc(uword **h, const void *key, uword v)
__clib_export u8 * format_clib_error(u8 *s, va_list *va)
#define clib_panic(format, args...)
vnet_device_main_t vnet_device_main
void vnet_hw_if_set_rx_queue_file_index(vnet_main_t *vnm, u32 queue_index, u32 file_index)