[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1430966751.14545.101.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 06 May 2015 19:45:51 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Derrick Pallas <pallas@...aki.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: expose listen socket backlog via SIOCGBACKLOG
On Wed, 2015-05-06 at 19:21 -0700, Derrick Pallas wrote:
> This IOCTL exposes the current backlog for a listen socket. This value can
> be useful in userland, e.g. in an overloaded transparent proxy that would
> rather push new connections into bypass than have then hang waiting for
> accept. Knowing the current backlog allows this process to make that
> decision and then begin intercepting connections again once the backlog
> falls to a reasonable level.
>
> Signed-off-by: Derrick Pallas <pallas@...aki.com>
> ---
No, we do not add new ioctl() anymore.
Note that getsockopt(fd, SOL_TCP, TCP_INFO, &info, sizeof(info)) already
provides the information you need in info.tcpi_unacked
(and info.tcpi_sacked contains sk_max_ack_backlog)
http://lxr.free-electrons.com/source/net/ipv4/tcp.c#L2630
--
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