All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC bpf-next v1 0/6] Introduce unstable CT lookup helpers
@ 2021-10-30 14:46 Kumar Kartikeya Dwivedi
  2021-10-30 14:46 ` [PATCH RFC bpf-next v1 1/6] bpf: Refactor bpf_check_mod_kfunc_call Kumar Kartikeya Dwivedi
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2021-10-30 14:46 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	Maxim Mikityanskiy, Florian Westphal, Jesper Dangaard Brouer,
	Toke Høiland-Jørgensen, netdev, netfilter-devel

This series adds unstable conntrack lookup helpers using BPF kfunc support.  The
patch adding the lookup helper is based off of Maxim's recent patch to aid in
rebasing their series on top of this, all adjusted to work with kfunc support
[0].

This is an RFC series, as I'm unsure whether the reference tracking for
PTR_TO_BTF_ID will be accepted. If not, we can go back to doing it the typical
way with PTR_TO_NF_CONN type, guarded with #if IS_ENABLED(CONFIG_NF_CONNTRACK).

Also, I want to understand whether it would make sense to introduce
check_helper_call style bpf_func_proto based argument checking for kfuncs, or
continue with how it is right now, since it doesn't seem correct that PTR_TO_MEM
can be passed where PTR_TO_BTF_ID may be expected. Only PTR_TO_CTX is enforced.

[0]: https://lore.kernel.org/bpf/20211019144655.3483197-8-maximmi@nvidia.com

Kumar Kartikeya Dwivedi (6):
  bpf: Refactor bpf_check_mod_kfunc_call
  bpf: Remove DEFINE_KFUNC_BTF_ID_SET
  bpf: Extend kfunc with PTR_TO_CTX and PTR_TO_MEM arguments
  bpf: Add reference tracking support to kfunc returned PTR_TO_BTF_ID
  net: netfilter: Add unstable CT lookup helper for XDP and TC-BPF
  selftests/bpf: Add referenced PTR_TO_BTF_ID selftest

 include/linux/bpf.h                           |  29 +-
 include/linux/btf.h                           |  54 +++-
 kernel/bpf/btf.c                              | 188 ++++++++++---
 kernel/bpf/verifier.c                         | 101 ++++++-
 net/bpf/test_run.c                            |  55 ++++
 net/core/filter.c                             |  56 ++++
 net/core/net_namespace.c                      |   1 +
 net/ipv4/tcp_bbr.c                            |   5 +-
 net/ipv4/tcp_cubic.c                          |   5 +-
 net/ipv4/tcp_dctcp.c                          |   5 +-
 net/netfilter/nf_conntrack_core.c             | 255 ++++++++++++++++++
 tools/testing/selftests/bpf/Makefile          |   2 +-
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |   5 +
 .../selftests/bpf/bpf_testmod/bpf_testmod.c   |   5 +-
 .../selftests/bpf/prog_tests/kfunc_call.c     |  18 +-
 .../selftests/bpf/progs/kfunc_call_test.c     |  21 ++
 16 files changed, 741 insertions(+), 64 deletions(-)

-- 
2.33.1


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

end of thread, other threads:[~2021-11-07 15:44 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 14:46 [PATCH RFC bpf-next v1 0/6] Introduce unstable CT lookup helpers Kumar Kartikeya Dwivedi
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 1/6] bpf: Refactor bpf_check_mod_kfunc_call Kumar Kartikeya Dwivedi
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 2/6] bpf: Remove DEFINE_KFUNC_BTF_ID_SET Kumar Kartikeya Dwivedi
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 3/6] bpf: Extend kfunc with PTR_TO_CTX and PTR_TO_MEM arguments Kumar Kartikeya Dwivedi
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 4/6] bpf: Add reference tracking support to kfunc returned PTR_TO_BTF_ID Kumar Kartikeya Dwivedi
2021-10-30 18:28   ` kernel test robot
2021-10-30 18:28     ` kernel test robot
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 5/6] net: netfilter: Add unstable CT lookup helper for XDP and TC-BPF Kumar Kartikeya Dwivedi
2021-10-30 16:44   ` kernel test robot
2021-10-30 17:27   ` kernel test robot
2021-10-31 19:10   ` Florian Westphal
2021-11-01 19:49     ` Toke Høiland-Jørgensen
2021-11-02 20:43       ` Florian Westphal
2021-11-05 20:48         ` Kumar Kartikeya Dwivedi
2021-11-02 23:19     ` Alexei Starovoitov
2021-10-30 14:46 ` [PATCH RFC bpf-next v1 6/6] selftests/bpf: Add referenced PTR_TO_BTF_ID selftest Kumar Kartikeya Dwivedi
2021-11-02 23:16 ` [PATCH RFC bpf-next v1 0/6] Introduce unstable CT lookup helpers Alexei Starovoitov
2021-11-04 12:55   ` Kumar Kartikeya Dwivedi
2021-11-05 20:49     ` Alexei Starovoitov
2021-11-05 21:13       ` Kumar Kartikeya Dwivedi
2021-11-06 18:13         ` Alexei Starovoitov
2021-11-07 15:44           ` Kumar Kartikeya Dwivedi

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.