netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sri@us.ibm.com
Cc: netdev@vger.kernel.org
Subject: Re: [RFC PATCH] TCP connection timesout if ICMP frag needed is delayed
Date: Wed, 21 May 2008 16:43:08 -0700 (PDT)	[thread overview]
Message-ID: <20080521.164308.147927212.davem@davemloft.net> (raw)
In-Reply-To: <1211413030.14663.42.camel@w-sridhar2.beaverton.ibm.com>

From: Sridhar Samudrala <sri@us.ibm.com>
Date: Wed, 21 May 2008 16:37:10 -0700

> We are seeing an issue with TCP in handling an ICMP frag needed
> message that is received after net.ipv4.tcp_retries1 retransmits.
> The default value of retries1 is 3. So if the path mtu changes
> and ICMP frag needed is lost for the first 3 retransmits or if
> it gets delayed until 3 retransmits are done, TCP doesn't update
> MSS correctly and continues to retransmit the orginal message
> until it timesout after tcp_retries2 retransmits.
> I am seeing this issue even with the latest 2.6.25.4 kernel.
> 
> In tcp_retransmit_timer(), when retransmits counter exceeds 
> tcp_retries1 value, the dst cache entry of the socket is reset.
> At this time, if we receive an ICMP frag needed message, the 
> dst entry gets updated with the new MTU, but the TCP sockets
> dst_cache entry remains NULL.
> So the next time when we try to retransmit after the ICMP frag
> needed is received, tcp_retransmit_skb() gets called. Here the
> cur_mss value is calculated at the start of the routine with
> a NULL sk_dst_cache. Instead we should call tcp_current_mss after
> the rebuild_header that caches the dst entry with the updated mtu.
> Also the rebuild_header should be called before tcp_fragment
> so that skb is fragmented if the mss goes down.
> 
 ...
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>

Excellent analysis and the patch looks fine to me, applied.

I'll queue this up to -stable as well.

      reply	other threads:[~2008-05-21 23:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 23:37 [RFC PATCH] TCP connection timesout if ICMP frag needed is delayed Sridhar Samudrala
2008-05-21 23:43 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080521.164308.147927212.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).