From 1b9d2c2c9d21b5a29527a738601055f67165c7ca Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 26 Jan 2021 14:10:43 -0800 Subject: session: clear ct fifo flag prior to notification Type: fix Signed-off-by: Florin Coras Change-Id: I6db15780d87426eee852aa020c50cbdf45dc1f95 --- src/vnet/session/application_local.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index 18e26f2c1cc..478fc7a933b 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -520,13 +520,14 @@ ct_custom_tx (void *session, transport_send_params_t * sp) session_t *s = (session_t *) session; if (session_has_transport (s)) return 0; - /* If event enqueued towards peer, remove from scheduler and - * remove session tx flag, i.e., accept new tx events */ + /* If event enqueued towards peer, remove from scheduler and remove + * session tx flag, i.e., accept new tx events. Unset fifo flag now to + * avoid missing events if peer did not clear fifo flag yet, which is + * interpreted as successful notification and session is descheduled. */ + svm_fifo_unset_event (s->tx_fifo); if (!ct_session_tx (s)) - { - sp->flags = TRANSPORT_SND_F_DESCHED; - svm_fifo_unset_event (s->tx_fifo); - } + sp->flags = TRANSPORT_SND_F_DESCHED; + /* The scheduler uses packet count as a means of upper bounding the amount * of work done per dispatch. So make it look like we have sent something */ return 1; -- cgit 1.2.3-korg