Skip to content

veth: add skb bulking allocation for XDP_PASS

Lorenzo Bianconi bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: veth: introduce bulking for XDP_PASSdrivers/net/veth.c+26 -173 replies
2/3net: xdp: move XDP_BATCH_SIZE in common headerdrivers/net/veth.c include/net/xdp.h kernel/bpf/cpumap.c+7 -90 replies
3/3net: veth: alloc skb in bulk for ndo_xdp_xmitdrivers/net/veth.c include/net/xdp.h net/core/xdp.c+79 -290 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] veth: add skb bulking allocation for XDP_PASS

Introduce bulking skb allocation for XDP_PASS verdict in veth driver. The proposed approach has been tested in the following scenario:

eth (ixgbe) --> XDP_REDIRECT --> veth0 --> (remote-ns) veth1 --> XDP_PASS

XDP_REDIRECT: xdp_redirect_map bpf sample
XDP_PASS: xdp_rxq_info bpf sample

traffic generator: pkt_gen sending udp traffic on a remote device

bpf-next master: ~3.64Mpps
bpf-next + skb bulking allocation: ~3.75Mpps

Lorenzo Bianconi (3):
net: veth: introduce bulking for XDP_PASS
net: xdp: move XDP_BATCH_SIZE in common header
net: veth: alloc skb in bulk for ndo_xdp_xmit

 drivers/net/veth.c  | 101 ++++++++++++++++++++++++++++++++------------
 include/net/xdp.h   |   2 +
 kernel/bpf/cpumap.c |  13 +++---
 net/core/xdp.c      |  11 +++++
 4 files changed, 92 insertions(+), 35 deletions(-)
Signature · 1 line
2.29.2