summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/geneve/decap.c16
-rw-r--r--src/plugins/geneve/geneve.h5
-rw-r--r--src/plugins/gtpu/gtpu.h5
-rw-r--r--src/plugins/gtpu/gtpu_decap.c16
4 files changed, 22 insertions, 20 deletions
diff --git a/src/plugins/geneve/decap.c b/src/plugins/geneve/decap.c
index f42c0a88a5a..bd189913f71 100644
--- a/src/plugins/geneve/decap.c
+++ b/src/plugins/geneve/decap.c
@@ -870,10 +870,6 @@ ip_geneve_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;
@@ -968,8 +964,8 @@ ip_geneve_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&vxm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&vxm->vtep_table, b0, ip40, &last_vtep4,
+ &vxm->vtep4_u512))
#else
if (!vtep4_check (&vxm->vtep_table, b0, ip40, &last_vtep4))
#endif
@@ -1051,8 +1047,8 @@ ip_geneve_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&vxm->vtep_table, b1, ip41, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&vxm->vtep_table, b1, ip41, &last_vtep4,
+ &vxm->vtep4_u512))
#else
if (!vtep4_check (&vxm->vtep_table, b1, ip41, &last_vtep4))
#endif
@@ -1171,8 +1167,8 @@ ip_geneve_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&vxm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&vxm->vtep_table, b0, ip40, &last_vtep4,
+ &vxm->vtep4_u512))
#else
if (!vtep4_check (&vxm->vtep_table, b0, ip40, &last_vtep4))
#endif
diff --git a/src/plugins/geneve/geneve.h b/src/plugins/geneve/geneve.h
index d41a49a7ff6..0cc14214b9b 100644
--- a/src/plugins/geneve/geneve.h
+++ b/src/plugins/geneve/geneve.h
@@ -186,6 +186,11 @@ typedef struct
vnet_main_t *vnet_main;
u16 msg_id_base;
+ /* cache for last 8 geneve tunnel */
+#ifdef CLIB_HAVE_VEC512
+ vtep4_cache_t vtep4_u512;
+#endif
+
} geneve_main_t;
extern geneve_main_t geneve_main;
diff --git a/src/plugins/gtpu/gtpu.h b/src/plugins/gtpu/gtpu.h
index 8f3b654bcc8..59e340148fb 100644
--- a/src/plugins/gtpu/gtpu.h
+++ b/src/plugins/gtpu/gtpu.h
@@ -236,6 +236,11 @@ typedef struct
vlib_main_t *vlib_main;
vnet_main_t *vnet_main;
u32 flow_id_start;
+ /* cache for last 8 gtpu tunnel */
+#ifdef CLIB_HAVE_VEC512
+ vtep4_cache_t vtep4_u512;
+#endif
+
} gtpu_main_t;
extern gtpu_main_t gtpu_main;
diff --git a/src/plugins/gtpu/gtpu_decap.c b/src/plugins/gtpu/gtpu_decap.c
index 974ae8a8190..5657c08031b 100644
--- a/src/plugins/gtpu/gtpu_decap.c
+++ b/src/plugins/gtpu/gtpu_decap.c
@@ -804,10 +804,6 @@ ip_gtpu_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;
@@ -901,8 +897,8 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&gtm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&gtm->vtep_table, b0, ip40, &last_vtep4,
+ &gtm->vtep4_u512))
#else
if (!vtep4_check (&gtm->vtep_table, b0, ip40, &last_vtep4))
#endif
@@ -980,8 +976,8 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&gtm->vtep_table, b1, ip41, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&gtm->vtep_table, b1, ip41, &last_vtep4,
+ &gtm->vtep4_u512))
#else
if (!vtep4_check (&gtm->vtep_table, b1, ip41, &last_vtep4))
#endif
@@ -1096,8 +1092,8 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
if (is_ip4)
{
#ifdef CLIB_HAVE_VEC512
- if (!vtep4_check_vector
- (&gtm->vtep_table, b0, ip40, &last_vtep4, &vtep4_u512))
+ if (!vtep4_check_vector (&gtm->vtep_table, b0, ip40, &last_vtep4,
+ &gtm->vtep4_u512))
#else
if (!vtep4_check (&gtm->vtep_table, b0, ip40, &last_vtep4))
#endif