summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-11-21 04:20:42 -0800
committerFlorin Coras <fcoras@cisco.com>2017-11-21 04:49:22 -0800
commit6a9b68b268f9dc87a221fac0ec9b0b67c16106ca (patch)
tree62936f457e0f1b26bf41c25708b4d382ae0a20bb /src
parente9f92b47bbdbed3a5ca48c752bc794506835673b (diff)
session: unset fifo event before reading fifo size
Change-Id: Ic32a76e5f7c48fd52f2e93ee18ba23fb6ad1b855 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/session_node.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index bc24d952234..78116178d2b 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -168,6 +168,9 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
return 0;
}
+ /* Allow enqueuing of a new event */
+ svm_fifo_unset_event (s0->server_tx_fifo);
+
/* Check how much we can pull. */
max_dequeue0 = svm_fifo_max_dequeue (s0->server_tx_fifo);
@@ -183,10 +186,7 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
/* Nothing to read return */
if (max_dequeue0 == 0)
- {
- svm_fifo_unset_event (s0->server_tx_fifo);
- return 0;
- }
+ return 0;
/* Ensure we're not writing more than transport window allows */
if (max_dequeue0 < snd_space0)
@@ -249,8 +249,6 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
}
ASSERT (n_bufs >= n_bufs_per_frame);
}
- /* Allow enqueuing of a new event */
- svm_fifo_unset_event (s0->server_tx_fifo);
vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
while (left_to_snd0 && n_left_to_next)