netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/8] bpf_redirect_peer fixes
@ 2023-11-12 20:30 Daniel Borkmann
  2023-11-12 20:30 ` [PATCH bpf v2 1/8] net, vrf: Move dstats structure to core Daniel Borkmann
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Daniel Borkmann @ 2023-11-12 20:30 UTC (permalink / raw)
  To: martin.lau; +Cc: kuba, razor, sdf, netdev, bpf, Daniel Borkmann

This fixes bpf_redirect_peer stats accounting for veth and netkit,
and adds tstats in the first place for the latter. Utilise indirect
call wrapper for bpf_redirect_peer, and improve test coverage of the
latter also for netkit devices. Details in the patches, thanks!

The series was targeted at bpf originally, and is done here as well,
so it can trigger BPF CI. Jakub, if you think directly going via net
is better since the majority of the diff touches net anyway, that is
fine, too.

Thanks!

v1 -> v2:
  - Move stats allocation/freeing into net core (Jakub)
  - As prepwork for the above, move vrf's dstats over into the core
  - Add a check into stats alloc to enforce tstats upon
    implementing ndo_get_peer_dev
  - Add Acks from the mailing list to unchanged patches

Daniel Borkmann (6):
  net, vrf: Move dstats structure to core
  net: Move {l,t,d}stats allocation to core and convert veth & vrf
  netkit: Add tstats per-CPU traffic counters
  bpf, netkit: Add indirect call wrapper for fetching peer dev
  selftests/bpf: De-veth-ize the tc_redirect test case
  selftests/bpf: Add netkit to tc_redirect selftest

Peilin Ye (2):
  veth: Use tstats per-CPU traffic counters
  bpf: Fix dev's rx stats for bpf_redirect_peer traffic

 drivers/net/netkit.c                          |  22 +-
 drivers/net/veth.c                            |  44 +--
 drivers/net/vrf.c                             |  38 +--
 include/linux/netdevice.h                     |  18 +
 include/net/netkit.h                          |   6 +
 net/core/dev.c                                |  55 ++-
 net/core/filter.c                             |  19 +-
 .../selftests/bpf/prog_tests/tc_redirect.c    | 317 +++++++++++-------
 8 files changed, 324 insertions(+), 195 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-11-13 16:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-12 20:30 [PATCH bpf v2 0/8] bpf_redirect_peer fixes Daniel Borkmann
2023-11-12 20:30 ` [PATCH bpf v2 1/8] net, vrf: Move dstats structure to core Daniel Borkmann
2023-11-13  8:51   ` Nikolay Aleksandrov
2023-11-12 20:30 ` [PATCH bpf v2 2/8] net: Move {l,t,d}stats allocation to core and convert veth & vrf Daniel Borkmann
2023-11-13  8:52   ` Nikolay Aleksandrov
2023-11-13  9:57   ` Simon Horman
2023-11-13 13:04     ` Daniel Borkmann
2023-11-13 10:03   ` Simon Horman
2023-11-13 13:05     ` Daniel Borkmann
2023-11-13 16:15       ` Simon Horman
2023-11-12 20:30 ` [PATCH bpf v2 3/8] netkit: Add tstats per-CPU traffic counters Daniel Borkmann
2023-11-12 20:30 ` [PATCH bpf v2 4/8] veth: Use " Daniel Borkmann
2023-11-12 22:09   ` Peilin Ye
2023-11-12 22:12     ` Daniel Borkmann
2023-11-13  8:53   ` Nikolay Aleksandrov
2023-11-12 20:30 ` [PATCH bpf v2 5/8] bpf: Fix dev's rx stats for bpf_redirect_peer traffic Daniel Borkmann
2023-11-13  8:54   ` Nikolay Aleksandrov
2023-11-12 20:30 ` [PATCH bpf v2 6/8] bpf, netkit: Add indirect call wrapper for fetching peer dev Daniel Borkmann
2023-11-12 20:30 ` [PATCH bpf v2 7/8] selftests/bpf: De-veth-ize the tc_redirect test case Daniel Borkmann
2023-11-13  8:55   ` Nikolay Aleksandrov
2023-11-12 20:30 ` [PATCH bpf v2 8/8] selftests/bpf: Add netkit to tc_redirect selftest Daniel Borkmann
2023-11-13  8:55   ` Nikolay Aleksandrov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).