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 v1 net] tcp/udp: Make early_demux back namespacified.
Date: Tue, 12 Jul 2022 10:03:02 -0700 [thread overview]
Message-ID: <20220712170302.37685-1-kuniyu@amazon.com> (raw)
In-Reply-To: <CANn89i+k084b4RuoOOrFzYkd9uB0GUbW7VxcCCDSpqWWJaNXnQ@mail.gmail.com>
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 12 Jul 2022 18:51:51 +0200
> On Tue, Jul 12, 2022 at 6:33 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.
>
> ...
>
> > -int tcp_v4_early_demux(struct sk_buff *skb)
> > +void tcp_v4_early_demux(struct sk_buff *skb)
> > {
> > const struct iphdr *iph;
> > const struct tcphdr *th;
> > struct sock *sk;
> >
> > if (skb->pkt_type != PACKET_HOST)
> > - return 0;
> > + return;
> >
> > if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr)))
> > - return 0;
> > + return;
> >
> > iph = ip_hdr(skb);
> > th = tcp_hdr(skb);
> >
> > if (th->doff < sizeof(struct tcphdr) / 4)
> > - return 0;
> > + return;
> >
> > sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo,
> > iph->saddr, th->source,
> > @@ -1740,7 +1740,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)
> > skb_dst_set_noref(skb, dst);
> > }
> > }
> > - return 0;
> > + return;
> > }
> >
>
> You have a tendency of making your patches larger than needed.
>
> If you fix a bug, please do not add 'cleanups'.
Ah sorry. I thought it would be confusing if we just drop the returned
value when calling tcp_v4_early_demux().
I drop the part in v2 and send it to net-next after net is merged.
Thank you!
prev parent reply other threads:[~2022-07-12 17:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 16:32 [PATCH v1 net] tcp/udp: Make early_demux back namespacified Kuniyuki Iwashima
2022-07-12 16:51 ` Eric Dumazet
2022-07-12 17:03 ` 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=20220712170302.37685-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;
as well as URLs for NNTP newsgroup(s).