tcp: force deschedule if no send space available
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iae9f118f710153b6c0e390265039db7434e67ed8
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 15d949c..8b268c0 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -130,7 +130,8 @@
if (!(s->flags & SESSION_F_CUSTOM_TX))
{
s->flags |= SESSION_F_CUSTOM_TX;
- if (svm_fifo_set_event (s->tx_fifo))
+ if (svm_fifo_set_event (s->tx_fifo)
+ || transport_connection_is_descheduled (tc))
{
session_worker_t *wrk;
session_evt_elt_t *elt;
@@ -141,6 +142,7 @@
elt = session_evt_alloc_old (wrk);
elt->evt.session_index = tc->s_index;
elt->evt.event_type = SESSION_IO_EVT_TX;
+ tc->flags &= ~TRANSPORT_CONNECTION_F_DESCHED;
}
}
}