diff options
author | Eyal Bari <ebari@cisco.com> | 2018-05-16 12:15:32 +0300 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-17 11:07:22 +0000 |
commit | 4b11d0316b4142c018c8dafcc9ef5d5717268948 (patch) | |
tree | 814b91f18c041f03a5c088f5ab584b81b54e8461 /src/vnet | |
parent | 70a26ac05f2ab9d4cc0669599b09f654de580f36 (diff) |
flow:redirect to node
Change-Id: I4b6577b496c56f27f07dd0066fcfdfd0cebb6f1a
Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/flow/flow.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/flow/flow.c b/src/vnet/flow/flow.c index 91e51120a7e..c4f57a21965 100644 --- a/src/vnet/flow/flow.c +++ b/src/vnet/flow/flow.c @@ -109,6 +109,14 @@ vnet_flow_enable (vnet_main_t * vnm, u32 flow_index, u32 hw_if_index) if (dev_class->flow_ops_function == 0) return VNET_FLOW_ERROR_NOT_SUPPORTED; + if (f->actions & VNET_FLOW_ACTION_REDIRECT_TO_NODE) + { + vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index); + f->redirect_device_input_next_index = + vlib_node_add_next (vnm->vlib_main, hw->input_node_index, + f->redirect_node_index); + } + rv = dev_class->flow_ops_function (vnm, VNET_FLOW_DEV_OP_ADD_FLOW, hi->dev_instance, flow_index, &private_data); |