From: Greg KH <greg@kroah.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: stable@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 4.14] tcp/udp: Make early_demux back namespacified.
Date: Mon, 7 Nov 2022 16:17:23 +0100 [thread overview]
Message-ID: <Y2khg2DvyLLgQDYi@kroah.com> (raw)
In-Reply-To: <20221103235033.47512-1-kuniyu@amazon.com>
On Thu, Nov 03, 2022 at 04:50:33PM -0700, Kuniyuki Iwashima wrote:
> commit 11052589cf5c0bab3b4884d423d5f60c38fcf25d upstream
>
> Commit e21145a9871a ("ipv4: namespacify ip_early_demux sysctl knob") made
> it possible to enable/disable early_demux on a per-netns basis. Then, we
> introduced two knobs, tcp_early_demux and udp_early_demux, to switch it for
> TCP/UDP in commit dddb64bcb346 ("net: Add sysctl to toggle early demux for
> tcp and udp"). However, the .proc_handler() was wrong and actually
> disabled us from changing the behaviour in each netns.
>
> We can execute early_demux if net.ipv4.ip_early_demux is on and each proto
> .early_demux() handler is not NULL. When we toggle (tcp|udp)_early_demux,
> the change itself is saved in each netns variable, but the .early_demux()
> handler is a global variable, so the handler is switched based on the
> init_net's sysctl variable. Thus, netns (tcp|udp)_early_demux knobs have
> nothing to do with the logic. Whether we CAN execute proto .early_demux()
> is always decided by init_net's sysctl knob, and whether we DO it or not is
> by each netns ip_early_demux knob.
>
> This patch namespacifies (tcp|udp)_early_demux again. For now, the users
> of the .early_demux() handler are TCP and UDP only, and they are called
> directly to avoid retpoline. So, we can remove the .early_demux() handler
> from inet6?_protos and need not dereference them in ip6?_rcv_finish_core().
> If another proto needs .early_demux(), we can restore it at that time.
>
> Fixes: dddb64bcb346 ("net: Add sysctl to toggle early demux for tcp and udp")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
> Link: https://lore.kernel.org/r/20220713175207.7727-1-kuniyu@amazon.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
All now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-11-07 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 23:50 [PATCH 4.14] tcp/udp: Make early_demux back namespacified Kuniyuki Iwashima
2022-11-07 15:17 ` Greg KH [this message]
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=Y2khg2DvyLLgQDYi@kroah.com \
--to=greg@kroah.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=stable@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 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.