android_kernel_motorola_sm6375/net/packet
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Dumazet b5b2d42bb3 af_packet: do not call packet_read_pending() from tpacket_destruct_skb()
[ Upstream commit 581073f626e387d3e7eed55c48c8495584ead7ba ]

trafgen performance considerably sank on hosts with many cores
after the blamed commit.

packet_read_pending() is very expensive, and calling it
in af_packet fast path defeats Daniel intent in commit
b013840810 ("packet: use percpu mmap tx frame pending refcount")

tpacket_destruct_skb() makes room for one packet, we can immediately
wakeup a producer, no need to completely drain the tx ring.

Fixes: 89ed5b5190 ("af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Neil Horman <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-06-16 13:28:40 +02:00
..
af_packet.c af_packet: do not call packet_read_pending() from tpacket_destruct_skb() 2024-06-16 13:28:40 +02:00
diag.c af_packet: Fix data-races of pkt_sk(sk)->num. 2023-06-09 10:28:53 +02:00
internal.h packet: Move reference count in packet_sock to atomic_long_t 2023-12-13 18:18:14 +01:00
Kconfig
Makefile