summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-03-25 09:14:27 -0700
committerJakub Kicinski <kuba@kernel.org>2025-03-25 09:15:07 -0700
commit1f6154227b49c3d3f306f624858e695bfee50aae (patch)
tree7f78880584352756283e2156cb015fa5f032cef1 /include
parentaa3651ccffbba700613183d2e904289da38479c1 (diff)
Revert "udp_tunnel: GRO optimizations"
Revert "udp_tunnel: use static call for GRO hooks when possible" This reverts commit 311b36574ceaccfa3f91b74054a09cd4bb877702. Revert "udp_tunnel: create a fastpath GRO lookup." This reverts commit 8d4880db378350f8ed8969feea13bdc164564fc1. There are multiple small issues with the series. In the interest of unblocking the merge window let's opt for a revert. Link: https://lore.kernel.org/cover.1742557254.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/udp.h16
-rw-r--r--include/net/netns/ipv4.h11
-rw-r--r--include/net/udp.h1
-rw-r--r--include/net/udp_tunnel.h22
4 files changed, 0 insertions, 50 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 895240177f4f..0807e21cfec9 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -101,13 +101,6 @@ struct udp_sock {
/* Cache friendly copy of sk->sk_peek_off >= 0 */
bool peeking_with_offset;
-
- /*
- * Accounting for the tunnel GRO fastpath.
- * Unprotected by compilers guard, as it uses space available in
- * the last UDP socket cacheline.
- */
- struct hlist_node tunnel_list;
};
#define udp_test_bit(nr, sk) \
@@ -226,13 +219,4 @@ static inline void udp_allow_gso(struct sock *sk)
#define IS_UDPLITE(__sk) (__sk->sk_protocol == IPPROTO_UDPLITE)
-static inline struct sock *udp_tunnel_sk(const struct net *net, bool is_ipv6)
-{
-#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
- return rcu_dereference(net->ipv4.udp_tunnel_gro[is_ipv6].sk);
-#else
- return NULL;
-#endif
-}
-
#endif /* _LINUX_UDP_H */
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 6373e3f17da8..650b2dc9199f 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -47,11 +47,6 @@ struct sysctl_fib_multipath_hash_seed {
};
#endif
-struct udp_tunnel_gro {
- struct sock __rcu *sk;
- struct hlist_head list;
-};
-
struct netns_ipv4 {
/* Cacheline organization can be found documented in
* Documentation/networking/net_cachelines/netns_ipv4_sysctl.rst.
@@ -90,11 +85,6 @@ struct netns_ipv4 {
struct inet_timewait_death_row tcp_death_row;
struct udp_table *udp_table;
-#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
- /* Not in a pernet subsys because need to be available at GRO stage */
- struct udp_tunnel_gro udp_tunnel_gro[2];
-#endif
-
#ifdef CONFIG_SYSCTL
struct ctl_table_header *forw_hdr;
struct ctl_table_header *frags_hdr;
@@ -287,5 +277,4 @@ struct netns_ipv4 {
struct hlist_head *inet_addr_lst;
struct delayed_work addr_chk_work;
};
-
#endif
diff --git a/include/net/udp.h b/include/net/udp.h
index a772510b2aa5..6e89520e100d 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -290,7 +290,6 @@ static inline void udp_lib_init_sock(struct sock *sk)
struct udp_sock *up = udp_sk(sk);
skb_queue_head_init(&up->reader_queue);
- INIT_HLIST_NODE(&up->tunnel_list);
up->forward_threshold = sk->sk_rcvbuf >> 2;
set_bit(SOCK_CUSTOM_SOCKOPT, &sk->sk_socket->flags);
}
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index a7b230867eb1..a93dc51f6323 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -203,28 +203,6 @@ static inline void udp_tunnel_encap_enable(struct sock *sk)
udp_encap_enable();
}
-#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
-void udp_tunnel_update_gro_lookup(struct net *net, struct sock *sk, bool add);
-void udp_tunnel_update_gro_rcv(struct sock *sk, bool add);
-#else
-static inline void udp_tunnel_update_gro_lookup(struct net *net,
- struct sock *sk, bool add) {}
-static inline void udp_tunnel_update_gro_rcv(struct sock *sk, bool add) {}
-#endif
-
-static inline void udp_tunnel_cleanup_gro(struct sock *sk)
-{
- struct udp_sock *up = udp_sk(sk);
- struct net *net = sock_net(sk);
-
- udp_tunnel_update_gro_rcv(sk, false);
-
- if (!up->tunnel_list.pprev)
- return;
-
- udp_tunnel_update_gro_lookup(net, sk, false);
-}
-
#define UDP_TUNNEL_NIC_MAX_TABLES 4
enum udp_tunnel_nic_info_flags {