summaryrefslogtreecommitdiffstats
path: root/plugins/flowperpkt-plugin/flowperpkt/node.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-11-09 19:54:20 +0100
committerDave Barach <openvpp@barachs.net>2016-11-11 14:39:00 +0000
commit8b3191e6d715760deefe550b59c7d92be4b5cda9 (patch)
tree721dd977986d12864346081fec6b245ea5a250e0 /plugins/flowperpkt-plugin/flowperpkt/node.c
parent0178d52384e0428368f1acf3163e664ecda7b64c (diff)
feature: convert all feature nodes to new feature infra
Change-Id: I34c527ba910fb282a95458b78d1d684eb337905e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'plugins/flowperpkt-plugin/flowperpkt/node.c')
-rw-r--r--plugins/flowperpkt-plugin/flowperpkt/node.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/flowperpkt-plugin/flowperpkt/node.c b/plugins/flowperpkt-plugin/flowperpkt/node.c
index b01f2be3a05..86da3a1cf59 100644
--- a/plugins/flowperpkt-plugin/flowperpkt/node.c
+++ b/plugins/flowperpkt-plugin/flowperpkt/node.c
@@ -284,9 +284,6 @@ flowperpkt_node_fn (vlib_main_t * vm,
{
u32 n_left_from, *from, *to_next;
flowperpkt_next_t next_index;
- ip4_main_t *im = &ip4_main;
- ip_lookup_main_t *lm = &im->lookup_main;
- vnet_feature_config_main_t *cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
flowperpkt_main_t *fm = &flowperpkt_main;
u64 now;
@@ -337,14 +334,10 @@ flowperpkt_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
-
- vnet_get_config_data (&cm->config_main,
- &b0->current_config_index,
- &next0, 0 /* sizeof config data */ );
-
- vnet_get_config_data (&cm->config_main,
- &b1->current_config_index,
- &next1, 0 /* sizeof config data */ );
+ vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX],
+ &next0, b0);
+ vnet_feature_next (vnet_buffer (b1)->sw_if_index[VLIB_TX],
+ &next1, b1);
ip0 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b0) +
vnet_buffer (b0)->ip.save_rewrite_length);
@@ -413,9 +406,8 @@ flowperpkt_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- vnet_get_config_data (&cm->config_main,
- &b0->current_config_index,
- &next0, 0 /* sizeof config data */ );
+ vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX],
+ &next0, b0);
ip0 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b0) +
vnet_buffer (b0)->ip.save_rewrite_length);