summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gpe
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/vxlan-gpe')
-rw-r--r--src/vnet/vxlan-gpe/decap.c16
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.h5
2 files changed, 11 insertions, 10 deletions
diff --git a/src/vnet/vxlan-gpe/decap.c b/src/vnet/vxlan-gpe/decap.c
index aea793b82b6..035e8a3fd6a 100644
--- a/src/vnet/vxlan-gpe/decap.c
+++ b/src/vnet/vxlan-gpe/decap.c
@@ -793,10 +793,6 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
vtep6_key_t last_vtep6; /* last IPv6 address / fib index
matching a local VTEP address */
vlib_buffer_t *bufs[VLIB_FRAME_SIZE], **b = bufs;
-#ifdef CLIB_HAVE_VEC512
- vtep4_cache_t vtep4_u512;
- clib_memset (&vtep4_u512, 0, sizeof (vtep4_u512));
-#endif
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -889,8 +885,8 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&ngm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&ngm->vtep_table, b0, ip40, &last_vtep4,
+ &ngm->vtep4_u512))
#else
if (!vtep4_check (&ngm->vtep_table, b0, ip40, &last_vtep4))
#endif
@@ -972,8 +968,8 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&ngm->vtep_table, b1, ip41, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&ngm->vtep_table, b1, ip41, &last_vtep4,
+ &ngm->vtep4_u512))
#else
if (!vtep4_check (&ngm->vtep_table, b1, ip41, &last_vtep4))
#endif
@@ -1091,8 +1087,8 @@ ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&ngm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&ngm->vtep_table, b0, ip40, &last_vtep4,
+ &ngm->vtep4_u512))
#else
if (!vtep4_check (&ngm->vtep_table, b0, ip40, &last_vtep4))
#endif
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.h b/src/vnet/vxlan-gpe/vxlan_gpe.h
index e246827c156..0f8250a1788 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.h
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.h
@@ -220,6 +220,11 @@ typedef struct
/** State convenience vnet_main_t */
vnet_main_t *vnet_main;
+ /* cache for last 8 vxlan_gpe tunnel */
+#ifdef CLIB_HAVE_VEC512
+ vtep4_cache_t vtep4_u512;
+#endif
+
/** List of next nodes for the decap indexed on protocol */
uword decap_next_node_list[VXLAN_GPE_PROTOCOL_MAX];
} vxlan_gpe_main_t;