aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/devices.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/devices.h')
-rw-r--r--src/vnet/devices/devices.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/vnet/devices/devices.h b/src/vnet/devices/devices.h
index baf03b7cd2a..f1f7e778460 100644
--- a/src/vnet/devices/devices.h
+++ b/src/vnet/devices/devices.h
@@ -55,19 +55,12 @@ typedef struct
uword next_worker_thread_index;
} vnet_device_main_t;
-typedef enum
-{
- VNET_DEVICE_INPUT_MODE_POLLING = 0,
- VNET_DEVICE_INPUT_MODE_INTERRUPT,
- VNET_DEVICE_INPUT_N_MODES,
-} vnet_device_input_mode_t;
-
typedef struct
{
u32 hw_if_index;
u32 dev_instance;
u16 queue_id;
- vnet_device_input_mode_t mode;
+ vnet_hw_interface_rx_mode mode;
uword interrupt_pending;
} vnet_device_and_queue_t;
@@ -82,22 +75,23 @@ extern vlib_node_registration_t device_input_node;
extern const u32 device_input_next_node_advance[];
static inline void
-vnet_set_device_input_node (vnet_main_t * vnm, u32 hw_if_index,
- u32 node_index)
+vnet_hw_interface_set_input_node (vnet_main_t * vnm, u32 hw_if_index,
+ u32 node_index)
{
vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);
hw->input_node_index = node_index;
}
-void vnet_device_input_assign_thread (vnet_main_t * vnm, u32 hw_if_index,
- u16 queue_id, uword thread_index);
-int vnet_device_input_unassign_thread (vnet_main_t * vnm, u32 hw_if_index,
- u16 queue_id, uword thread_index);
-int vnet_device_input_set_mode (vnet_main_t * vnm, u32 hw_if_index,
- u16 queue_id, vnet_device_input_mode_t mode);
-int vnet_device_input_get_mode (vnet_main_t * vnm, u32 hw_if_index,
- u16 queue_id,
- vnet_device_input_mode_t * mode);
+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 inline u64
vnet_get_aggregate_rx_packets (void)
@@ -161,7 +155,7 @@ vnet_device_input_set_interrupt_pending (vnet_main_t * vnm, u32 hw_if_index,
#define foreach_device_and_queue(var,vec) \
for (var = (vec); var < vec_end (vec); var++) \
if (clib_smp_swap (&((var)->interrupt_pending), 0) || \
- var->mode == VNET_DEVICE_INPUT_MODE_POLLING)
+ var->mode == VNET_HW_INTERFACE_RX_MODE_POLLING)
#endif /* included_vnet_vnet_device_h */