summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-06-30 11:27:59 -0700
committerFlorin Coras <fcoras@cisco.com>2018-06-30 11:30:45 -0700
commit91ca462b58007299621a9fa6b6c06ed0b8a6040a (patch)
tree7d58429737ee6fb7bff639c56e55bbd626b3b7ff /src/vnet/session/session_node.c
parent0d5a195ce457a62b60ae59d451067f3fd26f57c9 (diff)
tcp: fix single loop prefetch
Also add single loop prefetch in session tx Change-Id: Ib2725a2552fcc1a65050d7a2eb10491a7b34db62 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 00874634551..aec353d3367 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -483,7 +483,13 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_buffer_t *b0;
u32 bi0;
- ASSERT (n_bufs >= 1);
+ if (n_left > 1)
+ {
+ pbi = smm->tx_buffers[thread_index][n_bufs - 2];
+ pb = vlib_get_buffer (vm, pbi);
+ vlib_prefetch_buffer_header (pb, STORE);
+ }
+
to_next[0] = bi0 = smm->tx_buffers[thread_index][--n_bufs];
b0 = vlib_get_buffer (vm, bi0);
session_tx_fill_buffer (vm, ctx, b0, &n_bufs, peek_data);