[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <025c356f-a77f-4251-a7ae-4f242c70463e@redhat.com>
Date: Thu, 6 Mar 2025 18:31:03 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: netdev@...r.kernel.org, Willem de Bruijn
<willemdebruijn.kernel@...il.com>, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH net-next 1/2] udp_tunnel: create a fast-path GRO lookup.
Hi,
On 3/6/25 5:35 PM, Eric Dumazet wrote:
>> static int __net_init udp_pernet_init(struct net *net)
>> {
>> +#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
>> + int i;
>> +
>> + /* No tunnel is configured */
>> + for (i = 0; i < ARRAY_SIZE(net->ipv4.udp_tunnel_gro); ++i) {
>> + INIT_HLIST_HEAD(&net->ipv4.udp_tunnel_gro[i].list);
>> + rcu_assign_pointer(net->ipv4.udp_tunnel_gro[1].sk, NULL);
>
> typo : [i] is what you meant (instead of [1])
Whoops... I guess testing did not discovered that because the pointer is
only touched after a tunnel is initialized. I'll fix in v2.
>> @@ -1824,6 +1825,7 @@ void udpv6_destroy_sock(struct sock *sk)
>> }
>> if (udp_test_bit(ENCAP_ENABLED, sk)) {
>> static_branch_dec(&udpv6_encap_needed_key);
>
> In ipv4, you removed the static_branch_dec(&udp_encap_needed_key);
I replaced such statement with udp_encap_disable(), which in turn does
the same. Still is a left-over from a previous revision of the patch,
when I intended to do all the cleanup in udp_encap_disable().
In v2 I'll avoid the unneeded ipv4 change.
Thanks for the review,
Paolo
Powered by blists - more mailing lists