diff options
author | Florin Coras <fcoras@cisco.com> | 2019-07-01 09:51:54 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-07-01 21:39:10 +0000 |
commit | 7910feb5af2f29e9c6ccfe220917a79e925946cc (patch) | |
tree | b2ab8a23d976286b37a7211e6c27e39b932c0644 | |
parent | 389c82286db6bbe7242641e3261bd920a76cd553 (diff) |
ip: fix ip lookup for arm
Type:fix
Fixes: cb54e3c
Change-Id: I3120eaabdc00a6c1248cf7eb81f2075983836dfd
Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r-- | src/vnet/ip/ip4_forward.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/vnet/ip/ip4_forward.h b/src/vnet/ip/ip4_forward.h index 6dad1d6154a..1750ac67eab 100644 --- a/src/vnet/ip/ip4_forward.h +++ b/src/vnet/ip/ip4_forward.h @@ -270,37 +270,20 @@ ip4_lookup_inline (vlib_main_t * vm, ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, b[0]); ip_lookup_set_buffer_fib_index (im->fib_index_by_sw_if_index, b[1]); - if (!lookup_for_responses_to_locally_received_packets) - { - mtrie0 = &ip4_fib_get (vnet_buffer (b[0])->ip.fib_index)->mtrie; - mtrie1 = &ip4_fib_get (vnet_buffer (b[1])->ip.fib_index)->mtrie; + mtrie0 = &ip4_fib_get (vnet_buffer (b[0])->ip.fib_index)->mtrie; + mtrie1 = &ip4_fib_get (vnet_buffer (b[1])->ip.fib_index)->mtrie; - leaf0 = ip4_fib_mtrie_lookup_step_one (mtrie0, dst_addr0); - leaf1 = ip4_fib_mtrie_lookup_step_one (mtrie1, dst_addr1); - } + leaf0 = ip4_fib_mtrie_lookup_step_one (mtrie0, dst_addr0); + leaf1 = ip4_fib_mtrie_lookup_step_one (mtrie1, dst_addr1); - if (!lookup_for_responses_to_locally_received_packets) - { - leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, dst_addr0, 2); - leaf1 = ip4_fib_mtrie_lookup_step (mtrie1, leaf1, dst_addr1, 2); - } + leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, dst_addr0, 2); + leaf1 = ip4_fib_mtrie_lookup_step (mtrie1, leaf1, dst_addr1, 2); - if (!lookup_for_responses_to_locally_received_packets) - { - leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, dst_addr0, 3); - leaf1 = ip4_fib_mtrie_lookup_step (mtrie1, leaf1, dst_addr1, 3); - } + leaf0 = ip4_fib_mtrie_lookup_step (mtrie0, leaf0, dst_addr0, 3); + leaf1 = ip4_fib_mtrie_lookup_step (mtrie1, leaf1, dst_addr1, 3); - if (lookup_for_responses_to_locally_received_packets) - { - lb_index0 = vnet_buffer (b[0])->ip.adj_index[VLIB_RX]; - lb_index1 = vnet_buffer (b[1])->ip.adj_index[VLIB_RX]; - } - else - { - lb_index0 = ip4_fib_mtrie_leaf_get_adj_index (leaf0); - lb_index1 = ip4_fib_mtrie_leaf_get_adj_index (leaf1); - } + lb_index0 = ip4_fib_mtrie_leaf_get_adj_index (leaf0); + lb_index1 = ip4_fib_mtrie_leaf_get_adj_index (leaf1); ASSERT (lb_index0 && lb_index1); lb0 = load_balance_get (lb_index0); |