linux-stable/include
Eric Dumazet 1cface552a net: add skb_data_unref() helper
Similar to skb_unref(), add skb_data_unref() to save an expensive
atomic operation (and cache line dirtying) when last reference
on shinfo->dataref is released.

I saw this opportunity on hosts with RAW sockets accidentally
bound to UDP protocol, forcing an skb_clone() on all received packets.

These RAW sockets had their receive queue full, so all clone
packets were immediately dropped.

When UDP recvmsg() consumes later the original skb, skb_release_data()
is hitting atomic_sub_return() quite badly, because skb->clone
has been set permanently.

Note that this patch helps TCP TX performance, because
TCP stack also use (fast) clones.

This means that at least one of the two packets (the main skb or
its clone) will no longer have to perform this atomic operation
in skb_release_data().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240307123446.2302230-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-03-08 11:38:45 -08:00
..
acpi IOMMU Updates for Linux v6.8 2024-01-18 15:16:57 -08:00
asm-generic RISC-V Patches for the 6.8 Merge Window, Part 4 2024-01-20 11:06:04 -08:00
clocksource
crypto
drm drm/bridge: aux-hpd: separate allocation and registration 2024-02-23 17:00:56 +02:00
dt-bindings dmaengine fixes for v6.8-rc1 2024-01-20 15:03:25 -08:00
keys
kunit Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
kvm
linux net: add skb_data_unref() helper 2024-03-08 11:38:45 -08:00
math-emu
media
memory
misc
net wireless-next patches for v6.9 2024-03-08 09:05:49 -08:00
pcmcia
ras
rdma
rv
scsi scsi: core: Consult supported VPD page list prior to fetching page 2024-02-15 14:41:26 -05:00
soc - New Device Support 2024-01-17 15:21:21 -08:00
sound ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol() 2024-02-23 13:40:06 +00:00
target
trace tcp: Add skb addr and sock addr to arguments of tracepoint tcp_probe. 2024-03-08 10:25:47 +00:00
uapi net: nexthop: Expose nexthop group HW stats to user space 2024-03-08 10:35:47 +00:00
ufs
vdso
video video/sticore: Remove info field from STI struct 2024-01-12 12:38:37 +01:00
xen