summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.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/transport.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/transport.c')
-rw-r--r--src/vnet/session/transport.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 3e723994752..49a4af71111 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -566,9 +566,14 @@ u8 *
format_transport_pacer (u8 * s, va_list * args)
{
spacer_t *pacer = va_arg (*args, spacer_t *);
+ vlib_main_t *vm = vlib_get_main ();
+ u64 now, diff;
- s = format (s, "bucket %u tokens/period %.3f last_update %x",
- pacer->bucket, pacer->tokens_per_period, pacer->last_update);
+ now = vm->clib_time.last_cpu_time;
+ diff = now - (pacer->last_update << SPACER_CPU_TICKS_PER_PERIOD_SHIFT);
+ s = format (s, "rate %u bucket %u t/p %.3f last_update %.3f",
+ pacer->bytes_per_sec, pacer->bucket, pacer->tokens_per_period,
+ diff * vm->clib_time.seconds_per_clock);
return s;
}