From 107e7d4b5375295e94e01653e3cf064ea6647064 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 11 Apr 2017 09:55:19 -0700 Subject: Remove usued, redundant and deprecated code from lookup.h Change-Id: Ic16bc10d0b2877b2afdf052615f9334f31b9519f Signed-off-by: Neale Ranns --- src/plugins/ioam/encap/ip6_ioam_trace.c | 4 +--- src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c | 3 +-- src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c | 10 ++++------ 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src/plugins/ioam') diff --git a/src/plugins/ioam/encap/ip6_ioam_trace.c b/src/plugins/ioam/encap/ip6_ioam_trace.c index 299ee88f..3ec3ea82 100644 --- a/src/plugins/ioam/encap/ip6_ioam_trace.c +++ b/src/plugins/ioam/encap/ip6_ioam_trace.c @@ -254,13 +254,11 @@ int ip6_hbh_ioam_trace_data_list_handler (vlib_buffer_t * b, ip6_header_t * ip, ip6_hop_by_hop_option_t * opt) { - ip6_main_t *im = &ip6_main; - ip_lookup_main_t *lm = &im->lookup_main; ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; u8 elt_index = 0; ioam_trace_option_t *trace = (ioam_trace_option_t *) opt; u32 adj_index = vnet_buffer (b)->ip.adj_index[VLIB_TX]; - ip_adjacency_t *adj = ip_get_adjacency (lm, adj_index); + ip_adjacency_t *adj = adj_get (adj_index); time_u64_t time_u64; u32 *elt; int rv = 0; diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c index 6c04d9af..88d7d205 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c @@ -265,8 +265,7 @@ vxlan_gpe_enable_disable_ioam_for_dest (vlib_main_t * vm, continue; } - adj0 = - ip_get_adjacency (&(ip4_main.lookup_main), adj_index0); + adj0 = adj_get (adj_index0); sw_if_index0 = adj0->rewrite_header.sw_if_index; if (~0 == sw_if_index0) diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c index 48edb4b0..f3d03b67 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c @@ -302,11 +302,10 @@ vxlan_gpe_ioam_trace_data_list_handler (vlib_buffer_t * b, { u16 tx_if = 0; u32 adj_index = vnet_buffer (b)->ip.adj_index[VLIB_TX]; - ip4_main_t *im4 = &ip4_main; - ip_lookup_main_t *lm = &im4->lookup_main; + if (use_adj) { - ip_adjacency_t *adj = ip_get_adjacency (lm, adj_index); + ip_adjacency_t *adj = adj_get (adj_index); tx_if = adj->rewrite_header.sw_if_index & 0xFFFF; } @@ -330,11 +329,10 @@ vxlan_gpe_ioam_trace_data_list_handler (vlib_buffer_t * b, { u16 tx_if = 0; u32 adj_index = vnet_buffer (b)->ip.adj_index[VLIB_TX]; - ip6_main_t *im6 = &ip6_main; - ip_lookup_main_t *lm = &im6->lookup_main; + if (use_adj) { - ip_adjacency_t *adj = ip_get_adjacency (lm, adj_index); + ip_adjacency_t *adj = adj_get (adj_index); tx_if = adj->rewrite_header.sw_if_index & 0xFFFF; } -- cgit 1.2.3-korg