diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-07-23 16:42:27 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-07-23 16:45:36 -0700 |
commit | d9e8d14b12202504bfa04182d3fae68d137ea39b (patch) | |
tree | d8dafb16faa4c368d550a3e0ab5166c0b1cbc8b9 /tools/testing/selftests/bpf/prog_tests/pinning.c | |
parent | da97553ec6e1ba229f5b90c0e25799ea8afede51 (diff) | |
parent | eed92afdd14c26b1e319fbe9eaa80e62ffa97a2c (diff) | |
download | linux-d9e8d14b12202504bfa04182d3fae68d137ea39b.tar.gz linux-d9e8d14b12202504bfa04182d3fae68d137ea39b.tar.bz2 linux-d9e8d14b12202504bfa04182d3fae68d137ea39b.zip |
Merge branch 'bpf: Allow bpf tcp iter to do bpf_(get|set)sockopt'
Martin KaFai says:
====================
This set is to allow bpf tcp iter to call bpf_(get|set)sockopt.
With bpf-tcp-cc, new algo rollout happens more often. Instead of
restarting the applications to pick up the new tcp-cc, this set
allows the bpf tcp iter to call bpf_(get|set)sockopt(TCP_CONGESTION).
It is not limited to TCP_CONGESTION, the bpf tcp iter can call
bpf_(get|set)sockopt() with other options. The bpf tcp iter can read
into all the fields of a tcp_sock, so there is a lot of flexibility
to select the desired sk to do setsockopt(), e.g. it can test for
TCP_LISTEN only and leave the established connections untouched,
or check the addr/port, or check the current tcp-cc name, ...etc.
Patch 1-4 are some cleanup and prep work in the tcp and bpf seq_file.
Patch 5 is to have the tcp seq_file iterate on the
port+addr lhash2 instead of the port only listening_hash.
Patch 6 is to have the bpf tcp iter doing batching which
then allows lock_sock. lock_sock is needed for setsockopt.
Patch 7 allows the bpf tcp iter to call bpf_(get|set)sockopt.
v2:
- Use __GFP_NOWARN in patch 6
- Add bpf_getsockopt() in patch 7 to give a symmetrical user experience.
selftest in patch 8 is changed to also cover bpf_getsockopt().
- Remove CAP_NET_ADMIN check in patch 7. Tracing bpf prog has already
required CAP_SYS_ADMIN or CAP_PERFMON.
- Move some def macros to bpf_tracing_net.h in patch 8
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/pinning.c')
0 files changed, 0 insertions, 0 deletions