aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRyujiro Shibuya <Ryujiro.Shibuya@owmobility.com>2019-10-09 02:54:04 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-05 10:22:25 +0000
commitefb8db4c8a59ad5c9b66cad6f8b9c7862e3001aa (patch)
tree237fa6b37eaf9ae0849098dcd44625b6158a84fe /src
parenteeaf6e761423282a2308a51eed76873b758f1bbd (diff)
session: avoid old io dispatch if no slots left to send
Type: fix Signed-off-by: Ryujiro Shibuya <Ryujiro.Shibuya@owmobility.com> Change-Id: I8e1f6cbd905ad5c21aed1b2e358540d0fbd7fc47 (cherry picked from commit 2a1118411deed799e079bf34d3f6d8bccb37f8c5)
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/session_node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 615095fdc6c..268cd952c75 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1321,7 +1321,8 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
old_he = pool_elt_at_index (wrk->event_elts, wrk->old_head);
old_ti = clib_llist_prev_index (old_he, evt_list);
- while (!clib_llist_is_empty (wrk->event_elts, evt_list, old_he))
+ while (n_tx_packets < VLIB_FRAME_SIZE
+ && !clib_llist_is_empty (wrk->event_elts, evt_list, old_he))
{
clib_llist_index_t ei;
@@ -1330,7 +1331,7 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
session_event_dispatch_io (wrk, node, elt, thread_index, &n_tx_packets);
old_he = pool_elt_at_index (wrk->event_elts, wrk->old_head);
- if (n_tx_packets >= VLIB_FRAME_SIZE || ei == old_ti)
+ if (ei == old_ti)
break;
};