aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-09-27 08:16:40 -0700
committerDave Barach <openvpp@barachs.net>2019-10-10 20:32:43 +0000
commitbe237bf02382854118986e8ea84c7544e42023f2 (patch)
tree85ef98b86f1a8949a54602c15b5510c7cccfda20 /src/vnet/session/session_node.c
parent5b1379be3e25df096d97dcd217965169fc6bb1b2 (diff)
tcp: retry lost retransmits
Add heuristic that detects lost retransmitted segments and retries sending them. Type: feature Change-Id: I34d1bb16799e1993779222eb2bfad4b40704159e Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index c5c2e915af5..9e53718b8dd 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1421,6 +1421,8 @@ session_node_cmp_event (session_event_t * e, svm_fifo_t * f)
case SESSION_IO_EVT_RX:
case SESSION_IO_EVT_TX:
case SESSION_IO_EVT_BUILTIN_RX:
+ case SESSION_IO_EVT_BUILTIN_TX:
+ case SESSION_IO_EVT_TX_FLUSH:
if (e->session_index == f->master_session_index)
return 1;
break;
@@ -1470,8 +1472,7 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e)
found = session_node_cmp_event (e, f);
if (found)
return 1;
- if (++index == mq->q->maxsize)
- index = 0;
+ index = (index + 1) % mq->q->maxsize;
}
/*
* Search pending events vector
@@ -1479,18 +1480,31 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e)
/* *INDENT-OFF* */
clib_llist_foreach (wrk->event_elts, evt_list,
- pool_elt_at_index (wrk->event_elts, wrk->old_head),
+ pool_elt_at_index (wrk->event_elts, wrk->new_head),
elt, ({
found = session_node_cmp_event (&elt->evt, f);
if (found)
{
clib_memcpy_fast (e, &elt->evt, sizeof (*e));
- break;
+ goto done;
}
+ }));
+ /* *INDENT-ON* */
+ /* *INDENT-OFF* */
+ clib_llist_foreach (wrk->event_elts, evt_list,
+ pool_elt_at_index (wrk->event_elts, wrk->old_head),
+ elt, ({
+ found = session_node_cmp_event (&elt->evt, f);
+ if (found)
+ {
+ clib_memcpy_fast (e, &elt->evt, sizeof (*e));
+ goto done;
+ }
}));
/* *INDENT-ON* */
+done:
return found;
}