public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] ipv6: misc changes in output path
@ 2026-01-30 21:02 Eric Dumazet
  2026-01-30 21:02 ` [PATCH net-next 1/8] ipv6: pass proto by value to ipv6_push_nfrag_opts() and ipv6_push_frag_opts() Eric Dumazet
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Eric Dumazet @ 2026-01-30 21:02 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, David Ahern, Kuniyuki Iwashima, netdev,
	eric.dumazet, Eric Dumazet

Small optimizations mostly in ip6_xmit() path.

TX performance increases by about 3 %.

Patches 5-7: add dst4_mtu() and dst6_mtu() to save space.

Last patch colocates inet6_cork in inet_cork_full.

This series reduces kernel size by 494 bytes on x86_64:

scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 4/2 grow/shrink: 9/23 up/down: 665/-1159 (-494)
Function                                     old     new   delta
ip6_finish_output_gso_slowpath_drop            -     197    +197
ip6_xmit                                    1452    1595    +143
do_ipv6_getsockopt                          2855    2950     +95
kzalloc_noprof                                 -      55     +55
ip4ip6_err                                   918     955     +37
__icmp_send                                 1499    1532     +33
do_ip_getsockopt                            2573    2605     +32
__ip6_append_data                           4109    4137     +28
__pfx_kzalloc_noprof                           -      16     +16
__pfx_ip6_finish_output_gso_slowpath_drop       -      16     +16
ipmr_prepare_xmit                           1232    1238      +6
ip6_forward                                 1905    1909      +4
ip6_cork_release                             108     111      +3
ipv6_push_nfrag_opts                         489     486      -3
ipv6_push_frag_opts                           90      87      -3
ip6_finish_output2                          1446    1437      -9
ip6_tnl_xmit                                2639    2627     -12
ip6_default_advmss                           176     160     -16
__ip6_rt_update_pmtu                        1087    1071     -16
tcp_v6_syn_recv_sock                        1715    1696     -19
tcp_v4_syn_recv_sock                        1107    1088     -19
__ip_make_skb                               1339    1320     -19
ip_setup_cork                                406     385     -21
ip6_setup_cork                               732     710     -22
rawv6_push_pending_frames                    581     556     -25
ip6_push_pending_frames                      184     157     -27
udpv6_splice_eof                             203     170     -33
ip6_flush_pending_frames                     220     183     -37
ip6_append_data                              349     312     -37
udp_v6_push_pending_frames                   155     115     -40
sit_tunnel_xmit                             1957    1914     -43
__pfx_dst_mtu                                 64       -     -64
tcp_v4_mtu_reduced                           289     220     -69
tcp_v6_mtu_reduced                           209     139     -70
ip6_make_skb                                 574     484     -90
ip6_finish_output                            827     697    -130
dst_mtu                                      160       -    -160
fib6_nh_mtu_change                           511     336    -175
Total: Before=22584400, After=22583906, chg -0.00%

Eric Dumazet (8):
  ipv6: pass proto by value to ipv6_push_nfrag_opts() and
    ipv6_push_frag_opts()
  ipv6: add some unlikely()/likely() clauses in ip6_output.c
  ipv6: use __skb_push() in ip6_xmit()
  ipv6: use SKB_DROP_REASON_PKT_TOO_BIG in ip6_xmit()
  inet: add dst4_mtu() and dst6_mtu() helpers
  ipv6: use dst6_mtu() instead of dst_mtu()
  ipv4: use dst4_mtu() instead of dst_mtu()
  ipv6: colocate inet6_cork in inet_cork_full

 include/linux/ipv6.h                |   8 ---
 include/net/dst.h                   |   6 ++
 include/net/inet_sock.h             |  10 +++
 include/net/ip6_route.h             |   6 ++
 include/net/ipv6.h                  |  16 ++---
 net/ipv4/icmp.c                     |   2 +-
 net/ipv4/ip_output.c                |   4 +-
 net/ipv4/ip_sockglue.c              |   2 +-
 net/ipv4/ipmr.c                     |   2 +-
 net/ipv4/netfilter/nf_reject_ipv4.c |   2 +-
 net/ipv4/tcp_ipv4.c                 |  13 ++--
 net/ipv6/exthdrs.c                  |  55 +++++++-------
 net/ipv6/ip6_gre.c                  |   2 +-
 net/ipv6/ip6_output.c               | 108 ++++++++++++++--------------
 net/ipv6/ip6_tunnel.c               |   6 +-
 net/ipv6/ipv6_sockglue.c            |   4 +-
 net/ipv6/raw.c                      |   2 +-
 net/ipv6/route.c                    |  10 +--
 net/ipv6/sit.c                      |   2 +-
 net/ipv6/tcp_ipv6.c                 |   9 +--
 20 files changed, 144 insertions(+), 125 deletions(-)

-- 
2.53.0.rc1.225.gd81095ad13-goog


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

end of thread, other threads:[~2026-02-03  2:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 21:02 [PATCH net-next 0/8] ipv6: misc changes in output path Eric Dumazet
2026-01-30 21:02 ` [PATCH net-next 1/8] ipv6: pass proto by value to ipv6_push_nfrag_opts() and ipv6_push_frag_opts() Eric Dumazet
2026-01-31  6:29   ` Kuniyuki Iwashima
2026-01-30 21:02 ` [PATCH net-next 2/8] ipv6: add some unlikely()/likely() clauses in ip6_output.c Eric Dumazet
2026-01-31  6:30   ` Kuniyuki Iwashima
2026-01-30 21:02 ` [PATCH net-next 3/8] ipv6: use __skb_push() in ip6_xmit() Eric Dumazet
2026-01-31  6:32   ` Kuniyuki Iwashima
2026-01-30 21:02 ` [PATCH net-next 4/8] ipv6: use SKB_DROP_REASON_PKT_TOO_BIG " Eric Dumazet
2026-01-31  6:33   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 5/8] inet: add dst4_mtu() and dst6_mtu() helpers Eric Dumazet
2026-01-31  6:34   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 6/8] ipv6: use dst6_mtu() instead of dst_mtu() Eric Dumazet
2026-01-31  6:39   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 7/8] ipv4: use dst4_mtu() " Eric Dumazet
2026-01-31  6:42   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 8/8] ipv6: colocate inet6_cork in inet_cork_full Eric Dumazet
2026-01-31  6:46   ` Kuniyuki Iwashima
2026-02-03  2:00 ` [PATCH net-next 0/8] ipv6: misc changes in output path patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox