Message ID | 0d33ffb4f809093d56f3ebdffd599050136f316a.1742557254.git.pabeni@redhat.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | udp_tunnel: GRO optimization follow-up | expand |
Paolo Abeni wrote: > In setup_udp_tunnel_sock() 'sk' and 'sock->sk' are alias. The code > I introduced there uses alternatively both variables, for no good > reasons. > > Stick to 'sk' usage, to be consistent with the prior code. > > Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Willem de Bruijn <willemb@google.com>
diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c index c49fceea83139..aa9016619c25a 100644 --- a/net/ipv4/udp_tunnel_core.c +++ b/net/ipv4/udp_tunnel_core.c @@ -90,10 +90,10 @@ void setup_udp_tunnel_sock(struct net *net, struct socket *sock, udp_tunnel_encap_enable(sk); - udp_tunnel_update_gro_rcv(sock->sk, true); + udp_tunnel_update_gro_rcv(sk, true); - if (!sk->sk_dport && !sk->sk_bound_dev_if && sk_saddr_any(sock->sk)) - udp_tunnel_update_gro_lookup(net, sock->sk, true); + if (!sk->sk_dport && !sk->sk_bound_dev_if && sk_saddr_any(sk)) + udp_tunnel_update_gro_lookup(net, sk, true); } EXPORT_SYMBOL_GPL(setup_udp_tunnel_sock);
In setup_udp_tunnel_sock() 'sk' and 'sock->sk' are alias. The code I introduced there uses alternatively both variables, for no good reasons. Stick to 'sk' usage, to be consistent with the prior code. Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- net/ipv4/udp_tunnel_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)