Skip to content

udp optimisation

Pavel Begunkov lkml netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14ipv6: optimise dst referencingnet/ipv6/ip6_output.c+10 -10 replies
2/14ipv6: shuffle up->pending AF_INET bitsnet/ipv6/udp.c+2 -30 replies
3/14ipv6: remove daddr temp buffer in __ip6_make_skbnet/ipv6/ip6_output.c+3 -40 replies
4/14ipv6: clean up cork setup/releasenet/ipv6/ip6_output.c+21 -230 replies
5/14ipv6: don't zero cork's flowi after usenet/ipv6/ip6_output.c net/ipv6/udp.c+2 -90 replies
6/14ipv6: pass full cork into __ip6_append_data()net/ipv6/ip6_output.c+4 -30 replies
7/14ipv6: pass flow in ip6_make_skb together with corkinclude/net/ipv6.h net/ipv6/ip6_output.c net/ipv6/udp.c+13 -130 replies
8/14ipv6/udp: don't make extra copies of iflownet/ipv6/udp.c+42 -430 replies
9/14ipv6: hand dst refs to cork setupnet/ipv6/ip6_output.c net/ipv6/udp.c+8 -46 replies
10/14skbuff: drop zero check from skb_zcopy_setinclude/linux/skbuff.h net/ipv4/ip_output.c net/ipv6/ip6_output.c+5 -30 replies
11/14skbuff: drop null check from skb_zcopyinclude/linux/skbuff.h net/core/dev.c net/core/skbuff.c +3 more+18 -80 replies
12/14skbuff: optimise alloc_skb_with_frags()include/linux/skbuff.h net/core/skbuff.c+48 -240 replies
13/14net: inline part of skb_csum_hwoffload_helpinclude/linux/netdevice.h net/core/dev.c+17 -126 replies
14/14net: inline sock_alloc_send_skbinclude/net/sock.h net/core/sock.c+8 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] udp optimisation

A mainly UDP/IPv6 optimisation patch set. Zerocopy io_uring benchmark over dummy netdev (CPU bound) gives 2068992 -> 2166481 tx/s, which is ~4.7% or over 5% of net layer overhead. Should give similar results for small packet non-zerocopy.

- 1/14 and 9/14 remove a get/put dst pair each, so saving 4 atomics per corkless UDP send.
- Patches 3-8 optimise iflow handling, in particular removes one 88B memset and one 88B copy.
- 10-14 are random improvements, which are not UDP-specific but also beneficial to TCP and others.

Pavel Begunkov (14):
ipv6: optimise dst referencing
ipv6: shuffle up->pending AF_INET bits
ipv6: remove daddr temp buffer in __ip6_make_skb
ipv6: clean up cork setup/release
ipv6: don't zero cork's flowi after use
ipv6: pass full cork into __ip6_append_data()
ipv6: pass flow in ip6_make_skb together with cork ipv6/udp: don't make extra copies of iflow
ipv6: hand dst refs to cork setup
skbuff: drop zero check from skb_zcopy_set
skbuff: drop null check from skb_zcopy
skbuff: optimise alloc_skb_with_frags()
net: inline part of skb_csum_hwoffload_help
net: inline sock_alloc_send_skb

 include/linux/netdevice.h |  16 +++++-
 include/linux/skbuff.h    |  45 +++++++++++++---
 include/net/ipv6.h        |   2 +-
 include/net/sock.h        |  10 +++-
 net/core/dev.c            |  15 ++----
 net/core/skbuff.c         |  34 +++++-------
 net/core/sock.c           |   7 ---
 net/ipv4/ip_output.c      |  10 ++--
 net/ipv4/tcp.c            |   5 +-
 net/ipv6/ip6_output.c     | 105 +++++++++++++++++++++-----------------
 net/ipv6/udp.c            | 103 ++++++++++++++++++-------------------
 11 files changed, 197 insertions(+), 155 deletions(-)
Signature · 1 line
2.34.1