All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Support direct writes to nf_conn:mark
@ 2022-08-15 19:35 Daniel Xu
  2022-08-15 19:35 ` [PATCH bpf-next 1/3] bpf: Remove duplicate PTR_TO_BTF_ID RO check Daniel Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Daniel Xu @ 2022-08-15 19:35 UTC (permalink / raw)
  To: bpf, ast, daniel, andrii, memxor
  Cc: Daniel Xu, pablo, fw, netfilter-devel, netdev, linux-kernel

Support direct writes to nf_conn:mark from TC and XDP prog types. This
is useful when applications want to store per-connection metadata. This
is also particularly useful for applications that run both bpf and
iptables/nftables because the latter can trivially access this metadata.

One example use case would be if a bpf prog is responsible for advanced
packet classification and iptables/nftables is later used for routing
due to pre-existing/legacy code.

Daniel Xu (3):
  bpf: Remove duplicate PTR_TO_BTF_ID RO check
  bpf: Add support for writing to nf_conn:mark
  selftests/bpf: Add tests for writing to nf_conn:mark

 include/net/netfilter/nf_conntrack_bpf.h      | 18 +++++++
 kernel/bpf/verifier.c                         |  3 --
 net/core/filter.c                             | 34 +++++++++++++
 net/netfilter/nf_conntrack_bpf.c              | 50 +++++++++++++++++++
 .../testing/selftests/bpf/prog_tests/bpf_nf.c |  1 +
 .../testing/selftests/bpf/progs/test_bpf_nf.c |  6 ++-
 .../selftests/bpf/progs/test_bpf_nf_fail.c    | 14 ++++++
 7 files changed, 121 insertions(+), 5 deletions(-)

-- 
2.37.1


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

end of thread, other threads:[~2022-08-18 20:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 19:35 [PATCH bpf-next 0/3] Support direct writes to nf_conn:mark Daniel Xu
2022-08-15 19:35 ` [PATCH bpf-next 1/3] bpf: Remove duplicate PTR_TO_BTF_ID RO check Daniel Xu
2022-08-15 19:35 ` [PATCH bpf-next 2/3] bpf: Add support for writing to nf_conn:mark Daniel Xu
2022-08-15 22:25   ` Toke Høiland-Jørgensen
2022-08-15 22:40     ` Florian Westphal
2022-08-15 22:47       ` Alexei Starovoitov
2022-08-16 10:43         ` Toke Høiland-Jørgensen
2022-08-17 18:28       ` Daniel Xu
2022-08-17 18:34         ` Florian Westphal
2022-08-17 18:41           ` Daniel Xu
2022-08-15 22:41     ` Daniel Xu
2022-08-16  1:15   ` kernel test robot
2022-08-18 20:01   ` kernel test robot
2022-08-15 19:35 ` [PATCH bpf-next 3/3] selftests/bpf: Add tests " Daniel Xu

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.