Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove unused argument to vlib_feature_next
[vpp.git]
/
src
/
plugins
/
nat
/
out2in.c
diff --git
a/src/plugins/nat/out2in.c
b/src/plugins/nat/out2in.c
index
80465b0
..
26fc234
100755
(executable)
--- a/
src/plugins/nat/out2in.c
+++ b/
src/plugins/nat/out2in.c
@@
-626,7
+626,7
@@
nat_out2in_sm_unknown_proto (snat_main_t *sm,
m_key.addr = ip->dst_address;
m_key.port = 0;
m_key.protocol = 0;
m_key.addr = ip->dst_address;
m_key.port = 0;
m_key.protocol = 0;
- m_key.fib_index =
rx_fib_index
;
+ m_key.fib_index =
0
;
kv.key = m_key.as_u64;
if (clib_bihash_search_8_8 (&sm->static_mapping_by_external, &kv, &value))
return 1;
kv.key = m_key.as_u64;
if (clib_bihash_search_8_8 (&sm->static_mapping_by_external, &kv, &value))
return 1;
@@
-653,7
+653,7
@@
snat_out2in_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
f64 now = vlib_time_now (vm);
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@
-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))))
{
&& (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;
}
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))))
{
&& (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;
}
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))))
{
&& (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;
}
goto trace00;
}
@@
-1256,7
+1253,7
@@
nat44_out2in_reass_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
u32 pkts_processed = 0;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
snat_main_per_thread_data_t *per_thread_data =
&sm->per_thread_data[thread_index];
u32 *fragments_to_drop = 0;
snat_main_per_thread_data_t *per_thread_data =
&sm->per_thread_data[thread_index];
u32 *fragments_to_drop = 0;
@@
-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))))
{
&& (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;
}
goto trace0;
}
@@
-1962,7
+1957,7
@@
nat44_ed_out2in_unknown_proto (snat_main_t *sm,
return 0;
}
return 0;
}
- make_sm_kv (&kv, &ip->dst_address, 0,
rx_fib_index
, 0);
+ make_sm_kv (&kv, &ip->dst_address, 0,
0
, 0);
if (clib_bihash_search_8_8 (&sm->static_mapping_by_external, &kv, &value))
{
b->error = node->errors[SNAT_OUT2IN_ERROR_NO_TRANSLATION];
if (clib_bihash_search_8_8 (&sm->static_mapping_by_external, &kv, &value))
{
b->error = node->errors[SNAT_OUT2IN_ERROR_NO_TRANSLATION];
@@
-2038,7
+2033,7
@@
nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
nat44_ed_out2in_next_t next_index;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
nat44_ed_out2in_next_t next_index;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
stats_node_index = is_slow_path ? nat44_ed_out2in_slowpath_node.index :
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
stats_node_index = is_slow_path ? nat44_ed_out2in_slowpath_node.index :
@@
-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))))
{
&& (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;
}
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))))
{
&& (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;
}
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))))
{
&& (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;
}
goto trace0;
}
@@
-2837,7
+2829,7
@@
snat_det_out2in_node_fn (vlib_main_t * vm,
snat_out2in_next_t next_index;
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
snat_out2in_next_t next_index;
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@
-3473,7
+3465,7
@@
snat_out2in_worker_handoff_fn (vlib_main_t * vm,
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
vlib_frame_t *d = 0;
ASSERT (vec_len (sm->workers));
vlib_frame_t *d = 0;
ASSERT (vec_len (sm->workers));
@@
-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);
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))
{
if (PREDICT_FALSE(ip0->ttl == 1))
{