From 33ce60d6759bbbfebb7d489aa591b696e140d870 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 14 Dec 2017 08:51:32 -0800 Subject: GRE tunnel key includes the FIB table - GRE tunnels with the same src,dst addresses are not the same tunnel - Two data-plane improvements: - the cached key was never updated and so useless - no need to dereference the tunnel's HW interface to get the sw_if_index Change-Id: I2f2ea6e08c759a810b753cec22c497e921a2ca01 Signed-off-by: Neale Ranns --- src/vnet/gre/gre.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/vnet/gre/gre.c') diff --git a/src/vnet/gre/gre.c b/src/vnet/gre/gre.c index 785476d0905..7660bbe1d4b 100644 --- a/src/vnet/gre/gre.c +++ b/src/vnet/gre/gre.c @@ -516,8 +516,10 @@ gre_init (vlib_main_t * vm) gm->protocol_info_by_name = hash_create_string (0, sizeof (uword)); gm->protocol_info_by_protocol = hash_create (0, sizeof (uword)); - gm->tunnel_by_key4 = hash_create (0, sizeof (uword)); - gm->tunnel_by_key6 = hash_create_mem (0, sizeof (u64[4]), sizeof (uword)); + gm->tunnel_by_key4 = + hash_create_mem (0, sizeof (gre_tunnel_key4_t), sizeof (uword)); + gm->tunnel_by_key6 = + hash_create_mem (0, sizeof (gre_tunnel_key6_t), sizeof (uword)); #define _(n,s) add_protocol (gm, GRE_PROTOCOL_##s, #s); foreach_gre_protocol -- cgit 1.2.3-korg