Re: [PATCH net-next v3] xsk: add indirect call for xsk_destruct_skb

From
Paolo Abeni <pabeni@redhat.com>
Date
2025-11-11 09:30:06
Also in
bpf
Reply to
Jason Xing, 2025-10-31
On 10/31/25 11:33 AM, Jason Xing wrote:
From: Jason Xing <kernelxing@tencent.com>

Since Eric proposed an idea about adding indirect call wrappers for
UDP and managed to see a huge improvement[1], the same situation can
also be applied in xsk scenario.

This patch adds an indirect call for xsk and helps current copy mode
improve the performance by around 1% stably which was observed with
IXGBE at 10Gb/sec loaded. If the throughput grows, the positive effect
will be magnified. I applied this patch on top of batch xmit series[2],
and was able to see <5% improvement from our internal application
which is a little bit unstable though.

Use INDIRECT wrappers to keep xsk_destruct_skb static as it used to
be when the mitigation config is off.

Be aware of the freeing path that can be very hot since the frequency
can reach around 2,000,000 times per second with the xdpsock test.

[1]: https://lore.kernel.org/netdev/20251006193103.2684156-2-edumazet@google.com/ (local)
[2]: https://lore.kernel.org/all/20251021131209.41491-1-kerneljasonxing@gmail.com/ (local)

Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
My take here is that this should not impact too negatively the
maintenance cost, and I agree that virtio_net is a legit/significant
use-case.

Cheers,

Paolo
Thread (5 messages) 5 messages, 3 authors, last reply 2025-11-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help