summaryrefslogtreecommitdiffstats
path: root/src/vnet/gre/interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-04-09 07:34:08 -0400
committerMatthew Smith <mgsmith@netgate.com>2020-04-22 16:05:10 +0000
commit07bbaef593939e9d03ba131e03296587472514ce (patch)
tree9b8d175c427094064716fcb0068d431913f7d4f0 /src/vnet/gre/interface.c
parent0b04209edac55487c108ff5f2faf51cbd4c2cee7 (diff)
gre: Optimise encap node for tunnel types
Type: improvement Change-Id: I6627e22110be94c8127486ae009761494e734c04 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/gre/interface.c')
-rw-r--r--src/vnet/gre/interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index 6efa3da13b8..f5a1bde527f 100644
--- a/src/vnet/gre/interface.c
+++ b/src/vnet/gre/interface.c
@@ -377,7 +377,12 @@ vnet_gre_tunnel_add (vnet_gre_tunnel_add_del_args_t * a,
}
/* Set GRE tunnel interface output node (not used for L3 payload) */
- vnet_set_interface_output_node (vnm, hw_if_index, gre_encap_node.index);
+ if (GRE_TUNNEL_TYPE_ERSPAN == t->type)
+ vnet_set_interface_output_node (vnm, hw_if_index,
+ gre_erspan_encap_node.index);
+ else
+ vnet_set_interface_output_node (vnm, hw_if_index,
+ gre_teb_encap_node.index);
hi = vnet_get_hw_interface (vnm, hw_if_index);
sw_if_index = hi->sw_if_index;