[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1432266206.4060.119.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 21 May 2015 20:43:26 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: mleitner@...hat.com, edumazet@...gle.com, netdev@...r.kernel.org,
ycheng@...gle.com, mattmathis@...gle.com, cgallek@...gle.com,
kafai@...com, rapier@....edu
Subject: Re: [PATCH net-next] tcp: add tcpi_segs_in and tcpi_segs_out to
tcp_info
On Thu, 2015-05-21 at 23:25 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Wed, 20 May 2015 16:35:41 -0700
>
> > From: Marcelo Ricardo Leitner <mleitner@...hat.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@...hat.com>
> > Signed-off-by: Eric Dumazet <edumazet@...gle.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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists