netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper
@ 2022-09-21 16:48 Lorenzo Bianconi
  2022-09-21 16:48 ` [PATCH v3 bpf-next 1/3] bpf: Tweak definition of KF_TRUSTED_ARGS Lorenzo Bianconi
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Lorenzo Bianconi @ 2022-09-21 16:48 UTC (permalink / raw)
  To: bpf
  Cc: netdev, ast, daniel, andrii, davem, kuba, edumazet, pabeni,
	pablo, fw, netfilter-devel, lorenzo.bianconi, brouer, toke,
	memxor

Introduce bpf_ct_set_nat_info kfunc helper in order to set source and
destination nat addresses/ports in a new allocated ct entry not inserted
in the connection tracking table yet.
Introduce support for per-parameter trusted args.

Changes since v2:
- use int instead of a pointer for port in bpf_ct_set_nat_info signature
- modify KF_TRUSTED_ARGS definition in order to referenced pointer constraint
  just for PTR_TO_BTF_ID
- drop patch 2/4

Changes since v1:
- enable CONFIG_NF_NAT in tools/testing/selftests/bpf/config

Kumar Kartikeya Dwivedi (1):
  bpf: Tweak definition of KF_TRUSTED_ARGS

Lorenzo Bianconi (2):
  net: netfilter: add bpf_ct_set_nat_info kfunc helper
  selftests/bpf: add tests for bpf_ct_set_nat_info kfunc

 Documentation/bpf/kfuncs.rst                  | 24 ++++++----
 kernel/bpf/btf.c                              | 18 +++++--
 net/netfilter/nf_conntrack_bpf.c              | 47 ++++++++++++++++++-
 tools/testing/selftests/bpf/config            |  1 +
 .../testing/selftests/bpf/prog_tests/bpf_nf.c | 10 ++--
 .../testing/selftests/bpf/progs/test_bpf_nf.c | 27 +++++++++++
 6 files changed, 110 insertions(+), 17 deletions(-)

-- 
2.37.3


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

end of thread, other threads:[~2022-09-24 14:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 16:48 [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper Lorenzo Bianconi
2022-09-21 16:48 ` [PATCH v3 bpf-next 1/3] bpf: Tweak definition of KF_TRUSTED_ARGS Lorenzo Bianconi
2022-09-22  2:39   ` Alexei Starovoitov
2022-09-22  8:00     ` Kumar Kartikeya Dwivedi
2022-09-21 16:48 ` [PATCH v3 bpf-next 2/3] net: netfilter: add bpf_ct_set_nat_info kfunc helper Lorenzo Bianconi
2022-09-23 21:34   ` Nathan Chancellor
2022-09-23 22:20     ` Lorenzo Bianconi
2022-09-24 11:10       ` Lorenzo Bianconi
2022-09-24 14:51         ` Nathan Chancellor
2022-09-21 16:48 ` [PATCH v3 bpf-next 3/3] selftests/bpf: add tests for bpf_ct_set_nat_info kfunc Lorenzo Bianconi
2022-09-22  2:40 ` [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper patchwork-bot+netdevbpf

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).