Module Name: src
Committed By: yamt
Date: Fri Apr 8 11:15:11 UTC 2011
Modified Files:
src/sys/netinet: tcp_congctl.c
Log Message:
simplify code a little. no functional changes.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/netinet/tcp_congctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet/tcp_congctl.c
diff -u src/sys/netinet/tcp_congctl.c:1.15 src/sys/netinet/tcp_congctl.c:1.16
--- src/sys/netinet/tcp_congctl.c:1.15 Mon Apr 28 20:24:09 2008
+++ src/sys/netinet/tcp_congctl.c Fri Apr 8 11:15:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_congctl.c,v 1.15 2008/04/28 20:24:09 martin Exp $ */
+/* $NetBSD: tcp_congctl.c,v 1.16 2011/04/08 11:15:11 yamt Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2005, 2006 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_congctl.c,v 1.15 2008/04/28 20:24:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_congctl.c,v 1.16 2011/04/08 11:15:11 yamt Exp $");
#include "opt_inet.h"
#include "opt_tcp_debug.h"
@@ -617,6 +617,7 @@
static int
tcp_newreno_fast_retransmit(struct tcpcb *tp, const struct tcphdr *th)
{
+
if (SEQ_LT(th->th_ack, tp->snd_high)) {
/*
* False fast retransmit after timeout.
@@ -624,14 +625,11 @@
*/
tp->t_dupacks = 0;
return 1;
- } else {
- /*
- * Fast retransmit is same as reno.
- */
- return tcp_reno_fast_retransmit(tp, th);
}
-
- return 0;
+ /*
+ * Fast retransmit is same as reno.
+ */
+ return tcp_reno_fast_retransmit(tp, th);
}
/*