aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorRyujiro Shibuya <ryujiro.shibuya@owmobility.com>2020-10-22 05:26:32 +0000
committerFlorin Coras <fcoras@cisco.com>2020-10-21 23:13:36 -0700
commit6fa0988c02f56bb763ee17b11fdcf5372d50c5e9 (patch)
treed2a848c7f7816283005583df57e8a3fc1e0f1112 /src/vnet/tcp
parent055e64066d88576ed516e5f50de7ec3d5b6cef0a (diff)
tcp: updating time constans as timer tick changed
Type: fix Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: Ibe305b96f04ffdc95ddb07d144dc00119ae69a07
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp.c18
-rw-r--r--src/vnet/tcp/tcp.h14
2 files changed, 17 insertions, 15 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index d4da601f655..31ba276c9ee 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1421,14 +1421,16 @@ tcp_configuration_init (void)
tcp_cfg.rwnd_min_update_ack = 1;
tcp_cfg.max_gso_size = TCP_MAX_GSO_SZ;
- /* Time constants defined as timer tick (100ms) multiples */
- tcp_cfg.delack_time = 1; /* 0.1s */
- tcp_cfg.closewait_time = 20; /* 2s */
- tcp_cfg.timewait_time = 100; /* 10s */
- tcp_cfg.finwait1_time = 600; /* 60s */
- tcp_cfg.lastack_time = 300; /* 30s */
- tcp_cfg.finwait2_time = 300; /* 30s */
- tcp_cfg.closing_time = 300; /* 30s */
+ /* Time constants defined as timer tick (100us) multiples */
+ tcp_cfg.delack_time = 1000; /* 0.1s */
+ tcp_cfg.closewait_time = 20000; /* 2s */
+ tcp_cfg.timewait_time = 100000; /* 10s */
+ tcp_cfg.finwait1_time = 600000; /* 60s */
+ tcp_cfg.lastack_time = 300000; /* 30s */
+ tcp_cfg.finwait2_time = 300000; /* 30s */
+ tcp_cfg.closing_time = 300000; /* 30s */
+
+ /* This value is seconds */
tcp_cfg.cleanup_time = 0.1; /* 100ms */
}
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 29d30dc0691..a3b20c88682 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -164,25 +164,25 @@ typedef struct tcp_configuration_
u32 rwnd_min_update_ack;
/** Delayed ack time (disabled) */
- u16 delack_time;
+ u32 delack_time;
/** Timer ticks to wait for close from app */
- u16 closewait_time;
+ u32 closewait_time;
/** Timer ticks to wait in time-wait. Also known as 2MSL */
- u16 timewait_time;
+ u32 timewait_time;
/** Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack */
- u16 finwait1_time;
+ u32 finwait1_time;
/** Timer ticks to wait in last ack for ack */
- u16 lastack_time;
+ u32 lastack_time;
/** Timer ticks to wait in fin-wait2 for fin */
- u16 finwait2_time;
+ u32 finwait2_time;
/** Timer ticks to wait in closing for fin ack */
- u16 closing_time;
+ u32 closing_time;
/** Time to wait (sec) before cleaning up the connection */
f32 cleanup_time;