All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/6] Various BPF helper improvements
@ 2020-09-29 21:23 Daniel Borkmann
  2020-09-29 21:23 ` [PATCH bpf-next v3 1/6] bpf: add classid helper only based on skb->sk Daniel Borkmann
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Daniel Borkmann @ 2020-09-29 21:23 UTC (permalink / raw)
  To: ast; +Cc: daniel, john.fastabend, netdev, bpf

This series adds two BPF helpers, that is, one for retrieving the classid
of an skb and another one to redirect via the neigh subsystem, and improves
also the cookie helpers by removing the atomic counter. I've also added
the bpf_tail_call_static() helper to the libbpf API that we've been using
in Cilium for a while now, and last but not least the series adds a few
selftests. For details, please check individual patches, thanks!

v2 -> v3:
  - Removed double skb->dev = dev assignment (David)
  - Added headroom check for v6 path (David)
  - Set set flowi4_proto for ip_route_output_flow (David)
  - Rebased onto latest bpf-next
v1 -> v2:
  - Rework cookie generator to support nested contexts (Eric)
  - Use ip_neigh_gw6() and container_of() (David)
  - Rename __throw_build_bug() and improve comments (Andrii)
  - Use bpf_tail_call_static() also in BPF samples (Maciej)

Daniel Borkmann (6):
  bpf: add classid helper only based on skb->sk
  bpf, net: rework cookie generator as per-cpu one
  bpf: add redirect_neigh helper as redirect drop-in
  bpf, libbpf: add bpf_tail_call_static helper for bpf programs
  bpf, selftests: use bpf_tail_call_static where appropriate
  bpf, selftests: add redirect_neigh selftest

 include/linux/cookie.h                        |  51 +++
 include/linux/skbuff.h                        |   5 +
 include/linux/sock_diag.h                     |  14 +-
 include/net/net_namespace.h                   |   2 +-
 include/uapi/linux/bpf.h                      |  24 ++
 kernel/bpf/reuseport_array.c                  |   2 +-
 net/core/filter.c                             | 304 ++++++++++++++++--
 net/core/net_namespace.c                      |   9 +-
 net/core/sock_diag.c                          |   9 +-
 net/core/sock_map.c                           |   4 +-
 samples/bpf/sockex3_kern.c                    |  20 +-
 tools/include/uapi/linux/bpf.h                |  24 ++
 tools/lib/bpf/bpf_helpers.h                   |  46 +++
 tools/testing/selftests/bpf/progs/bpf_flow.c  |  12 +-
 tools/testing/selftests/bpf/progs/tailcall1.c |  28 +-
 tools/testing/selftests/bpf/progs/tailcall2.c |  14 +-
 tools/testing/selftests/bpf/progs/tailcall3.c |   4 +-
 .../selftests/bpf/progs/tailcall_bpf2bpf1.c   |   4 +-
 .../selftests/bpf/progs/tailcall_bpf2bpf2.c   |   6 +-
 .../selftests/bpf/progs/tailcall_bpf2bpf3.c   |   6 +-
 .../selftests/bpf/progs/tailcall_bpf2bpf4.c   |   6 +-
 .../selftests/bpf/progs/test_tc_neigh.c       | 144 +++++++++
 tools/testing/selftests/bpf/test_tc_neigh.sh  | 168 ++++++++++
 23 files changed, 826 insertions(+), 80 deletions(-)
 create mode 100644 include/linux/cookie.h
 create mode 100644 tools/testing/selftests/bpf/progs/test_tc_neigh.c
 create mode 100755 tools/testing/selftests/bpf/test_tc_neigh.sh

-- 
2.21.0


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

end of thread, other threads:[~2020-10-04 19:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 21:23 [PATCH bpf-next v3 0/6] Various BPF helper improvements Daniel Borkmann
2020-09-29 21:23 ` [PATCH bpf-next v3 1/6] bpf: add classid helper only based on skb->sk Daniel Borkmann
2020-09-30  1:24   ` Martin KaFai Lau
2020-09-29 21:23 ` [PATCH bpf-next v3 2/6] bpf, net: rework cookie generator as per-cpu one Daniel Borkmann
2020-09-30  2:05   ` Martin KaFai Lau
2020-09-29 21:23 ` [PATCH bpf-next v3 3/6] bpf: add redirect_neigh helper as redirect drop-in Daniel Borkmann
2020-09-30  6:48   ` Martin KaFai Lau
2020-09-30  7:58     ` Daniel Borkmann
2020-09-29 21:23 ` [PATCH bpf-next v3 4/6] bpf, libbpf: add bpf_tail_call_static helper for bpf programs Daniel Borkmann
2020-09-29 21:23 ` [PATCH bpf-next v3 5/6] bpf, selftests: use bpf_tail_call_static where appropriate Daniel Borkmann
2020-10-04 19:02   ` bpf_program__set_attach_target(prog, 0, "foo") cannot possibly work ? Luigi Rizzo
2020-09-29 21:23 ` [PATCH bpf-next v3 6/6] bpf, selftests: add redirect_neigh selftest Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.