All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH] Relax tcp.window_clamp value in INET restore
Date: Fri, 4 Dec 2009 21:32:45 -0600	[thread overview]
Message-ID: <20091205033245.GA3177@us.ibm.com> (raw)
In-Reply-To: <1259953399-8530-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> This value can grow higher than 16k, but it clamped at packet receive
> time if over that limit.  Instead of failing here, just clamp to the same
> limit.
> 
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Cc: serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org

Tested-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Thanks, Dan.

-serge

> Cc: orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org
> ---
>  net/ipv4/checkpoint.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/net/ipv4/checkpoint.c b/net/ipv4/checkpoint.c
> index 788e110..c80324f 100644
> --- a/net/ipv4/checkpoint.c
> +++ b/net/ipv4/checkpoint.c
> @@ -429,10 +429,8 @@ static int inet_precheck(struct socket *sock, struct ckpt_hdr_socket_inet *in)
>  	/* do_tcp_setsockopt() quietly makes this coercion */
>  	if (in->tcp.window_clamp < (SOCK_MIN_RCVBUF / 2))
>  		in->tcp.window_clamp = SOCK_MIN_RCVBUF / 2;
> -	else if (in->tcp.window_clamp > 65535U) {
> -		ckpt_debug("invalid window_clamp value\n");
> -		return -EINVAL;
> -	}
> +	else
> +		in->tcp.window_clamp = min(in->tcp.window_clamp, 65535U);
> 
>  	if (in->tcp.rcv_ssthresh > (4U * in->tcp.advmss))
>  		in->tcp.rcv_ssthresh = 4U * in->tcp.advmss;
> -- 
> 1.6.2.5

  parent reply	other threads:[~2009-12-05  3:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 19:03 [PATCH] Relax tcp.window_clamp value in INET restore Dan Smith
     [not found] ` <1259953399-8530-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-12-05  3:32   ` Serge E. Hallyn [this message]
2009-12-06 19:56   ` Oren Laadan

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=20091205033245.GA3177@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.