From: Stephen Hemminger <shemminger@vyatta.com>
To: Vitaliy Gusev <vgusev@openvz.org>
Cc: David Miller <davem@davemloft.net>,
Andi Kleen <andi@firstfloor.org>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
netdev@vger.kernel.org
Subject: Re: [PATCH] Discard tcp out-of-order queue if system limit is reached
Date: Tue, 15 Apr 2008 08:22:59 -0700 [thread overview]
Message-ID: <20080415082259.7a911aaf@extreme> (raw)
In-Reply-To: <200804151854.45021.vgusev@openvz.org>
On Tue, 15 Apr 2008 18:54:44 +0400
Vitaliy Gusev <vgusev@openvz.org> wrote:
> Hello!
>
> tcp_prune_queue() doesn't prune an out-of-order queue if socket
> is under rcvbuf. However even if socket is under rcvbuf but system-wide limit is
> reached then skb cannot be queued. It can lead to deadlock situation as any skb that
> fills sequence hole is dropped.
> So discard out-of-order queue if system-wide limit is reached.
>
> Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
>
> ---
> net/ipv4/tcp_input.c | 78 +++++++++++++++++++++++++++++++++----------------
> 1 files changed, 52 insertions(+), 26 deletions(-)
>
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 5119856..bbb7d88 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -3841,8 +3841,28 @@ static void tcp_ofo_queue(struct sock *sk)
> }
> }
>
> +static int tcp_prune_ofo_queue(struct sock *sk);
> static int tcp_prune_queue(struct sock *sk);
>
> +static inline int tcp_try_rmem_schedule(struct sock *sk, unsigned int size)
minor nit, current preferred style is to not use inline for used once functions,
the compiler will do it anyway.
next prev parent reply other threads:[~2008-04-15 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 14:54 [PATCH] Discard tcp out-of-order queue if system limit is reached Vitaliy Gusev
2008-04-15 14:58 ` Andi Kleen
2008-04-15 15:22 ` Stephen Hemminger [this message]
2008-04-16 3:27 ` David Miller
2008-04-16 7:01 ` Andi Kleen
2008-04-16 7:08 ` 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=20080415082259.7a911aaf@extreme \
--to=shemminger@vyatta.com \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=vgusev@openvz.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).