summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-01-26 14:10:43 -0800
committerFlorin Coras <florin.coras@gmail.com>2021-01-26 22:11:01 +0000
commit1b9d2c2c9d21b5a29527a738601055f67165c7ca (patch)
tree97e3f30e0cf817e928a6b75a4e9cf05fc4541296 /src/vnet/session/application_local.c
parentb85b0df2a039b694fb2f3c09a01decfb89d7bce2 (diff)
session: clear ct fifo flag prior to notification
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6db15780d87426eee852aa020c50cbdf45dc1f95
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r--src/vnet/session/application_local.c13
1 files changed, 7 insertions, 6 deletions
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;