Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849Ab0BKMHZ (ORCPT ); Thu, 11 Feb 2010 07:07:25 -0500 Received: from mail-forward2.uio.no ([129.240.10.71]:37023 "EHLO mail-forward2.uio.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473Ab0BKMHW (ORCPT ); Thu, 11 Feb 2010 07:07:22 -0500 Message-ID: <4B73F2F4.8090901@simula.no> Date: Thu, 11 Feb 2010 13:07:16 +0100 From: Andreas Petlund User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9pre) Gecko/20100209 Shredder/3.0.2pre MIME-Version: 1.0 To: "netdev@vger.kernel.org" CC: =?ISO-8859-1?Q?Ilpo_J=E4rvinen?= , Eric Dumazet , Arnd Hannemann , LKML , shemminger@vyatta.com, David Miller , william.allen.simpson@gmail.com, damian@tvk.rwth-aachen.de Subject: [net-next PATCH v3 1/3] net: TCP thin-stream detection Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-UiO-Ratelimit-Test: rcpts/h 19 msgs/h 3 sum rcpts/h 25 sum msgs/h 3 total rcpts 789 max rcpts/h 37 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: 83519F23E02A41AFAD35E1A5BF3F1560D6763F8A X-UiO-SPAM-Test: remote_host: 128.39.37.254 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 6 total 19382 max/h 66 blacklist 0 greylist 0 ratelimit 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 34 No changes here from v2. Signed-off-by: Andreas Petlund --- include/net/tcp.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 87d164b..e5e2056 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1386,6 +1386,13 @@ static inline void tcp_highest_sack_combine(struct sock *sk, tcp_sk(sk)->highest_sack = new; } +/* Determines whether this is a thin stream (which may suffer from + * increased latency). Used to trigger latency-reducing mechanisms.*/ +static inline unsigned int tcp_stream_is_thin(struct tcp_sock *tp) +{ + return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp); +} + /* /proc */ enum tcp_seq_states { TCP_SEQ_STATE_LISTENING, -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/