netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] udp_tunnel: GRO optimizations
@ 2025-03-06 15:56 Paolo Abeni
  2025-03-06 15:56 ` [PATCH net-next 1/2] udp_tunnel: create a fast-path GRO lookup Paolo Abeni
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Paolo Abeni @ 2025-03-06 15:56 UTC (permalink / raw)
  To: netdev
  Cc: Willem de Bruijn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Simon Horman, David Ahern

The UDP tunnel GRO stage is source of measurable overhead for workload
based on UDP-encapsulated traffic: each incoming packets requires a full
UDP socket lookup and an indirect call.

In the most common setups a single UDP tunnel device is used. In such
case we can optimize both the lookup and the indirect call.

Patch 1 tracks per netns the active UDP tunnels and replaces the socket
lookup with a single destination port comparison when possible.

Patch 2 tracks the different types of UDP tunnels and replaces the
indirect call with a static one when there is a single UDP tunnel type
active.

I measure ~5% performance improvement in TCP over UDP tunnel stream
tests on top of this series.

Paolo Abeni (2):
  udp_tunnel: create a fast-path GRO lookup.
  udp_tunnel: use static call for GRO hooks when possible

 include/linux/udp.h        |  16 ++++
 include/net/netns/ipv4.h   |  11 +++
 include/net/udp.h          |   1 +
 include/net/udp_tunnel.h   |  22 +++++
 net/ipv4/udp.c             |  15 +++-
 net/ipv4/udp_offload.c     | 169 ++++++++++++++++++++++++++++++++++++-
 net/ipv4/udp_tunnel_core.c |  14 +++
 net/ipv6/udp.c             |   2 +
 net/ipv6/udp_offload.c     |   5 ++
 9 files changed, 252 insertions(+), 3 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-03-07 12:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 15:56 [PATCH net-next 0/2] udp_tunnel: GRO optimizations Paolo Abeni
2025-03-06 15:56 ` [PATCH net-next 1/2] udp_tunnel: create a fast-path GRO lookup Paolo Abeni
2025-03-06 16:35   ` Eric Dumazet
2025-03-06 17:31     ` Paolo Abeni
2025-03-06 19:46   ` Willem de Bruijn
2025-03-06 21:20     ` Paolo Abeni
2025-03-06 22:25       ` Willem de Bruijn
2025-03-06 15:56 ` [PATCH net-next 2/2] udp_tunnel: use static call for GRO hooks when possible Paolo Abeni
2025-03-07 10:53   ` kernel test robot
2025-03-07 12:05   ` kernel test robot
2025-03-06 18:50 ` [PATCH net-next 0/2] udp_tunnel: GRO optimizations Jakub Kicinski
2025-03-06 20:59   ` Paolo Abeni

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).