summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-28 15:39:22 +0200
committerDamjan Marion <dmarion@me.com>2018-08-28 17:41:05 +0000
commit4638e94ac3993b93144874edee247cf327a6d65f (patch)
tree9bcebef6f154c67221336304149418bccf63415a /src/plugins
parente04ffa4ecda86695b96d9e9501e6c8ccce1377df (diff)
avf: add missing rx_redirect_to_node handler
Change-Id: If7fdcdef9a9e12fdf4b7af3c95e06602e39f1e10 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/avf/device.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index 94b5ca46648..2d6908bd1e2 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -1295,6 +1295,25 @@ avf_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid,
return 0;
}
+static void
+avf_set_interface_next_node (vnet_main_t * vnm, u32 hw_if_index,
+ u32 node_index)
+{
+ avf_main_t *am = &avf_main;
+ vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);
+ avf_device_t *ad = pool_elt_at_index (am->devices, hw->dev_instance);
+
+ /* Shut off redirection */
+ if (node_index == ~0)
+ {
+ ad->per_interface_next_index = node_index;
+ return;
+ }
+
+ ad->per_interface_next_index =
+ vlib_node_add_next (vlib_get_main (), avf_input_node.index, node_index);
+}
+
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (avf_device_class,) =
{
@@ -1303,6 +1322,7 @@ VNET_DEVICE_CLASS (avf_device_class,) =
.format_device_name = format_avf_device_name,
.admin_up_down_function = avf_interface_admin_up_down,
.rx_mode_change_function = avf_interface_rx_mode_change,
+ .rx_redirect_to_node = avf_set_interface_next_node,
};
/* *INDENT-ON* */