Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tcp: improve timestamp rtt accuracy
[vpp.git]
/
src
/
vnet
/
tcp
/
tcp.c
diff --git
a/src/vnet/tcp/tcp.c
b/src/vnet/tcp/tcp.c
index
c30a693
..
938a863
100644
(file)
--- a/
src/vnet/tcp/tcp.c
+++ b/
src/vnet/tcp/tcp.c
@@
-681,7
+681,7
@@
tcp_init_snd_vars (tcp_connection_t * tc)
tc->snd_una = tc->iss;
tc->snd_nxt = tc->iss + 1;
tc->snd_una_max = tc->snd_nxt;
tc->snd_una = tc->iss;
tc->snd_nxt = tc->iss + 1;
tc->snd_una_max = tc->snd_nxt;
- tc->srtt =
100;
/* 100 ms */
+ tc->srtt =
0.1 * THZ;
/* 100 ms */
if (!tcp_cfg.csum_offload)
tc->cfg_flags |= TCP_CFG_F_NO_CSUM_OFFLOAD;
if (!tcp_cfg.csum_offload)
tc->cfg_flags |= TCP_CFG_F_NO_CSUM_OFFLOAD;
@@
-1361,11
+1361,6
@@
tcp_main_enable (vlib_main_t * vm)
pool_init_fixed (tm->half_open_connections,
tcp_cfg.preallocated_half_open_connections);
pool_init_fixed (tm->half_open_connections,
tcp_cfg.preallocated_half_open_connections);
- /* Initialize clocks per tick for TCP timestamp. Used to compute
- * monotonically increasing timestamps. */
- tm->tstamp_ticks_per_clock = vm->clib_time.seconds_per_clock
- / TCP_TSTAMP_RESOLUTION;
-
if (num_threads > 1)
{
clib_spinlock_init (&tm->half_open_lock);
if (num_threads > 1)
{
clib_spinlock_init (&tm->half_open_lock);