mbox series

[net-next,0/2] inet: ping: remove extra skb_clone()/consume_skb()

Message ID 20250226183437.1457318-1-edumazet@google.com (mailing list archive)
Headers show
Series inet: ping: remove extra skb_clone()/consume_skb() | expand

Message

Eric Dumazet Feb. 26, 2025, 6:34 p.m. UTC
First patch in the series moves ICMP_EXT_ECHOREPLY handling in icmp_rcv()
to prepare the second patch.

The second patch removes one skb_clone()/consume_skb() pair
when processing ICMP_EXT_REPLY packets. Some people
use hundreds of "ping -fq ..." to stress hosts :)

Eric Dumazet (2):
  ipv4: icmp: do not process ICMP_EXT_ECHOREPLY for broadcast/multicast
    addresses
  inet: ping: avoid skb_clone() dance in ping_rcv()

 net/ipv4/icmp.c | 33 +++++++++++++++++----------------
 net/ipv4/ping.c | 20 +++++---------------
 net/ipv6/icmp.c |  7 ++-----
 3 files changed, 24 insertions(+), 36 deletions(-)