From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: kafai@fb.com, netdev@vger.kernel.org, kernel-team@fb.com,
rapier@psc.edu, edumazet@google.com, mleitner@redhat.com,
ncardwell@google.com, ycheng@google.com
Subject: Re: [PATCH net] tcp: fix tcpi_segs_in after connection establishment
Date: Mon, 07 Mar 2016 15:47:43 -0500 (EST) [thread overview]
Message-ID: <20160307.154743.670423088656600403.davem@davemloft.net> (raw)
In-Reply-To: <1457285361.2663.24.camel@edumazet-ThinkPad-T530>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 06 Mar 2016 09:29:21 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> If final packet (ACK) of 3WHS is lost, it appears we do not properly
> account the following incoming segment into tcpi_segs_in
>
> While we are at it, starts segs_in with one, to count the SYN packet.
>
> We do not yet count number of SYN we received for a request sock, we
> might add this someday.
>
> packetdrill script showing proper behavior after fix :
>
> // Tests tcpi_segs_in when 3rd packet (ACK) of 3WHS is lost
> 0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
> +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> +0 bind(3, ..., ...) = 0
> +0 listen(3, 1) = 0
>
> +0 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop>
> +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
> +.020 < P. 1:1001(1000) ack 1 win 32792
>
> +0 accept(3, ..., ...) = 4
>
> +.000 %{ assert tcpi_segs_in == 2, 'tcpi_segs_in=%d' % tcpi_segs_in }%
>
> Fixes: 2efd055c53c06 ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2016-03-07 20:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 23:57 [RFC PATCH net-next] tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In Martin KaFai Lau
2016-03-05 0:33 ` Eric Dumazet
2016-03-06 17:29 ` [PATCH net] tcp: fix tcpi_segs_in after connection establishment Eric Dumazet
2016-03-07 20:47 ` 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=20160307.154743.670423088656600403.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=mleitner@redhat.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=rapier@psc.edu \
--cc=ycheng@google.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).