[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+k084b4RuoOOrFzYkd9uB0GUbW7VxcCCDSpqWWJaNXnQ@mail.gmail.com>
Date: Tue, 12 Jul 2022 18:51:51 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>,
Kuniyuki Iwashima <kuni1840@...il.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v1 net] tcp/udp: Make early_demux back namespacified.
On Tue, Jul 12, 2022 at 6:33 PM Kuniyuki Iwashima <kuniyu@...zon.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'.
Powered by blists - more mailing lists