summaryrefslogtreecommitdiffstats
path: root/src/vnet/gre/gre.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-12-14 08:51:32 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-12-16 19:39:26 +0000
commit33ce60d6759bbbfebb7d489aa591b696e140d870 (patch)
treeeda75c292952f754813648b5a49d0ca5f17a69f3 /src/vnet/gre/gre.c
parent8e66b9bf4ba90279631e6a0e8ccc2eab5f9156c2 (diff)
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 <nranns@cisco.com>
Diffstat (limited to 'src/vnet/gre/gre.c')
-rw-r--r--src/vnet/gre/gre.c6
1 files changed, 4 insertions, 2 deletions
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