Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: William Allen Simpson <william.allen.simpson@gmail.com>
Cc: Linux Kernel Developers <linux-kernel@vger.kernel.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v1 1/2] TCPCT API sysctl update to draft -03
Date: Wed, 12 Jan 2011 19:05:25 +0100	[thread overview]
Message-ID: <1294855525.3981.119.camel@edumazet-laptop> (raw)
In-Reply-To: <4D2DEA73.4000708@gmail.com>

Le mercredi 12 janvier 2011 à 12:52 -0500, William Allen Simpson a
écrit :
> Use most recently specified symbols of RFC-to-be-6013.
> 
> Allows different global s_data limits for SYN and SYN_ACK.
> 
> CC: "Eric W. Biederman" <ebiederm@xmission.com>
> CC: Stephen Hemminger <shemminger@vyatta.com>
> CC: Andi Kleen <andi@firstfloor.org>


> Signed-off-by: William.Allen.Simpson@gmail.com

Should be :

Signed-off-by: William Allen Simpson <William.Allen.Simpson@gmail.com>

> ---
>   Documentation/networking/ip-sysctl.txt |   10 ++++++++++
>   include/net/tcp.h                      |    2 ++
>   net/ipv4/sysctl_net_ipv4.c             |   25 ++++++++++++++++++++++++-
>   net/ipv4/tcp_output.c                  |   19 +++++++++++++++++--
>   4 files changed, 53 insertions(+), 3 deletions(-)

Hmm, patch is not inlined, so I have to copy/paste

+static int tcp_cookie_max = TCP_COOKIE_MAX;

...
 
 /* Update system visible IP port range */
 static void set_local_port_range(int range[2])
@@ -588,7 +591,27 @@ static struct ctl_table ipv4_table[] = {
                .data           = &sysctl_tcp_cookie_size,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &zero,
+               .extra2         = &tcp_cookie_max,
+       },


Now sysctl_tcp_cookie_size has a max limit of TCP_COOKIE_MAX, you can
remove the now uneeded check in :

static u8 tcp_cookie_size_check(u8 desired)
...
if (cookie_size >= TCP_COOKIE_MAX)
	/* value too large, specify maximum */
	return TCP_COOKIE_MAX;

  reply	other threads:[~2011-01-12 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 17:43 TCPCT API update for 2.6.37 William Allen Simpson
2011-01-12 17:52 ` [PATCH v1 1/2] TCPCT API sysctl update to draft -03 William Allen Simpson
2011-01-12 18:05   ` Eric Dumazet [this message]
2011-01-12 17:59 ` [PATCH v1 2/2] TCPCT API sockopt " William Allen Simpson
2011-01-12 18:56   ` Stephen Hemminger
2011-01-13 17:32     ` William Allen Simpson
2011-01-13 17:53       ` Arnaud Lacombe
2011-01-14  3:00         ` William Allen Simpson
2011-01-14  3:08           ` Eric Dumazet
2011-01-13 18:00       ` Eric Dumazet

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=1294855525.3981.119.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=william.allen.simpson@gmail.com \
    /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