Eric Dumazet 4f3ae7d846 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
b013840810c2 ("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: 89ed5b519004 ("af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240515163358.4105915-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:23:31 +02:00
..
2022-04-27 13:39:46 +02:00
2023-08-11 11:45:24 +02:00
2023-10-25 11:16:51 +02:00
2023-06-21 15:39:57 +02:00
2024-03-26 18:22:42 -04:00
2024-05-17 11:42:38 +02:00
2024-05-17 11:42:43 +02:00
2021-06-30 08:48:13 -04:00
2023-06-21 15:39:57 +02:00
2023-06-21 15:39:57 +02:00