summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2019-08-25 15:30:45 +0800
committerNeale Ranns <nranns@cisco.com>2019-08-29 12:35:14 +0000
commite7eba48937c52478d3844745ebb63a4b9ce8d681 (patch)
treebde0a1b7f11853962ceba8b48b6335860e145203 /src/vnet
parent71f36067ca923fa4eb10060d6f6878f5fa864673 (diff)
ip: remove unused function parameter
Type: refactor Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/cop/ip6_whitelist.c7
-rw-r--r--src/vnet/dpo/lookup_dpo.c6
-rw-r--r--src/vnet/fib/ip6_fib.c2
-rw-r--r--src/vnet/fib/ip6_fib.h3
-rw-r--r--src/vnet/ip/ip6_forward.c2
-rw-r--r--src/vnet/ip/ip6_forward.h9
6 files changed, 12 insertions, 17 deletions
diff --git a/src/vnet/cop/ip6_whitelist.c b/src/vnet/cop/ip6_whitelist.c
index 7cf2368e798..3342ed64056 100644
--- a/src/vnet/cop/ip6_whitelist.c
+++ b/src/vnet/cop/ip6_whitelist.c
@@ -56,7 +56,6 @@ VLIB_NODE_FN (ip6_cop_whitelist_node) (vlib_main_t * vm,
u32 n_left_from, * from, * to_next;
cop_feature_type_t next_index;
cop_main_t *cm = &cop_main;
- ip6_main_t * im6 = &ip6_main;
vlib_combined_counter_main_t * vcm = &load_balance_main.lbm_via_counters;
u32 thread_index = vm->thread_index;
@@ -119,7 +118,7 @@ VLIB_NODE_FN (ip6_cop_whitelist_node) (vlib_main_t * vm,
&next0,
sizeof (c0[0]));
- lb_index0 = ip6_fib_table_fwding_lookup (im6, c0->fib_index,
+ lb_index0 = ip6_fib_table_fwding_lookup (c0->fib_index,
&ip0->src_address);
lb0 = load_balance_get (lb_index0);
dpo0 = load_balance_get_bucket_i(lb0, 0);
@@ -143,7 +142,7 @@ VLIB_NODE_FN (ip6_cop_whitelist_node) (vlib_main_t * vm,
&next1,
sizeof (c1[0]));
- lb_index1 = ip6_fib_table_fwding_lookup (im6, c1->fib_index,
+ lb_index1 = ip6_fib_table_fwding_lookup (c1->fib_index,
&ip1->src_address);
lb1 = load_balance_get (lb_index1);
@@ -223,7 +222,7 @@ VLIB_NODE_FN (ip6_cop_whitelist_node) (vlib_main_t * vm,
&next0,
sizeof (c0[0]));
- lb_index0 = ip6_fib_table_fwding_lookup (im6, c0->fib_index,
+ lb_index0 = ip6_fib_table_fwding_lookup (c0->fib_index,
&ip0->src_address);
lb0 = load_balance_get (lb_index0);
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index 617fb9e1a62..ec2cd02653b 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -788,10 +788,10 @@ lookup_dpo_ip6_inline (vlib_main_t * vm,
}
/* do src lookup */
- lbi0 = ip6_fib_table_fwding_lookup(&ip6_main,
+ lbi0 = ip6_fib_table_fwding_lookup(
fib_index0,
input_addr0);
- lbi1 = ip6_fib_table_fwding_lookup(&ip6_main,
+ lbi1 = ip6_fib_table_fwding_lookup(
fib_index1,
input_addr1);
lb0 = load_balance_get(lbi0);
@@ -927,7 +927,7 @@ lookup_dpo_ip6_inline (vlib_main_t * vm,
}
/* do src lookup */
- lbi0 = ip6_fib_table_fwding_lookup(&ip6_main,
+ lbi0 = ip6_fib_table_fwding_lookup(
fib_index0,
input_addr0);
lb0 = load_balance_get(lbi0);
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index ba90c5ff1d3..cecfcbd1560 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -319,7 +319,7 @@ u32 ip6_fib_table_fwding_lookup_with_if_index (ip6_main_t * im,
const ip6_address_t * dst)
{
u32 fib_index = vec_elt (im->fib_index_by_sw_if_index, sw_if_index);
- return ip6_fib_table_fwding_lookup(im, fib_index, dst);
+ return ip6_fib_table_fwding_lookup(fib_index, dst);
}
u32
diff --git a/src/vnet/fib/ip6_fib.h b/src/vnet/fib/ip6_fib.h
index 583a17f01b8..50b360bcd12 100644
--- a/src/vnet/fib/ip6_fib.h
+++ b/src/vnet/fib/ip6_fib.h
@@ -64,8 +64,7 @@ extern void ip6_fib_table_walk(u32 fib_index,
void *ctx);
always_inline u32
-ip6_fib_table_fwding_lookup (ip6_main_t * im,
- u32 fib_index,
+ip6_fib_table_fwding_lookup (u32 fib_index,
const ip6_address_t * dst)
{
ip6_fib_table_instance_t *table;
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index fbdf0b9b5a0..252bdf975be 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1140,7 +1140,7 @@ ip6_urpf_loose_check (ip6_main_t * im, vlib_buffer_t * b, ip6_header_t * i)
(vnet_buffer (b)->sw_if_index[VLIB_TX] == (u32) ~ 0) ?
fib_index : vnet_buffer (b)->sw_if_index[VLIB_TX];
- lbi = ip6_fib_table_fwding_lookup (im, fib_index, &i->src_address);
+ lbi = ip6_fib_table_fwding_lookup (fib_index, &i->src_address);
lb0 = load_balance_get (lbi);
return (fib_urpf_check_size (lb0->lb_urpf));
diff --git a/src/vnet/ip/ip6_forward.h b/src/vnet/ip/ip6_forward.h
index 44744c0c77b..7f6eb0c1184 100644
--- a/src/vnet/ip/ip6_forward.h
+++ b/src/vnet/ip/ip6_forward.h
@@ -108,11 +108,9 @@ ip6_lookup_inline (vlib_main_t * vm,
ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, p0);
ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, p1);
- lbi0 = ip6_fib_table_fwding_lookup (im,
- vnet_buffer (p0)->ip.fib_index,
+ lbi0 = ip6_fib_table_fwding_lookup (vnet_buffer (p0)->ip.fib_index,
dst_addr0);
- lbi1 = ip6_fib_table_fwding_lookup (im,
- vnet_buffer (p1)->ip.fib_index,
+ lbi1 = ip6_fib_table_fwding_lookup (vnet_buffer (p1)->ip.fib_index,
dst_addr1);
lb0 = load_balance_get (lbi0);
@@ -237,8 +235,7 @@ ip6_lookup_inline (vlib_main_t * vm,
ip0 = vlib_buffer_get_current (p0);
dst_addr0 = &ip0->dst_address;
ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, p0);
- lbi0 = ip6_fib_table_fwding_lookup (im,
- vnet_buffer (p0)->ip.fib_index,
+ lbi0 = ip6_fib_table_fwding_lookup (vnet_buffer (p0)->ip.fib_index,
dst_addr0);
lb0 = load_balance_get (lbi0);