From 4e53a0d0f01c8c81842d1f50fb5cf0d26e0c1713 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 21 Jun 2017 14:29:44 +0200 Subject: Introduce default rx mode for device drivers If interface is down and queues are not configured then we are not able to change rx-mode. This change introducess default mode which is stored per interface and applied if driver wants. Change-Id: I70149c21c1530eafc148d5e4aa03fbee53dec62f Signed-off-by: Damjan Marion --- src/vnet/devices/devices.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vnet/devices') diff --git a/src/vnet/devices/devices.c b/src/vnet/devices/devices.c index e3311c43..f64c6e0d 100644 --- a/src/vnet/devices/devices.c +++ b/src/vnet/devices/devices.c @@ -245,6 +245,9 @@ vnet_hw_interface_set_rx_mode (vnet_main_t * vnm, u32 hw_if_index, vnet_device_input_runtime_t *rt; int is_polling = 0; + if (mode == VNET_HW_INTERFACE_RX_MODE_DEFAULT) + mode = hw->default_rx_mode; + if (hw->input_node_thread_index_by_queue == 0 || hw->rx_mode_by_queue == 0) return VNET_API_ERROR_INVALID_INTERFACE; -- cgit 1.2.3-korg