lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-id: <fbcff4b4d3bd.4aaf7b08@rwth-aachen.de>
Date:	Tue, 15 Sep 2009 11:31:20 +0000 (GMT)
From:	Christian Samsel <Christian.Samsel@...h-aachen.de>
To:	netdev@...r.kernel.org
Subject: [PATCH] early retransmit

This patch implements draft-ietf-tcpm-early-rexmt.
It prevents a rto by lowering the dupack threshold in case
we expect less dupacks then the usual threshold.
Signed-off-by: Christian Samsel <christian.samsel@...h-aachen.de>

---
 net/ipv4/tcp_input.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index af6d6fa..c0cc4fd 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2913,6 +2913,7 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
 	int do_lost = is_dupack || ((flag & FLAG_DATA_SACKED) &&
 				    (tcp_fackets_out(tp) > tp->reordering));
 	int fast_rexmit = 0, mib_idx;
+	u32 in_flight;
 
 	if (WARN_ON(!tp->packets_out && tp->sacked_out))
 		tp->sacked_out = 0;
@@ -3062,6 +3063,21 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
 	if (do_lost || (tcp_is_fack(tp) && tcp_head_timedout(sk)))
 		tcp_update_scoreboard(sk, fast_rexmit);
 	tcp_cwnd_down(sk, flag);
+        
+
+	/* draft-ietf-tcpm-early-rexmt: lowers dup ack threshold to prevent rto
+	 * in case we don't expect enough dup ack. if number of outstanding 
+	 * packets is less than four and there is either no unsent data ready
+	 * for transmission or the advertised window does not permit new 
+	 * segments.
+	 */
+	in_flight = tcp_packets_in_flight(tp);
+	if ( in_flight < 4 && (skb_queue_empty(&sk->sk_write_queue) || 
+		tcp_may_send_now(sk) == 0) )
+		tp->reordering = in_flight - 1;
+	else if (tp->reordering != sysctl_tcp_reordering)
+		tp->reordering = sysctl_tcp_reordering;
+	
 	tcp_xmit_retransmit_queue(sk);
 }
 
-- 
1.6.4.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ