Commit 97b2409f authored by Jason Wang's avatar Jason Wang Committed by Jakub Kicinski
Browse files

vhost-net: reduce one userspace copy when building XDP buff



We used to do twice copy_from_iter() to copy virtio-net and packet
separately. This introduce overheads for userspace access hardening as
well as SMAP (for x86 it's stac/clac). So this patch tries to use one
copy_from_iter() to copy them once and move the virtio-net header
afterwards to reduce overheads.

Testpmd + vhost_net shows 10% improvement from 5.45Mpps to 6.0Mpps.

Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://patch.msgid.link/20250701010352.74515-2-jasowang@redhat.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4d313f2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment