aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/dpdk/device/flow.c3
-rw-r--r--src/vnet/flow/flow.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/flow.c b/src/plugins/dpdk/device/flow.c
index a0eb95f8fa0..af0c4b6e6bf 100644
--- a/src/plugins/dpdk/device/flow.c
+++ b/src/plugins/dpdk/device/flow.c
@@ -220,11 +220,10 @@ dpdk_flow_ops_fn (vnet_main_t * vnm, vnet_flow_dev_op_t op, u32 dev_instance,
goto done;
}
-
*private_data = fe - xd->flow_entries;
/* install entry in the lookup table */
- memset (fle, ~1, sizeof (*fle));
+ memset (fle, -1, sizeof (*fle));
if (flow->actions & VNET_FLOW_ACTION_MARK)
fle->flow_id = flow->mark_flow_id;
if (flow->actions & VNET_FLOW_ACTION_REDIRECT_TO_NODE)
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);