All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: mleitner@redhat.com, edumazet@google.com, netdev@vger.kernel.org,
	ycheng@google.com, mattmathis@google.com, cgallek@google.com,
	kafai@fb.com, rapier@psc.edu
Subject: Re: [PATCH net-next] tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info
Date: Thu, 21 May 2015 20:43:26 -0700	[thread overview]
Message-ID: <1432266206.4060.119.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20150521.232541.173137306546517818.davem@davemloft.net>

On Thu, 2015-05-21 at 23:25 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 20 May 2015 16:35:41 -0700
> 
> > From: Marcelo Ricardo Leitner <mleitner@redhat.com>
> > 
> > This patch tracks the total number of inbound and outbound segments on a
> > TCP socket. One may use this number to have an idea on connection
> > quality when compared against the retransmissions.
> > 
> > RFC4898 named these : tcpEStatsPerfSegsIn and tcpEStatsPerfSegsOut
> > 
> > These are a 32bit field each and can be fetched both from TCP_INFO
> > getsockopt() if one has a handle on a TCP socket, or from inet_diag
> > netlink facility (iproute2/ss patch will follow)
> > 
> > Note that tp->segs_out was placed near tp->snd_nxt for good data
> > locality and minimal performance impact, while tp->segs_in was placed
> > near tp->bytes_received for the same reason.
> > 
> > Join work with Eric Dumazet.
> > 
> > Note that received SYN are accounted on the listener, but sent SYNACK 
> > are not accounted.
> > 
> > Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied to net-next, thanks.

Thanks David.

I'll send a fix for the stuff I added earlier, as the spin_lock_bh() in
get_tcp_info() can deadlock since the caller inet_diag_dump_icsk() might
hold the &hashinfo->ehash_locks[i]

I need to instead use
u64_stats_fetch_begin_irq()/u64_stats_fetch_retry_irq()

(and as a bonus optimize 64bit arches)

  reply	other threads:[~2015-05-22  3:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 22:28 [PATCH v2 net-next 0/2] tcp: tcp_info extensions Eric Dumazet
2015-04-28 22:28 ` [PATCH v2 net-next 1/2] tcp: add tcpi_bytes_acked to tcp_info Eric Dumazet
2015-04-29 22:12   ` David Miller
2015-04-28 22:28 ` [PATCH v2 net-next 2/2] tcp: add tcpi_bytes_received " Eric Dumazet
2015-04-28 22:56   ` Yuchung Cheng
2015-04-28 23:07     ` Eric Dumazet
2015-04-29 22:12   ` David Miller
2015-05-12 13:08 ` [PATCH v2 net-next 0/2] tcp: tcp_info extensions Marcelo Ricardo Leitner
2015-05-12 20:31   ` Eric Dumazet
2015-05-12 22:21     ` Marcelo Ricardo Leitner
2015-05-20 23:35     ` [PATCH net-next] tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info Eric Dumazet
2015-05-21  0:06       ` Rick Jones
2015-05-21  0:37         ` Eric Dumazet
2015-05-21  0:48           ` Rick Jones
2015-05-21  0:52             ` Eric Dumazet
2015-05-21 12:38               ` Marcelo Ricardo Leitner
2015-05-21 19:41       ` Yuchung Cheng
2015-05-21 20:06         ` Eric Dumazet
2015-05-21 21:53         ` Marcelo Ricardo Leitner
2015-05-22  3:25       ` David Miller
2015-05-22  3:43         ` Eric Dumazet [this message]
2015-05-22  4:51           ` [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info() Eric Dumazet
2015-05-22 17:50             ` David Miller
2015-05-22 17:56               ` Eric Dumazet
2015-05-22 18:03                 ` Eric Dumazet
2015-05-22 18:08                   ` Eric Dumazet
2015-05-22 18:21                     ` David Miller
2015-05-22 18:12                 ` David Miller

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=1432266206.4060.119.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=cgallek@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kafai@fb.com \
    --cc=mattmathis@google.com \
    --cc=mleitner@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.