summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-13 20:39:43 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-03-19 14:48:15 +0000
commit6080e0d15e152e38811b01306eef6719a682c007 (patch)
tree4a3c344b1c9283d97908be78e4164bcbefeb2e1d /src/vnet/session/session_node.c
parent70f879d2852dfc042ad0911a4a6e4a1714c0eb83 (diff)
tcp: force deschedule if no send space available
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iae9f118f710153b6c0e390265039db7434e67ed8
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index b1c2428874e..b5f4321c9a8 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -872,7 +872,7 @@ session_tx_fifo_read_and_snd_i (session_worker_t * wrk,
(ctx->s->session_state >= SESSION_STATE_TRANSPORT_CLOSED))
return SESSION_TX_OK;
max_burst -= n_custom_tx;
- if (!max_burst)
+ if (!max_burst || (ctx->s->flags & SESSION_F_CUSTOM_TX))
{
session_evt_add_old (wrk, elt);
return SESSION_TX_OK;
@@ -883,18 +883,18 @@ session_tx_fifo_read_and_snd_i (session_worker_t * wrk,
if (!ctx->sp.snd_space)
{
- /* This flow queue is "empty" so it should be re-evaluated before
- * the ones that have data to send. */
- if (PREDICT_TRUE (!ctx->sp.flags))
- session_evt_add_head_old (wrk, elt);
+ /* If the deschedule flag was set, remove session from scheduler.
+ * Transport is responsible for rescheduling this session. */
+ if (ctx->sp.flags & TRANSPORT_SND_F_DESCHED)
+ transport_connection_deschedule (ctx->tc);
/* Request to postpone the session, e.g., zero-wnd and transport
* is not currently probing */
else if (ctx->sp.flags & TRANSPORT_SND_F_POSTPONE)
session_evt_add_old (wrk, elt);
- /* If the deschedule flag was set, remove session from scheduler.
- * Transport is responsible for rescheduling this session. */
+ /* This flow queue is "empty" so it should be re-evaluated before
+ * the ones that have data to send. */
else
- transport_connection_deschedule (ctx->tc);
+ session_evt_add_head_old (wrk, elt);
return SESSION_TX_NO_DATA;
}