linux/tools/testing
Stanislav Fomichev 9cacf81f81 bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE
Add custom implementation of getsockopt hook for TCP_ZEROCOPY_RECEIVE.
We skip generic hooks for TCP_ZEROCOPY_RECEIVE and have a custom
call in do_tcp_getsockopt using the on-stack data. This removes
3% overhead for locking/unlocking the socket.

Without this patch:
     3.38%     0.07%  tcp_mmap  [kernel.kallsyms]  [k] __cgroup_bpf_run_filter_getsockopt
            |
             --3.30%--__cgroup_bpf_run_filter_getsockopt
                       |
                        --0.81%--__kmalloc

With the patch applied:
     0.52%     0.12%  tcp_mmap  [kernel.kallsyms]  [k] __cgroup_bpf_run_filter_getsockopt_kern

Note, exporting uapi/tcp.h requires removing netinet/tcp.h
from test_progs.h because those headers have confliciting
definitions.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210115163501.805133-2-sdf@google.com
2021-01-20 14:23:00 -08:00
..
fault-injection
ktest Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
kunit kunit: tool: Force the use of the 'tty' console for UML 2021-01-04 09:18:38 -07:00
nvdimm x86, libnvdimm/test: Remove COPY_MC_TEST 2020-10-26 18:08:35 +01:00
radix-tree ida: Free allocated bitmap in error path 2020-10-07 09:11:33 -04:00
scatterlist RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
selftests bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE 2021-01-20 14:23:00 -08:00
vsock SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00