16 #ifndef included_vnet_vnet_device_h 17 #define included_vnet_vnet_device_h 33 #define VNET_DEVICE_INPUT_NEXT_NODES { \ 34 [VNET_DEVICE_INPUT_NEXT_DROP] = "error-drop", \ 35 [VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT] = "ethernet-input", \ 36 [VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT] = "ip4-input-no-checksum", \ 37 [VNET_DEVICE_INPUT_NEXT_IP4_INPUT] = "ip4-input", \ 38 [VNET_DEVICE_INPUT_NEXT_IP6_INPUT] = "ip6-input", \ 39 [VNET_DEVICE_INPUT_NEXT_MPLS_INPUT] = "mpls-input", \ 156 #define foreach_device_and_queue(var,vec) \ 157 for (var = (vec); var < vec_end (vec); var++) \ 158 if ((var->mode == VNET_HW_INTERFACE_RX_MODE_POLLING) \ 159 || clib_smp_swap (&((var)->interrupt_pending), 0))
static void vnet_device_increment_rx_packets(u32 thread_index, u64 count)
vlib_node_registration_t device_input_node
(constructor) VLIB_REGISTER_NODE (device_input_node)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
uword first_worker_thread_index
u8 runtime_data[0]
Function dependent node-runtime data.
static u64 vnet_get_aggregate_rx_packets(void)
static void vlib_node_set_interrupt_pending(vlib_main_t *vm, u32 node_index)
PCAP utility definitions.
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
uword next_worker_thread_index
static_always_inline vnet_device_and_queue_t * vnet_get_device_and_queue(vlib_main_t *vm, vlib_node_runtime_t *node)
int vnet_hw_interface_set_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, vnet_hw_interface_rx_mode mode)
uword * dq_runtime_index_by_queue
vlib_main_t ** vlib_mains
uword last_worker_thread_index
vnet_hw_interface_rx_mode
#define static_always_inline
static_always_inline void vnet_device_input_set_interrupt_pending(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static_always_inline uword vnet_get_device_input_thread_index(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
const u32 device_input_next_node_flags[]
int vnet_hw_interface_get_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, vnet_hw_interface_rx_mode *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)
struct _vlib_node_registration vlib_node_registration_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_device_main_t vnet_device_main
#define vec_foreach(var, vec)
Vector iterator.
const u32 device_input_next_node_advance[]
static void vnet_hw_interface_set_input_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
int vnet_hw_interface_unassign_rx_thread(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)