bpf: expose bpf_{s,g}etsockopt helpers to bind{4,6} hooks
Status from this message: Applied, Thanks
Get series with b4
b4 am [email protected]Versions newest first
v2 from the cover letter
* remove version from bpf programs (Andrii Nakryiko)
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | selftests/bpf: rewrite test_sock_addr bind bpf into Ctools/ tools/ tools/ | +171 | 0 replies | |
| 2/3 | bpf: allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooksinclude/ net/ net/ +1 more | +12 | 0 replies | |
| 3/3 | selftests/bpf: extend bind{4,6} programs with a call to bpf_setsockopttools/ tools/ | +62 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Andrii Nakryiko | Andrey Ignatov |
|---|---|---|
| 1/3 | A-b | |
| 2/3 | A-b | |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next 0/3] bpf: expose bpf_{s,g}etsockopt helpers to bind{4,6} hooks
This might be useful for the listener sockets to pre-populate some options. Since those helpers require locked sockets, I'm changing bind hooks to lock/unlock the sockets. This should not cause any performance overhead because at this point there shouldn't be any socket lock contention and the locking/unlocking should be cheap.
Also, as part of the series, I convert test_sock_addr bpf assembly into C (and preserve the narrow load tests) to make it easier to extend with th bpf_setsockopt later on.
v2:
* remove version from bpf programs (Andrii Nakryiko)
Stanislav Fomichev (3):
selftests/bpf: rewrite test_sock_addr bind bpf into C
bpf: allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks selftests/bpf: extend bind{4,6} programs with a call to bpf_setsockopt
include/linux/bpf-cgroup.h | 12 +- net/core/filter.c | 4 + net/ipv4/af_inet.c | 2 +- net/ipv6/af_inet6.c | 2 +- .../testing/selftests/bpf/progs/bind4_prog.c | 102 +++++++++ .../testing/selftests/bpf/progs/bind6_prog.c | 119 +++++++++++ tools/testing/selftests/bpf/test_sock_addr.c | 196 ++---------------- 7 files changed, 245 insertions(+), 192 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/bind4_prog.c create mode 100644 tools/testing/selftests/bpf/progs/bind6_prog.c
Signature · 1 line
2.29.2.454.gaff20da3a2-goog