summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-10-05 18:36:24 +0000
committerps <ps@FreeBSD.org>2004-10-05 18:36:24 +0000
commitc8e4aa1cd58a20597b74285a3cc35ea24ba5c47c (patch)
treebcb9cd585361024879ec2c577e898534dec0d79d /sys/netinet/tcp_input.c
parent9536269a6d161e34a72dee84f6df6b4183f51be8 (diff)
downloadFreeBSD-src-c8e4aa1cd58a20597b74285a3cc35ea24ba5c47c.zip
FreeBSD-src-c8e4aa1cd58a20597b74285a3cc35ea24ba5c47c.tar.gz
- Estimate the amount of data in flight in sack recovery and use it
to control the packets injected while in sack recovery (for both retransmissions and new data). - Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c. - Add a new sysctl (net.inet.tcp.sack.initburst) that controls the number of sack retransmissions done upon initiation of sack recovery. Submitted by: Mohan Srinivasan <mohans@yahoo-inc.com>
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 3b70e99..b96b959 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -155,6 +155,12 @@ SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD,
&tcp_reass_overflows, 0,
"Global number of TCP Segment Reassembly Queue Overflows");
+static int tcp_sack_recovery_initburst = 3;
+SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO,
+ initburst, CTLFLAG_RW,
+ &tcp_sack_recovery_initburst, 0,
+ "Initial Number of Rexmits when sack recovery is set up");
+
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@@ -1980,9 +1986,9 @@ trimthenstep6:
tp->t_rtttime = 0;
if (tp->sack_enable) {
tcpstat.tcps_sack_recovery_episode++;
- tp->snd_cwnd =
- tp->t_maxseg *
- tp->t_dupacks;
+ tp->sack_newdata = tp->snd_nxt;
+ tp->snd_cwnd =
+ tp->t_maxseg * tcp_sack_recovery_initburst;
(void) tcp_output(tp);
tp->snd_cwnd +=
tp->snd_ssthresh;
OpenPOWER on IntegriCloud