ip: remove unused function parameter

Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb
diff --git a/src/plugins/gbp/gbp_policy_dpo.h b/src/plugins/gbp/gbp_policy_dpo.h
index 1dc11ab..77ca5d9 100644
--- a/src/plugins/gbp/gbp_policy_dpo.h
+++ b/src/plugins/gbp/gbp_policy_dpo.h
@@ -96,7 +96,7 @@
   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 2ee15cf..8c1487c 100644
--- a/src/plugins/svs/svs.c
+++ b/src/plugins/svs/svs.c
@@ -304,8 +304,7 @@
 	      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 d631350..f220eb0 100644
--- a/src/plugins/unittest/fib_test.c
+++ b/src/plugins/unittest/fib_test.c
@@ -714,7 +714,7 @@
                 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 @@
 
     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 @@
              "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 @@
 
     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 7cf2368..3342ed6 100644
--- a/src/vnet/cop/ip6_whitelist.c
+++ b/src/vnet/cop/ip6_whitelist.c
@@ -56,7 +56,6 @@
   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 @@
                &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 @@
                &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 @@
                &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 617fb9e..ec2cd02 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -788,10 +788,10 @@
 	    }
 
 	    /* 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 @@
 	    }
 
 	    /* 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 ba90c5f..cecfcbd 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -319,7 +319,7 @@
 					       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 583a17f..50b360b 100644
--- a/src/vnet/fib/ip6_fib.h
+++ b/src/vnet/fib/ip6_fib.h
@@ -64,8 +64,7 @@
                                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 fbdf0b9..252bdf9 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1140,7 +1140,7 @@
     (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 44744c0..7f6eb0c 100644
--- a/src/vnet/ip/ip6_forward.h
+++ b/src/vnet/ip/ip6_forward.h
@@ -108,11 +108,9 @@
 	  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 @@
 	  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);