FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
devices.h File Reference
+ Include dependency graph for devices.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_device_per_worker_data_t
 
struct  vnet_device_main_t
 
struct  vnet_device_and_queue_t
 
struct  vnet_device_input_runtime_t
 

Macros

#define VNET_DEVICE_INPUT_NEXT_NODES
 
#define foreach_device_and_queue(var, vec)
 

Enumerations

enum  vnet_device_input_next_t {
  VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT, VNET_DEVICE_INPUT_NEXT_IP4_INPUT, VNET_DEVICE_INPUT_NEXT_IP6_INPUT, VNET_DEVICE_INPUT_NEXT_MPLS_INPUT,
  VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT, VNET_DEVICE_INPUT_NEXT_DROP, VNET_DEVICE_INPUT_N_NEXT_NODES
}
 

Functions

static void vnet_hw_interface_set_input_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
void vnet_hw_interface_assign_rx_thread (vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, uword thread_index)
 
int vnet_hw_interface_unassign_rx_thread (vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
 
int vnet_hw_interface_set_rx_mode (vnet_main_t *vnm, u32 hw_if_index, u16 queue_id, vnet_hw_interface_rx_mode mode)
 
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 u64 vnet_get_aggregate_rx_packets (void)
 
static void vnet_device_increment_rx_packets (u32 thread_index, u64 count)
 
static_always_inline vnet_device_and_queue_tvnet_get_device_and_queue (vlib_main_t *vm, vlib_node_runtime_t *node)
 
static_always_inline uword vnet_get_device_input_thread_index (vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
 
static_always_inline void vnet_device_input_set_interrupt_pending (vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
 

Variables

vnet_device_main_t vnet_device_main
 
vlib_node_registration_t device_input_node
 (constructor) VLIB_REGISTER_NODE (device_input_node) More...
 
const u32 device_input_next_node_advance []
 
const u32 device_input_next_node_flags []
 

Macro Definition Documentation

◆ foreach_device_and_queue

#define foreach_device_and_queue (   var,
  vec 
)
Value:
for (var = (vec); var < vec_end (vec); var++) \
if ((var->mode == VNET_HW_INTERFACE_RX_MODE_POLLING) \
|| clib_atomic_swap_acq_n (&((var)->interrupt_pending), 0))
#define vec_end(v)
End (last data address) of vector.
#define clib_atomic_swap_acq_n(a, b)
Definition: atomics.h:45

Definition at line 161 of file devices.h.

◆ VNET_DEVICE_INPUT_NEXT_NODES

Enumeration Type Documentation

◆ vnet_device_input_next_t

Enumerator
VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT 
VNET_DEVICE_INPUT_NEXT_IP4_INPUT 
VNET_DEVICE_INPUT_NEXT_IP6_INPUT 
VNET_DEVICE_INPUT_NEXT_MPLS_INPUT 
VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT 
VNET_DEVICE_INPUT_NEXT_DROP 
VNET_DEVICE_INPUT_N_NEXT_NODES 

Definition at line 22 of file devices.h.

Function Documentation

◆ vnet_device_increment_rx_packets()

static void vnet_device_increment_rx_packets ( u32  thread_index,
u64  count 
)
inlinestatic

Definition at line 110 of file devices.h.

+ Here is the caller graph for this function:

◆ vnet_device_input_set_interrupt_pending()

static_always_inline void vnet_device_input_set_interrupt_pending ( vnet_main_t vnm,
u32  hw_if_index,
u16  queue_id 
)

Definition at line 136 of file devices.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_get_aggregate_rx_packets()

static u64 vnet_get_aggregate_rx_packets ( void  )
inlinestatic

Definition at line 98 of file devices.h.

+ Here is the caller graph for this function:

◆ vnet_get_device_and_queue()

static_always_inline vnet_device_and_queue_t* vnet_get_device_and_queue ( vlib_main_t vm,
vlib_node_runtime_t node 
)

Definition at line 120 of file devices.h.

◆ vnet_get_device_input_thread_index()

static_always_inline uword vnet_get_device_input_thread_index ( vnet_main_t vnm,
u32  hw_if_index,
u16  queue_id 
)

Definition at line 127 of file devices.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_hw_interface_assign_rx_thread()

void vnet_hw_interface_assign_rx_thread ( vnet_main_t vnm,
u32  hw_if_index,
u16  queue_id,
uword  thread_index 
)

Definition at line 139 of file devices.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_hw_interface_get_rx_mode()

int vnet_hw_interface_get_rx_mode ( vnet_main_t vnm,
u32  hw_if_index,
u16  queue_id,
vnet_hw_interface_rx_mode mode 
)

Definition at line 313 of file devices.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_hw_interface_set_input_node()

static void vnet_hw_interface_set_input_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)
inlinestatic

Definition at line 79 of file devices.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_hw_interface_set_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 
)

Definition at line 253 of file devices.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_hw_interface_unassign_rx_thread()

int vnet_hw_interface_unassign_rx_thread ( vnet_main_t vnm,
u32  hw_if_index,
u16  queue_id 
)

Definition at line 188 of file devices.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ device_input_next_node_advance

const u32 device_input_next_node_advance[]

Definition at line 47 of file devices.c.

◆ device_input_next_node_flags

const u32 device_input_next_node_flags[]

Definition at line 57 of file devices.c.

◆ device_input_node

vlib_node_registration_t device_input_node

(constructor) VLIB_REGISTER_NODE (device_input_node)

Definition at line 32 of file devices.c.

◆ vnet_device_main

vnet_device_main_t vnet_device_main

Definition at line 22 of file devices.c.