Thread (9 messages) 9 messages, 3 authors, 2023-09-01
STALE1017d

[PATCH net-next RFC v1 0/4] veth: reduce reallocations of SKBs when XDP bpf-prog is loaded

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2023-08-22 17:59:06

Loading an XDP bpf-prog on veth device driver results in a significant
performance degradation (for normal unrelated traffic) due to
veth_convert_skb_to_xdp_buff() in most cases fully reallocates an SKB and copy
data over, even when XDP prog does nothing (e.g. XDP_PASS).

This patchset reduce the cases that cause reallocation.
After patchset UDP and AF_XDP sending avoids reallocations.

Future work will investigate TCP.

---

Jesper Dangaard Brouer (4):
      veth: use same bpf_xdp_adjust_head check as generic-XDP
      veth: use generic-XDP functions when dealing with SKBs
      veth: lift skb_head_is_locked restriction for SKB based XDP
      veth: when XDP is loaded increase needed_headroom


 drivers/net/veth.c | 86 +++++++++++++++++++---------------------------
 net/core/dev.c     |  1 +
 net/core/filter.c  |  1 +
 3 files changed, 38 insertions(+), 50 deletions(-)

--
Jesper
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help