Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: John Heffner <johnwheffner@gmail.com>
Cc: Jesse Young <jlyo@jlyo.org>, netdev@vger.kernel.org
Subject: Re: Missing TCP SYN on loopback, retransmits after 1s
Date: Wed, 23 Nov 2011 07:13:22 +0100	[thread overview]
Message-ID: <1322028802.1298.10.camel@edumazet-laptop> (raw)
In-Reply-To: <1322028540.1298.8.camel@edumazet-laptop>

Le mercredi 23 novembre 2011 à 07:09 +0100, Eric Dumazet a écrit :
> Le mercredi 23 novembre 2011 à 06:58 +0100, Eric Dumazet a écrit :
> 
> > First connection went well.
> > 
> > Now we try to reuse tuple  (ports 49374, 8009 on loopback) while a socket is in TIMEWAIT, and first
> > SYN packet (time 06:48:20.337335) is dropped (considered as a packet part of previous session)
> > 
> > Now why the first SYN packet is dropped and not the second one, I dont know yet.
> 
> 
> in netstat -s output, the suspect increasing counter is :
> 
> "45 congestion windows recovered without slow start after partial ack"
> 
> 

# vi +2831 net/ipv4/tcp_input.c

/* Undo during loss recovery after partial ACK. */
static int tcp_try_undo_loss(struct sock *sk)
{
        struct tcp_sock *tp = tcp_sk(sk);

        if (tcp_may_undo(tp)) {
                struct sk_buff *skb;
                tcp_for_write_queue(skb, sk) {
                        if (skb == tcp_send_head(sk))
                                break;
                        TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
                }

                tcp_clear_all_retrans_hints(tp);

                DBGUNDO(sk, "partial loss");
                tp->lost_out = 0;
                tcp_undo_cwr(sk, true);
HERE:            NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPLOSSUNDO);
                inet_csk(sk)->icsk_retransmits = 0;
                tp->undo_marker = 0;
                if (tcp_is_sack(tp))
                        tcp_set_ca_state(sk, TCP_CA_Open);
                return 1;
        }
        return 0;
}

      reply	other threads:[~2011-11-23  6:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  0:13 Missing TCP SYN on loopback, retransmits after 1s Jesse Young
2011-11-23  0:23 ` David Miller
2011-11-23  0:37   ` Jesse Young
2011-11-23  1:44     ` Hagen Paul Pfeifer
2011-11-23 14:38     ` Eric Dumazet
2011-11-23 22:29       ` David Miller
     [not found]         ` <c873451a-71aa-418b-96e2-d8875e7fec3e@googlegroups.com>
2013-03-23 16:58           ` Eric Dumazet
2013-03-23 19:17             ` Jason Oster
2013-03-24  0:08               ` Jason Oster
2011-11-23  2:06 ` John Heffner
2011-11-23  5:24   ` Eric Dumazet
2011-11-23  5:58     ` Eric Dumazet
2011-11-23  6:09       ` Eric Dumazet
2011-11-23  6:13         ` Eric Dumazet [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=1322028802.1298.10.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=jlyo@jlyo.org \
    --cc=johnwheffner@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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