summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gbp/gbp_policy_dpo.h2
-rw-r--r--src/plugins/svs/svs.c3
-rw-r--r--src/plugins/unittest/fib_test.c5
-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
9 files changed, 15 insertions, 24 deletions
diff --git a/src/plugins/gbp/gbp_policy_dpo.h b/src/plugins/gbp/gbp_policy_dpo.h
index 1dc11ab2e32..77ca5d93bd0 100644
--- a/src/plugins/gbp/gbp_policy_dpo.h
+++ b/src/plugins/gbp/gbp_policy_dpo.h
@@ -96,7 +96,7 @@ gbp_classify_get_gpd (const ip4_address_t * ip4, const ip6_address_t * ip6,
if (ip4)
lbi = ip4_fib_forwarding_lookup (fib_index, ip4);
else if (ip6)
- lbi = ip6_fib_table_fwding_lookup (&ip6_main, fib_index, ip6);
+ lbi = ip6_fib_table_fwding_lookup (fib_index, ip6);
else
return 0;
diff --git a/src/plugins/svs/svs.c b/src/plugins/svs/svs.c
index 2ee15cffac3..8c1487c6ebc 100644
--- a/src/plugins/svs/svs.c
+++ b/src/plugins/svs/svs.c
@@ -304,8 +304,7 @@ svs_input_inline (vlib_main_t * vm,
ip6_header_t *ip0;
ip0 = vlib_buffer_get_current (b0);
- lbi0 = ip6_fib_table_fwding_lookup (&ip6_main,
- svs_itf_db[fproto]
+ lbi0 = ip6_fib_table_fwding_lookup (svs_itf_db[fproto]
[sw_if_index0],
&ip0->src_address);
}
diff --git a/src/plugins/unittest/fib_test.c b/src/plugins/unittest/fib_test.c
index d631350aa89..f220eb0d358 100644
--- a/src/plugins/unittest/fib_test.c
+++ b/src/plugins/unittest/fib_test.c
@@ -714,7 +714,7 @@ fib_test_validate_entry (fib_node_index_t fei,
fw_lbi = ip4_fib_forwarding_lookup(fib_index, &pfx->fp_addr.ip4);
break;
case FIB_PROTOCOL_IP6:
- fw_lbi = ip6_fib_table_fwding_lookup(&ip6_main, fib_index, &pfx->fp_addr.ip6);
+ fw_lbi = ip6_fib_table_fwding_lookup(fib_index, &pfx->fp_addr.ip6);
break;
case FIB_PROTOCOL_MPLS:
{
@@ -4433,7 +4433,6 @@ fib_test_v6 (void)
dpo = fib_entry_contribute_ip_forwarding(dfrt);
FIB_TEST((dpo->dpoi_index == ip6_fib_table_fwding_lookup(
- &ip6_main,
1,
&pfx_0_0.fp_addr.ip6)),
"default-route; fwd and non-fwd tables match");
@@ -4501,7 +4500,6 @@ fib_test_v6 (void)
"attached interface adj is receive ok");
dpo = fib_entry_contribute_ip_forwarding(fei);
FIB_TEST((dpo->dpoi_index == ip6_fib_table_fwding_lookup(
- &ip6_main,
1,
&local_pfx.fp_addr.ip6)),
"attached-route; fwd and non-fwd tables match");
@@ -4534,7 +4532,6 @@ fib_test_v6 (void)
dpo = fib_entry_contribute_ip_forwarding(fei);
FIB_TEST((dpo->dpoi_index == ip6_fib_table_fwding_lookup(
- &ip6_main,
1,
&local_pfx.fp_addr.ip6)),
"local-route; fwd and non-fwd tables match");
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 8734e19a889..067db77c412 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1154,7 +1154,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);