lkml.org 
[lkml]   [1999]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: TCP Hangs with Solaris: SOLVED by Andrea Arcangeli's workaround

Can people try this patch instead? It, unlike Andrea's patch:

1) does not penalize working stacks, and does not even penalize
broken Solaris machines when the FIN makes it there the first
time

2) is on by default

The debugging printk is there so I can know if the code is actually
working, of course it will be gone in the final version. When people
test this to machines where they know the problem happened, please
include in your report whether 'dmesg' showed my debugging message in
the kernel logs.

Thanks.

--- net/ipv4/tcp_output.c.~1~ Mon Feb 22 10:17:22 1999
+++ net/ipv4/tcp_output.c Fri Feb 26 12:38:47 1999
@@ -580,6 +580,18 @@
if(tp->af_specific->rebuild_header(sk))
return 1; /* Routing failure or similar. */

+ /* Solaris sucks. */
+ if(skb->len > 0 &&
+ (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) &&
+ tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) {
+#if 1
+ printk("TCP: Doing Solaris hack for [%p:%08x:%04x:%08x]\n",
+ skb, sk->daddr, sk->dport, tp->snd_una);
+#endif
+ skb_trim(skb, 0);
+ skb->csum = 0;
+ }
+
/* Ok, we're gonna send it out, update state. */
TCP_SKB_CB(skb)->sacked |= TCPCB_SACKED_RETRANS;
tp->retrans_out++;
@@ -592,6 +604,7 @@
skb = skb_copy(skb, GFP_ATOMIC);
else
skb = skb_clone(skb, GFP_ATOMIC);
+
tcp_transmit_skb(sk, skb);

/* Update global TCP statistics and return success. */
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.021 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site