Skip to content

Introduce bpf_ct_set_nat_info kfunc helper

Lorenzo Bianconi bpf netdev netfilter-devel 3 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 6 repliesApplied 3/3
  2. v24 patches 12 repliesSuperseded
  3. v14 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- 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

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Tweak definition of KF_TRUSTED_ARGSDocumentation/bpf/kfuncs.rst kernel/bpf/btf.c+29 -132 repliesApplied
2/3net: netfilter: add bpf_ct_set_nat_info kfunc helpernet/netfilter/nf_conntrack_bpf.c+46 -14 repliesApplied
3/3selftests/bpf: add tests for bpf_ct_set_nat_info kfunctools/testing/selftests/bpf/config tools/testing/selftests/bpf/prog_tests/bpf_nf.c tools/testing/selftests/bpf/progs/test_bpf_nf.c+35 -30 repliesApplied

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/3
2/3T-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 bpf-next 0/3] Introduce bpf_ct_set_nat_info kfunc helper

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(-)
Signature · 1 line
2.37.3