From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v3] tcp: ioctl type SIOCOUTQNSD returns amount of data not sent Date: Thu, 10 Mar 2011 14:16:05 -0800 (PST) Message-ID: <20110310.141605.189705143.davem@davemloft.net> References: <1299441595-18455-1-git-send-email-sledz@dresearch.de> <20110309.140951.232741403.davem@davemloft.net> <20110310221205.GF3121@nuttenaction> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sledz@dresearch.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk, kuznet@ms2.inr.ac.ru, pekkas@netcore.fi, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, m.schuknecht@dresearch.de To: hagen@jauu.net Return-path: In-Reply-To: <20110310221205.GF3121@nuttenaction> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Hagen Paul Pfeifer Date: Thu, 10 Mar 2011 23:12:05 +0100 > * David Miller | 2011-03-09 14:09:51 [-0800]: > >>From: Steffen Sledz >>Date: Sun, 6 Mar 2011 20:59:55 +0100 >> >>> From: Mario Schuknecht >>> >>> In contrast to SIOCOUTQ which returns the amount of data sent >>> but not yet acknowledged plus data not yet sent this patch only >>> returns the data not sent. >>> >>> For various methods of live streaming bitrate control it may >>> be helpful to know how much data are in the tcp outqueue are >>> not sent yet. >>> >>> Signed-off-by: Mario Schuknecht >>> Signed-off-by: Steffen Sledz >> >>Applied, thanks. > > A little bit late - but why not using struct tcp_info for that? The > information is already provided via getsockopt(TCP_INFO). It's pretty heavy handed to copy that entire TCP_INFO struct into userspace during every I/O sequence the application makes.