[PATCH] real fix found? (Re: timestamps, tcp_paws_discard and out of order packets/acks (fwd))

Benjamin C.R. LaHaise (blah@kvack.org)
Thu, 22 Jul 1999 00:49:47 -0400 (EDT)


On Tue, 20 Jul 1999, Pete Wyckoff wrote:

> Why do some of the packets in leeloo's tcpdump appear out of order? (#7
> below is stamped before #6)

That's a definate characteristic of the link in question: it consists of 6
x 64Kb channels bundled together.

> It's not clear to me from rfc1323 that leeloo should be setting
> ts_recent for the dup ack packet it gets. Can an expert verify this
> is the correct behavior? If so, you're just hosed by the massive
> reordering. The trace from the other end does think it's sending the
> packets out in the correct order.

Ahh, you're right! I went back over RFC1323 and found out that the code
in tcp_replace_ts_recent seems to be the root of this problem. The
comment simply don't jive with the code or my reading of the rfc. I've
changed things to abid by RFC1323 and the commented change, and now things
are flying, even with reordered packets. My reading of RFC1323 is that it
tries to only update ts_recent for in-order packets, which makes sense if
packets are reordered.

-ben

Only in lin2.3/net/ipv4/: CVS
diff --exclude .* --exclude *.o -u lin2.3/net/ipv4/tcp_input.c tmp/linux/net/ipv4/tcp_input.c
--- lin2.3/net/ipv4/tcp_input.c Thu Jul 15 01:14:19 1999
+++ tmp/linux/net/ipv4/tcp_input.c Thu Jul 22 00:37:38 1999
@@ -214,7 +214,7 @@
__u32 start_seq, __u32 end_seq)
{
/* From draft-ietf-tcplw-high-performance: the correct
- * test is last_ack_sent <= end_seq.
+ * test is start_seq <= last_ack_sent <= end_seq.
* (RFC1323 stated last_ack_sent < end_seq.)
*
* HOWEVER: The current check contradicts the draft statements.
@@ -223,8 +223,7 @@
* unnecessary RTT overestimation.
* 1998/06/27 Andrey V. Savochkin <saw@msu.ru>
*/
- if (!before(end_seq, tp->last_ack_sent - sk->rcvbuf) &&
- !after(start_seq, tp->rcv_wup + tp->rcv_wnd)) {
+ if (between(tp->last_ack_sent, start_seq, end_seq)) {
/* PAWS bug workaround wrt. ACK frames, the PAWS discard
* extra check below makes sure this can only happen
* for pure ACK frames. -DaveM

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/