Netdev List
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <edumazet@google.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <kuni1840@gmail.com>,
	<kuniyu@amazon.com>, <netdev@vger.kernel.org>,
	<pabeni@redhat.com>, <subashab@codeaurora.org>
Subject: Re: [PATCH v2 net] tcp/udp: Make early_demux back namespacified.
Date: Tue, 12 Jul 2022 11:14:57 -0700	[thread overview]
Message-ID: <20220712181457.41424-1-kuniyu@amazon.com> (raw)
In-Reply-To: <CANn89i+c5yGoVV5t34diRrita=D1X_Aj-+fXJ2pw7jusnKGL3w@mail.gmail.com>

From:   Eric Dumazet <edumazet@google.com>
Date:   Tue, 12 Jul 2022 19:51:02 +0200
> On Tue, Jul 12, 2022 at 7:38 PM Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
> >
> > 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.
> >
> 
> >  static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table,
> >                                              int write, void *buffer,
> >                                              size_t *lenp, loff_t *ppos)
> > @@ -695,14 +640,18 @@ static struct ctl_table ipv4_net_table[] = {
> >                 .data           = &init_net.ipv4.sysctl_udp_early_demux,
> >                 .maxlen         = sizeof(u8),
> >                 .mode           = 0644,
> > -               .proc_handler   = proc_udp_early_demux
> > +               .proc_handler   = proc_dou8vec_minmax,
> > +               .extra1         = SYSCTL_ZERO,
> > +               .extra2         = SYSCTL_ONE,
> 
> This does not belong to this patch.
> 
> It is IMO too late, some users might use:
> 
> echo 2 >/proc/sys/net/ipv4/udp_early_demux

Ok, I will drop these.


> >         },
> >         {
> >                 .procname       = "tcp_early_demux",
> >                 .data           = &init_net.ipv4.sysctl_tcp_early_demux,
> >                 .maxlen         = sizeof(u8),
> >                 .mode           = 0644,
> > -               .proc_handler   = proc_tcp_early_demux
> > +               .proc_handler   = proc_dou8vec_minmax,
> > +               .extra1         = SYSCTL_ZERO,
> > +               .extra2         = SYSCTL_ONE,
> 
> Same here.
> 
> Again, fix the bug, and only the bug. Do not hide 'fixes' in an innocent patch.
> 
> There is a reason for that, we want each commit to have a clear description,
> and we want to be able to revert a patch without having to think about
> what needs
> to be re-written.

Sorry for bothering you.
But this makes my criteria explicit, thank you!

      reply	other threads:[~2022-07-12 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 17:38 [PATCH v2 net] tcp/udp: Make early_demux back namespacified Kuniyuki Iwashima
2022-07-12 17:51 ` Eric Dumazet
2022-07-12 18:14   ` Kuniyuki Iwashima [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=20220712181457.41424-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=subashab@codeaurora.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