summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2017-08-22 17:56:46 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-08-25 22:04:28 +0000
commitd84ba85c0071a28fe888c912c3dc37f471b0caeb (patch)
treef669d71373fc75ceeab0d2c225440e832aa38e10 /src/vlib/node_funcs.h
parent206b2d4342b1c1b7715c7d442f582da02e5ec9b9 (diff)
TCP horizontal scaling
- Remove frame handoff support machinery. We haven't used it in a long time. - Configuration support for the local endpoints bihash table - Drop lookup failure packets in tcp46_syn_sent Change-Id: Icd51e6785f74661c741e76fac23d21c4cc998d17 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index c4c06454228..0059b9bec9e 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -216,24 +216,21 @@ always_inline vlib_frame_t *
vlib_get_frame_no_check (vlib_main_t * vm, uword frame_index)
{
vlib_frame_t *f;
- u32 thread_index = frame_index & VLIB_CPU_MASK;
- u32 offset = frame_index & VLIB_OFFSET_MASK;
- vm = vlib_mains[thread_index];
- f = vm->heap_base + offset;
+ f = vm->heap_base + (frame_index * VLIB_FRAME_ALIGN);
return f;
}
always_inline u32
vlib_frame_index_no_check (vlib_main_t * vm, vlib_frame_t * f)
{
- u32 i;
+ uword i;
- ASSERT (((uword) f & VLIB_CPU_MASK) == 0);
-
- vm = vlib_mains[f->thread_index];
+ ASSERT (((uword) f & (VLIB_FRAME_ALIGN - 1)) == 0);
i = ((u8 *) f - (u8 *) vm->heap_base);
- return i | f->thread_index;
+ ASSERT ((i / VLIB_FRAME_ALIGN) <= 0xFFFFFFFFULL);
+
+ return i / VLIB_FRAME_ALIGN;
}
always_inline vlib_frame_t *