netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH net-2.6.25 10/11][INET] Eliminate difference in actions of sysctl and proc handler for conf.all.forwarding
Date: Wed, 05 Dec 2007 12:58:16 +0300	[thread overview]
Message-ID: <47567638.9080208@openvz.org> (raw)
In-Reply-To: <20071205.014835.45293431.davem@davemloft.net>

David Miller wrote:
> From: Pavel Emelyanov <xemul@openvz.org>
> Date: Tue, 04 Dec 2007 13:16:45 +0300
> 
>> AFAIS the net.ipv4.conf. <dev>, all and default sysctls should 
>> work like this when changed (besides changing the value itself):
>>
>> <dev>   : optionally do smth else
>> all     : walk devices
>> default : walk devices
>>
>> The proc handler for net.ipv4.conf.all works like this:
>>
>> <dev>   : flush rt cache
>> all     : walk devices and flush rt cache
>> default : nothing
>>
>> while the sysctl handler works like this:
>>
>> <dev>   : nothing
>> all     : nothing
>> default : walk devices but don't flush the cache
>>
>> All this looks strange. Am I right that regardless of whatever
>> handler (proc or syscall) is called the behavior should be:
>>
>> <dev>   : flush rt cache
>> all     : walk the devices and flush the cache
>> default : walk the devices and flush the cache
>>
>> ?
>>
>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> Because, basically, nobody (and I really do mean nobody)
> uses the sysctl() method to change these things, what
> people expect is basically going to be the procfs
> access behavior.

OK. Thank you for clarification :)

> And I agree with it.
> 
> The 'default' influences future settings, it should not modify
> existing devices.  That's the job of 'all'.

I thought the same, and I saw that this is true for ipv6, but
ipv4 works differently :( -- changing default for some sysctls
will cause some devices to be changed as well.

I mean - devinet_copy_dflt_conf() copies the changed bit on 
those devices, that have not this but marked in the "state" field.
It is called for such entries as "accept_redirects", "shared_media" 
and many others. But not for "forwarding" one. That's what seemed
strange to me. Sorry, that I didn't express the idea more cleanly.

So what's the right behavior -- to propagate the default for all the 
ctls on all the devices (according to their "state"), not to propagate 
for all the ctls, or to keep things as they are now?

> Otherwise why have 'all' and 'default' as two different knobs
> if they do exactly the same thing?  That's pointless.
> 
> I've therefore dropped this patch.
> 

Thanks,
Pavel

  reply	other threads:[~2007-12-05  9:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 10:01 [PATCH net-2.6.25 0/11] Combined set of sysctl reworks, cleanups and fixes Pavel Emelyanov
2007-12-04 10:03 ` [PATCH net-2.6.25 1/11][CORE] Remove unneeded ifdefs from sysctl_net_core.c Pavel Emelyanov
2007-12-04 10:21   ` [PATCH net-2.6.25 (resend) " Pavel Emelyanov
2007-12-05  9:36   ` [PATCH net-2.6.25 " David Miller
2007-12-04 10:04 ` [PATCH net-2.6.25 2/11][CORE] Isolate the net/core/ sysctl table Pavel Emelyanov
2007-12-05  9:37   ` David Miller
2007-12-04 10:06 ` [PATCH net-2.6.25 3/11][IPv4] Cleanup the sysctl_net_ipv4.c file Pavel Emelyanov
2007-12-05  9:38   ` David Miller
2007-12-04 10:07 ` [PATCH net-2.6.25 4/11][IPV4] Use ctl paths to register net/ipv4/ table Pavel Emelyanov
2007-12-05  9:41   ` David Miller
2007-12-04 10:09 ` [PATCH net-2.6.25 5/11][TR] Use ctl paths to register net/token-ring/ table Pavel Emelyanov
2007-12-05  9:42   ` David Miller
2007-12-04 10:10 ` [PATCH net-2.6.25 6/11][CORE] Remove the empty net_table Pavel Emelyanov
2007-12-05  9:43   ` David Miller
2007-12-04 10:11 ` [PATCH net-2.6.25 7/11][IPV6] Make the ipv6/sysctl_net_ipv6.c compilation cleaner Pavel Emelyanov
2007-12-05  9:43   ` David Miller
2007-12-04 10:13 ` [PATCH net-2.6.25 8/11][IPV6] Use sysctl paths to register ipv6 sysctl tables Pavel Emelyanov
2007-12-05  9:44   ` David Miller
2007-12-04 10:15 ` [PATCH net-2.6.25 9/11][INET] Merge sys.net.ipv4.ip_forward and sys.net.ipv4.conf.all.forwarding Pavel Emelyanov
2007-12-05  9:45   ` David Miller
2007-12-04 10:16 ` [PATCH net-2.6.25 10/11][INET] Eliminate difference in actions of sysctl and proc handler for conf.all.forwarding Pavel Emelyanov
2007-12-05  9:48   ` David Miller
2007-12-05  9:58     ` Pavel Emelyanov [this message]
2007-12-05 10:06       ` David Miller
2007-12-06  0:13         ` Herbert Xu
2007-12-06  5:39           ` David Miller
2007-12-06 11:06             ` Herbert Xu
2007-12-06 11:14               ` David Miller
2007-12-06 12:31           ` Pavel Emelyanov
2007-12-06 17:42             ` Herbert Xu
2007-12-04 10:19 ` [PATCH net-2.6.25 11/11][IPV6] " Pavel Emelyanov
2007-12-05  9:51   ` 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=47567638.9080208@openvz.org \
    --to=xemul@openvz.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=netdev@vger.kernel.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).