aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/devices.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-07 20:59:07 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-10-08 10:21:54 +0000
commiteabd4249826259d2221ed339ea4bbe9e7bf7560e (patch)
tree222f7f5bce0f994f3da63bf8622667816e1b4497 /src/vnet/devices/devices.h
parent9c9490cee8aba658ad2fef06305461cbaaaec1a1 (diff)
interface: shorten vnet_hw_if_rx_mode
This is part of bigger refactor. Type: refactor Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/devices.h')
-rw-r--r--src/vnet/devices/devices.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/devices/devices.h b/src/vnet/devices/devices.h
index d561563c295..4e7f30db4d6 100644
--- a/src/vnet/devices/devices.h
+++ b/src/vnet/devices/devices.h
@@ -60,7 +60,7 @@ typedef struct
u32 hw_if_index;
u32 dev_instance;
u16 queue_id;
- vnet_hw_interface_rx_mode mode;
+ vnet_hw_if_rx_mode mode;
u32 interrupt_pending;
} vnet_device_and_queue_t;
@@ -88,11 +88,9 @@ void vnet_hw_interface_assign_rx_thread (vnet_main_t * vnm, u32 hw_if_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);
+ u16 queue_id, vnet_hw_if_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);
+ u16 queue_id, vnet_hw_if_rx_mode * mode);
static inline u64
vnet_get_aggregate_rx_packets (void)
@@ -160,7 +158,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 ((var->mode == VNET_HW_INTERFACE_RX_MODE_POLLING) \
+ if ((var->mode == VNET_HW_IF_RX_MODE_POLLING) \
|| clib_atomic_swap_acq_n (&((var)->interrupt_pending), 0))
#endif /* included_vnet_vnet_device_h */