Skip to content

Add bpf_skc_to_unix_sock() helper

Hengqi Chen bpf 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Use abstract socket in selftest (Alexei)
- Run checkpatch script over patches (Andrii)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Add bpf_skc_to_unix_sock() helperinclude/linux/bpf.h include/uapi/linux/bpf.h kernel/trace/bpf_trace.c +3 more+42 -00 replies
2/2selftests/bpf: Test bpf_skc_to_unix_sock() helpertools/testing/selftests/bpf/prog_tests/skc_to_unix_sock.c tools/testing/selftests/bpf/progs/test_skc_to_unix_sock.c+94 -00 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchSong Liu
1/2A-b
2/2

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 bpf-next v3 0/2] Add bpf_skc_to_unix_sock() helper

This patch set adds a new BPF helper bpf_skc_to_unix_sock(). The helper is used in tracing programs to cast a socket pointer to a unix_sock pointer.

v2->v3:
- Use abstract socket in selftest (Alexei)
- Run checkpatch script over patches (Andrii)

v1->v2:
- Update selftest, remove trailing spaces changes (Song)

Hengqi Chen (2):
bpf: Add bpf_skc_to_unix_sock() helper selftests/bpf: Test bpf_skc_to_unix_sock() helper

 include/linux/bpf.h                           |  1 +
 include/uapi/linux/bpf.h                      |  7 +++
 kernel/trace/bpf_trace.c                      |  2 +
 net/core/filter.c                             | 23 ++++++++
 scripts/bpf_doc.py                            |  2 +
 tools/include/uapi/linux/bpf.h                |  7 +++
 .../bpf/prog_tests/skc_to_unix_sock.c         | 54 +++++++++++++++++++
 .../bpf/progs/test_skc_to_unix_sock.c         | 40 ++++++++++++++
 8 files changed, 136 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/skc_to_unix_sock.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_skc_to_unix_sock.c

--
2.30.2