aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-19 20:42:08 +0200
committerDamjan Marion <dmarion@me.com>2018-07-19 22:31:11 +0000
commit7d98a12f29d5b9696df98b8af2f128614a4f0360 (patch)
tree8d78626e0e482e4a004bc6a8fe573a7f0c0defc4
parent3d0fadc01fa92664b8ebc5d8400b6344ee7e92df (diff)
Remove unused argument to vlib_feature_next
Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/abf/abf_itf_attach.c2
-rw-r--r--src/plugins/acl/dataplane_node.c2
-rw-r--r--src/plugins/flowprobe/node.c9
-rw-r--r--src/plugins/gbp/gbp_policy_dpo.c3
-rw-r--r--src/plugins/gtpu/gtpu_decap.c6
-rw-r--r--src/plugins/ila/ila.c6
-rwxr-xr-xsrc/plugins/nat/out2in.c24
-rw-r--r--src/plugins/stn/stn.c2
-rw-r--r--src/vnet/bonding/node.c2
-rw-r--r--src/vnet/dhcp/dhcp_client_detect.c15
-rw-r--r--src/vnet/dpo/dvr_dpo.c9
-rw-r--r--src/vnet/ethernet/p2p_ethernet_input.c6
-rw-r--r--src/vnet/feature/feature.h8
-rw-r--r--src/vnet/geneve/decap.c9
-rw-r--r--src/vnet/interface_stats.c2
-rw-r--r--src/vnet/ip/ip4_reassembly.c3
-rw-r--r--src/vnet/ip/ip4_source_and_port_range_check.c3
-rw-r--r--src/vnet/ip/ip4_source_check.c15
-rw-r--r--src/vnet/ip/ip6_reassembly.c3
-rw-r--r--src/vnet/ipsec/ipsec.h3
-rw-r--r--src/vnet/ipsec/ipsec_input.c10
-rw-r--r--src/vnet/l2tp/decap.c2
-rw-r--r--src/vnet/qos/qos_mark.c2
-rw-r--r--src/vnet/qos/qos_record.c5
-rw-r--r--src/vnet/span/node.c6
-rw-r--r--src/vnet/vxlan-gpe/decap.c9
-rw-r--r--src/vnet/vxlan/decap.c6
27 files changed, 63 insertions, 109 deletions
diff --git a/src/plugins/abf/abf_itf_attach.c b/src/plugins/abf/abf_itf_attach.c
index 5373fc0d3ed..67aa5b1b1fa 100644
--- a/src/plugins/abf/abf_itf_attach.c
+++ b/src/plugins/abf/abf_itf_attach.c
@@ -588,7 +588,7 @@ abf_input_inline (vlib_main_t * vm,
* miss:
* move on down the feature arc
*/
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
}
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
diff --git a/src/plugins/acl/dataplane_node.c b/src/plugins/acl/dataplane_node.c
index 499ad163699..3ca1be73c15 100644
--- a/src/plugins/acl/dataplane_node.c
+++ b/src/plugins/acl/dataplane_node.c
@@ -275,7 +275,7 @@ acl_fa_node_fn (vlib_main_t * vm,
if (is_l2_path)
next0 = vnet_l2_feature_next (b[0], l2_feat_next_node_index, 0);
else
- vnet_feature_next (sw_if_index0, &next0, b[0]);
+ vnet_feature_next (&next0, b[0]);
}
#ifdef FA_NODE_VERBOSE_DEBUG
clib_warning
diff --git a/src/plugins/flowprobe/node.c b/src/plugins/flowprobe/node.c
index 9ac74cfd617..34f50aacbbc 100644
--- a/src/plugins/flowprobe/node.c
+++ b/src/plugins/flowprobe/node.c
@@ -774,10 +774,8 @@ flowprobe_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
- 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);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
len0 = vlib_buffer_length_in_chain (vm, b0);
ethernet_header_t *eh0 = vlib_buffer_get_current (b0);
@@ -822,8 +820,7 @@ flowprobe_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
len0 = vlib_buffer_length_in_chain (vm, b0);
ethernet_header_t *eh0 = vlib_buffer_get_current (b0);
diff --git a/src/plugins/gbp/gbp_policy_dpo.c b/src/plugins/gbp/gbp_policy_dpo.c
index e2af1e6daab..4b8cd5bf6ad 100644
--- a/src/plugins/gbp/gbp_policy_dpo.c
+++ b/src/plugins/gbp/gbp_policy_dpo.c
@@ -455,8 +455,7 @@ gbp_lpm_classify_inline (vlib_main_t * vm,
{
gpd0 = gbp_policy_dpo_get_i (dpo0->dpoi_index);
src_epg0 = gpd0->gpd_epg;
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
}
else
{
diff --git a/src/plugins/gtpu/gtpu_decap.c b/src/plugins/gtpu/gtpu_decap.c
index de235889073..1aac8b55745 100644
--- a/src/plugins/gtpu/gtpu_decap.c
+++ b/src/plugins/gtpu/gtpu_decap.c
@@ -933,8 +933,8 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
}
/* Setup packet for next IP feature */
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
- vnet_feature_next(vnet_buffer(b1)->sw_if_index[VLIB_RX], &next1, b1);
+ vnet_feature_next(&next0, b0);
+ vnet_feature_next(&next1, b1);
if (is_ip4)
{
@@ -1141,7 +1141,7 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
ip60 = vlib_buffer_get_current (b0);
/* Setup packet for next IP feature */
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next(&next0, b0);
if (is_ip4)
/* Treat IP4 frag packets as "experimental" protocol for now
diff --git a/src/plugins/ila/ila.c b/src/plugins/ila/ila.c
index fd56043eb57..93138723479 100644
--- a/src/plugins/ila/ila.c
+++ b/src/plugins/ila/ila.c
@@ -517,8 +517,8 @@ ila_sir2ila (vlib_main_t * vm,
ip61->dst_address.as_u64[0] = ila_address1->as_u64[0];
ip61->dst_address.as_u64[1] = ila_address1->as_u64[1];
- vnet_feature_next (vnet_buffer (p0)->sw_if_index[VLIB_RX], &next0, p0);
- vnet_feature_next (vnet_buffer (p1)->sw_if_index[VLIB_RX], &next1, p1);
+ vnet_feature_next (&next0, p0);
+ vnet_feature_next (&next1, p1);
vlib_validate_buffer_enqueue_x2 (vm, node, next_index, to_next,
n_left_to_next, pi0, pi1, next0,
@@ -569,7 +569,7 @@ ila_sir2ila (vlib_main_t * vm,
ip60->dst_address.as_u64[0] = ila_address0->as_u64[0];
ip60->dst_address.as_u64[1] = ila_address0->as_u64[1];
- vnet_feature_next (vnet_buffer (p0)->sw_if_index[VLIB_RX], &next0, p0);
+ vnet_feature_next (&next0, p0);
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, pi0, next0);
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index ecfabc9c07a..26fc23454ae 100755
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -786,8 +786,7 @@ snat_out2in_node_fn (vlib_main_t * vm,
&& (udp0->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next (&next0, b0);
goto trace0;
}
@@ -938,8 +937,7 @@ snat_out2in_node_fn (vlib_main_t * vm,
&& (udp1->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b1)->sw_if_index[VLIB_RX], &next1, b1);
+ vnet_feature_next (&next1, b1);
goto trace1;
}
@@ -1126,8 +1124,7 @@ snat_out2in_node_fn (vlib_main_t * vm,
&& (udp0->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next (&next0, b0);
goto trace00;
}
@@ -1352,9 +1349,7 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm,
&& (udp0->dst_port
== clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b0)->sw_if_index[VLIB_RX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
goto trace0;
}
@@ -2182,8 +2177,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
&& (udp0->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next (&next0, b0);
goto trace00;
}
@@ -2386,8 +2380,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
&& (udp1->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b1)->sw_if_index[VLIB_RX], &next1, b1);
+ vnet_feature_next (&next1, b1);
goto trace01;
}
@@ -2622,8 +2615,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
&& (udp0->dst_port ==
clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
{
- vnet_feature_next
- (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next (&next0, b0);
goto trace0;
}
@@ -3700,7 +3692,7 @@ snat_out2in_fast_node_fn (vlib_main_t * vm,
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index(sw_if_index0);
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
if (PREDICT_FALSE(ip0->ttl == 1))
{
diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c
index 9368e1c573e..e3f56d38a15 100644
--- a/src/plugins/stn/stn.c
+++ b/src/plugins/stn/stn.c
@@ -147,7 +147,7 @@ stn_ip46_punt_fn (vlib_main_t * vm,
}
else
{
- vnet_feature_next (0, &next0, p0);
+ vnet_feature_next (&next0, p0);
}
if (PREDICT_FALSE (p0->flags & VLIB_BUFFER_IS_TRACED))
diff --git a/src/vnet/bonding/node.c b/src/vnet/bonding/node.c
index 7abd7b0de32..ba3e8e32a36 100644
--- a/src/vnet/bonding/node.c
+++ b/src/vnet/bonding/node.c
@@ -169,7 +169,7 @@ bond_update_next (vlib_main_t * vm, vlib_node_runtime_t * node,
*bond_sw_if_index = bif->sw_if_index;
*error = 0;
- vnet_feature_next ( /* not used */ 0, next_index, b);
+ vnet_feature_next (next_index, b);
}
VLIB_NODE_FN (bond_input_node) (vlib_main_t * vm,
diff --git a/src/vnet/dhcp/dhcp_client_detect.c b/src/vnet/dhcp/dhcp_client_detect.c
index f9ba4fee4d2..de2702df398 100644
--- a/src/vnet/dhcp/dhcp_client_detect.c
+++ b/src/vnet/dhcp/dhcp_client_detect.c
@@ -131,14 +131,10 @@ dhcp_client_detect_node_fn (vlib_main_t * vm,
ip2 = vlib_buffer_get_current (b2);
ip3 = vlib_buffer_get_current (b2);
- 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);
- vnet_feature_next (vnet_buffer (b2)->sw_if_index[VLIB_TX],
- &next2, b2);
- vnet_feature_next (vnet_buffer (b3)->sw_if_index[VLIB_TX],
- &next3, b3);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
+ vnet_feature_next (&next2, b2);
+ vnet_feature_next (&next3, b3);
if (ip0->protocol == IP_PROTOCOL_UDP)
{
@@ -237,8 +233,7 @@ dhcp_client_detect_node_fn (vlib_main_t * vm,
* assigned) we are looking for the preverbial needle in the haystack
* so assume the packet is not the one we are looking for.
*/
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
/*
* all we are looking for here is DHCP/BOOTP packet-to-client
diff --git a/src/vnet/dpo/dvr_dpo.c b/src/vnet/dpo/dvr_dpo.c
index 39a8a631ebd..4b440f81c59 100644
--- a/src/vnet/dpo/dvr_dpo.c
+++ b/src/vnet/dpo/dvr_dpo.c
@@ -473,14 +473,12 @@ dvr_reinject_inline (vlib_main_t * vm,
if (b0->flags & VNET_BUFFER_F_IS_DVR)
next0 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next( &next0, b0);
if (b1->flags & VNET_BUFFER_F_IS_DVR)
next1 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b1)->sw_if_index[VLIB_TX],
- &next1, b1);
+ vnet_feature_next( &next1, b1);
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{
@@ -520,8 +518,7 @@ dvr_reinject_inline (vlib_main_t * vm,
if (b0->flags & VNET_BUFFER_F_IS_DVR)
next0 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next( &next0, b0);
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{
diff --git a/src/vnet/ethernet/p2p_ethernet_input.c b/src/vnet/ethernet/p2p_ethernet_input.c
index 74e3bb883cf..2cae97d7ba9 100644
--- a/src/vnet/ethernet/p2p_ethernet_input.c
+++ b/src/vnet/ethernet/p2p_ethernet_input.c
@@ -107,8 +107,8 @@ p2p_ethernet_input_node_fn (vlib_main_t * vm,
en1 = vlib_buffer_get_current (b1);
sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];
- vnet_feature_next (sw_if_index0, &next0, b0);
- vnet_feature_next (sw_if_index1, &next1, b1);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
rx0 = p2p_ethernet_lookup (sw_if_index0, en0->src_address);
rx1 = p2p_ethernet_lookup (sw_if_index1, en1->src_address);
@@ -186,7 +186,7 @@ p2p_ethernet_input_node_fn (vlib_main_t * vm,
en0 = vlib_buffer_get_current (b0);
sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
rx0 = p2p_ethernet_lookup (sw_if_index0, en0->src_address);
if (rx0 != ~0)
diff --git a/src/vnet/feature/feature.h b/src/vnet/feature/feature.h
index 66ee97c87d6..88a919f083a 100644
--- a/src/vnet/feature/feature.h
+++ b/src/vnet/feature/feature.h
@@ -221,8 +221,8 @@ vnet_feature_arc_start (u8 arc, u32 sw_if_index, u32 * next0,
}
static_always_inline void *
-vnet_feature_next_with_data (u32 sw_if_index, u32 * next0,
- vlib_buffer_t * b0, u32 n_data_bytes)
+vnet_feature_next_with_data (u32 * next0, vlib_buffer_t * b0,
+ u32 n_data_bytes)
{
vnet_feature_main_t *fm = &feature_main;
u8 arc = vnet_buffer (b0)->feature_arc_index;
@@ -234,9 +234,9 @@ vnet_feature_next_with_data (u32 sw_if_index, u32 * next0,
}
static_always_inline void
-vnet_feature_next (u32 sw_if_index, u32 * next0, vlib_buffer_t * b0)
+vnet_feature_next (u32 * next0, vlib_buffer_t * b0)
{
- vnet_feature_next_with_data (sw_if_index, next0, b0, 0);
+ vnet_feature_next_with_data (next0, b0, 0);
}
static_always_inline int
diff --git a/src/vnet/geneve/decap.c b/src/vnet/geneve/decap.c
index b17c6da07ae..f525fa323a6 100644
--- a/src/vnet/geneve/decap.c
+++ b/src/vnet/geneve/decap.c
@@ -943,10 +943,8 @@ ip_geneve_bypass_inline (vlib_main_t * vm,
}
/* Setup packet for next IP feature */
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0,
- b0);
- vnet_feature_next (vnet_buffer (b1)->sw_if_index[VLIB_RX], &next1,
- b1);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
if (is_ip4)
{
@@ -1161,8 +1159,7 @@ ip_geneve_bypass_inline (vlib_main_t * vm,
ip60 = vlib_buffer_get_current (b0);
/* Setup packet for next IP feature */
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0,
- b0);
+ vnet_feature_next (&next0, b0);
if (is_ip4)
/* Treat IP4 frag packets as "experimental" protocol for now
diff --git a/src/vnet/interface_stats.c b/src/vnet/interface_stats.c
index 1b07552727c..969f8930350 100644
--- a/src/vnet/interface_stats.c
+++ b/src/vnet/interface_stats.c
@@ -121,7 +121,7 @@ stats_collect_inline (vlib_main_t * vm,
stats_n_bytes[b0_ctype] += vlib_buffer_length_in_chain (vm, b0);
stats_n_packets[b0_ctype] += 1;
- vnet_feature_next (sw_if_index, &next0, b0);
+ vnet_feature_next (&next0, b0);
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, bi0, next0);
diff --git a/src/vnet/ip/ip4_reassembly.c b/src/vnet/ip/ip4_reassembly.c
index 2c9aabd20ac..a88ee2f3e84 100644
--- a/src/vnet/ip/ip4_reassembly.c
+++ b/src/vnet/ip/ip4_reassembly.c
@@ -961,8 +961,7 @@ ip4_reassembly_inline (vlib_main_t * vm,
n_left_to_next -= 1;
if (is_feature && IP4_ERROR_NONE == error0)
{
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
}
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, bi0, next0);
diff --git a/src/vnet/ip/ip4_source_and_port_range_check.c b/src/vnet/ip/ip4_source_and_port_range_check.c
index 2889a899678..1f9a32ea108 100644
--- a/src/vnet/ip/ip4_source_and_port_range_check.c
+++ b/src/vnet/ip/ip4_source_and_port_range_check.c
@@ -449,8 +449,7 @@ ip4_source_and_port_range_check_inline (vlib_main_t * vm,
ip0 = vlib_buffer_get_current (b0);
- c0 = vnet_feature_next_with_data (sw_if_index0, &next0,
- b0, sizeof (c0[0]));
+ c0 = vnet_feature_next_with_data (&next0, b0, sizeof (c0[0]));
/* we can't use the default VRF here... */
for (i = 0; i < IP_SOURCE_AND_PORT_RANGE_CHECK_N_PROTOCOLS; i++)
diff --git a/src/vnet/ip/ip4_source_check.c b/src/vnet/ip/ip4_source_check.c
index 25c51275920..2e4226f2108 100644
--- a/src/vnet/ip/ip4_source_check.c
+++ b/src/vnet/ip/ip4_source_check.c
@@ -150,14 +150,8 @@ ip4_source_check_inline (vlib_main_t * vm,
ip0 = vlib_buffer_get_current (p0);
ip1 = vlib_buffer_get_current (p1);
- c0 =
- vnet_feature_next_with_data (vnet_buffer (p0)->sw_if_index
- [VLIB_RX], &next0, p0,
- sizeof (c0[0]));
- c1 =
- vnet_feature_next_with_data (vnet_buffer (p1)->sw_if_index
- [VLIB_RX], &next1, p1,
- sizeof (c1[0]));
+ c0 = vnet_feature_next_with_data (&next0, p0, sizeof (c0[0]));
+ c1 = vnet_feature_next_with_data (&next1, p1, sizeof (c1[0]));
mtrie0 = &ip4_fib_get (c0->fib_index)->mtrie;
mtrie1 = &ip4_fib_get (c1->fib_index)->mtrie;
@@ -234,10 +228,7 @@ ip4_source_check_inline (vlib_main_t * vm,
p0 = vlib_get_buffer (vm, pi0);
ip0 = vlib_buffer_get_current (p0);
- c0 =
- vnet_feature_next_with_data (vnet_buffer (p0)->sw_if_index
- [VLIB_RX], &next0, p0,
- sizeof (c0[0]));
+ c0 = vnet_feature_next_with_data (&next0, p0, sizeof (c0[0]));
mtrie0 = &ip4_fib_get (c0->fib_index)->mtrie;
diff --git a/src/vnet/ip/ip6_reassembly.c b/src/vnet/ip/ip6_reassembly.c
index e84daf6a21c..72df29c361d 100644
--- a/src/vnet/ip/ip6_reassembly.c
+++ b/src/vnet/ip/ip6_reassembly.c
@@ -990,8 +990,7 @@ ip6_reassembly_inline (vlib_main_t * vm,
n_left_to_next -= 1;
if (is_feature && IP6_ERROR_NONE == error0)
{
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX],
- &next0, b0);
+ vnet_feature_next (&next0, b0);
}
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, bi0, next0);
diff --git a/src/vnet/ipsec/ipsec.h b/src/vnet/ipsec/ipsec.h
index d1aedb1af9d..4d066c381ba 100644
--- a/src/vnet/ipsec/ipsec.h
+++ b/src/vnet/ipsec/ipsec.h
@@ -378,11 +378,10 @@ get_next_output_feature_node_index (vlib_buffer_t * b,
vlib_node_runtime_t * nr)
{
u32 next;
- u32 sw_if_index = vnet_buffer (b)->sw_if_index[VLIB_TX];
vlib_main_t *vm = vlib_get_main ();
vlib_node_t *node = vlib_get_node (vm, nr->node_index);
- vnet_feature_next (sw_if_index, &next, b);
+ vnet_feature_next (&next, b);
return node->next_nodes[next];
}
diff --git a/src/vnet/ipsec/ipsec_input.c b/src/vnet/ipsec/ipsec_input.c
index d61755597ba..b7bb07bf051 100644
--- a/src/vnet/ipsec/ipsec_input.c
+++ b/src/vnet/ipsec/ipsec_input.c
@@ -209,10 +209,7 @@ ipsec_input_ip4_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b0->flags |= VNET_BUFFER_F_IS_IP4;
b0->flags &= ~VNET_BUFFER_F_IS_IP6;
- c0 =
- vnet_feature_next_with_data (vnet_buffer (b0)->sw_if_index
- [VLIB_RX], &next0, b0,
- sizeof (c0[0]));
+ c0 = vnet_feature_next_with_data (&next0, b0, sizeof (c0[0]));
spd0 = pool_elt_at_index (im->spds, c0->spd_index);
@@ -393,10 +390,7 @@ VLIB_NODE_FUNCTION_MULTIARCH (ipsec_input_ip4_node, ipsec_input_ip4_node_fn)
b0 = vlib_get_buffer (vm, bi0);
b0->flags |= VNET_BUFFER_F_IS_IP6;
b0->flags &= ~VNET_BUFFER_F_IS_IP4;
- c0 =
- vnet_feature_next_with_data (vnet_buffer (b0)->sw_if_index
- [VLIB_RX], &next0, b0,
- sizeof (c0[0]));
+ c0 = vnet_feature_next_with_data (&next0, b0, sizeof (c0[0]));
spd0 = pool_elt_at_index (im->spds, c0->spd_index);
diff --git a/src/vnet/l2tp/decap.c b/src/vnet/l2tp/decap.c
index 4610412954d..304862b5ee6 100644
--- a/src/vnet/l2tp/decap.c
+++ b/src/vnet/l2tp/decap.c
@@ -219,7 +219,7 @@ done:
{
/* Go to next node on the ip6 configuration chain */
if (PREDICT_TRUE (session != 0))
- vnet_feature_next (session->sw_if_index, &next_index, b);
+ vnet_feature_next (&next_index, b);
}
}
diff --git a/src/vnet/qos/qos_mark.c b/src/vnet/qos/qos_mark.c
index 5dc87e8ef81..38c66cba40c 100644
--- a/src/vnet/qos/qos_mark.c
+++ b/src/vnet/qos/qos_mark.c
@@ -180,7 +180,7 @@ qos_mark_inline (vlib_main_t * vm,
ethernet_vlan_header_set_priority_net_order (vlan0, qos0);
}
}
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
diff --git a/src/vnet/qos/qos_record.c b/src/vnet/qos/qos_record.c
index b05cfe670b5..fb235e09735 100644
--- a/src/vnet/qos/qos_record.c
+++ b/src/vnet/qos/qos_record.c
@@ -138,7 +138,7 @@ qos_record_inline (vlib_main_t * vm,
ip4_header_t *ip4_0;
ip6_header_t *ip6_0;
vlib_buffer_t *b0;
- u32 sw_if_index0, next0, bi0;
+ u32 next0, bi0;
qos_bits_t qos0;
u8 l2_len;
@@ -184,7 +184,6 @@ qos_record_inline (vlib_main_t * vm,
vnet_buffer2 (b0)->qos.bits = qos0;
vnet_buffer2 (b0)->qos.source = QOS_SOURCE_IP;
b0->flags |= VNET_BUFFER_F_QOS_DATA_VALID;
- sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) &&
(b0->flags & VLIB_BUFFER_IS_TRACED)))
@@ -203,7 +202,7 @@ qos_record_inline (vlib_main_t * vm,
L2INPUT_FEAT_L2_IP_QOS_RECORD);
}
else
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
/* verify speculative enqueue, maybe switch current next frame */
vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
diff --git a/src/vnet/span/node.c b/src/vnet/span/node.c
index 13e92abd5eb..4ac3a1db496 100644
--- a/src/vnet/span/node.c
+++ b/src/vnet/span/node.c
@@ -201,8 +201,8 @@ span_node_inline_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
break;
case SPAN_FEAT_DEVICE:
default:
- vnet_feature_next (sw_if_index0, &next0, b0);
- vnet_feature_next (sw_if_index1, &next1, b1);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
break;
}
@@ -242,7 +242,7 @@ span_node_inline_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
break;
case SPAN_FEAT_DEVICE:
default:
- vnet_feature_next (sw_if_index0, &next0, b0);
+ vnet_feature_next (&next0, b0);
break;
}
diff --git a/src/vnet/vxlan-gpe/decap.c b/src/vnet/vxlan-gpe/decap.c
index 29a043fe9d4..975323df5da 100644
--- a/src/vnet/vxlan-gpe/decap.c
+++ b/src/vnet/vxlan-gpe/decap.c
@@ -857,10 +857,8 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
}
/* Setup packet for next IP feature */
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0,
- b0);
- vnet_feature_next (vnet_buffer (b1)->sw_if_index[VLIB_RX], &next1,
- b1);
+ vnet_feature_next (&next0, b0);
+ vnet_feature_next (&next1, b1);
if (is_ip4)
{
@@ -1073,8 +1071,7 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
ip60 = vlib_buffer_get_current (b0);
/* Setup packet for next IP feature */
- vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_RX], &next0,
- b0);
+ vnet_feature_next (&next0, b0);
if (is_ip4)
proto0 = ip40->protocol;
diff --git a/src/vnet/vxlan/decap.c b/src/vnet/vxlan/decap.c
index f91180128d1..20df5e2c131 100644
--- a/src/vnet/vxlan/decap.c
+++ b/src/vnet/vxlan/decap.c
@@ -578,8 +578,8 @@ ip_vxlan_bypass_inline (vlib_main_t * vm,
}
/* Setup packet for next IP feature */
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
- vnet_feature_next(vnet_buffer(b1)->sw_if_index[VLIB_RX], &next1, b1);
+ vnet_feature_next(&next0, b0);
+ vnet_feature_next(&next1, b1);
if (is_ip4)
{
@@ -786,7 +786,7 @@ ip_vxlan_bypass_inline (vlib_main_t * vm,
ip60 = vlib_buffer_get_current (b0);
/* Setup packet for next IP feature */
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
+ vnet_feature_next(&next0, b0);
if (is_ip4)
/* Treat IP4 frag packets as "experimental" protocol for now