From: Jakub Kicinski <kuba@kernel.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, tgraf@infradead.org, horms@kernel.org,
pabeni@redhat.com, edumazet@google.com, davem@davemloft.net
Subject: Re: [PATCH net v4] ipv4: bump rt_genid when a relevant devconf value changes through netlink
Date: Sat, 14 Mar 2026 09:06:14 -0700 [thread overview]
Message-ID: <20260314090614.116f38cc@kernel.org> (raw)
In-Reply-To: <633f5de1-daeb-48ac-aba1-92b3c3ccf5c8@suse.de>
On Fri, 13 Mar 2026 16:13:20 +0100 Fernando Fernandez Mancera wrote:
> > Also, you are flushing the cache for more values than sysfs does.
>
> I don't think so. The problem is that the handling of sysctl is
> scattered in several places.
>
> IPV4_DEVCONF_FORWARDING is flushed at devinet_sysctl_forward().
>
> IPV4_DEVCONF_NOXFRM, IPV4_DEVCONF_NOPOLICY,
> IPV4_DEVCONF_PROMOTE_SECONDARIES, IPV4_DEVCONF_ROUTE_LOCALNET, and
> IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST are flushed at
> ipv4_doint_and_flush() used by macro DEVINET_SYSCTL_FLUSHING_ENTRY.
>
> Finally, IPV4_DEVCONF_BC_FORWARDING and IPV4_DEVCONF_ACCEPT_LOCAL are
> flushed at devinet_conf_proc().
>
> Yes, I know, the fact that they are scattered around is quite confusing.
> This could be all unified in a single place but that would be too much
> for net tree IMHO.
>
> Please let me know if I am missing something.
I think David means that for some knobs procfs only flushes when value
changes "in one direct", eg
if (i == IPV4_DEVCONF_ACCEPT_LOCAL - 1 ||
i == IPV4_DEVCONF_ROUTE_LOCALNET - 1)
if ((new_value == 0) && (old_value != 0))
rt_cache_flush(net);
which means only flush on the 1 -> 0 transition.
next prev parent reply other threads:[~2026-03-14 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 14:45 [PATCH net v4] ipv4: bump rt_genid when a relevant devconf value changes through netlink Fernando Fernandez Mancera
2026-03-13 14:56 ` David Ahern
2026-03-13 15:13 ` Fernando Fernandez Mancera
2026-03-14 16:06 ` Jakub Kicinski [this message]
2026-03-14 16:16 ` David Ahern
2026-03-14 17:52 ` Fernando Fernandez Mancera
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=20260314090614.116f38cc@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tgraf@infradead.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