linux-stable/tools/testing/selftests
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
..
arm64 arm64: selftests: Fix spelling of 'Mismatch' 2021-01-15 10:05:27 +00:00
bpf bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE 2021-01-20 14:23:00 -08:00
breakpoints
capabilities
cgroup selftests/cgroup: Fix build on older distros 2020-11-10 15:13:25 -07:00
clone3 selftests/clone3: Fix build error 2020-12-07 14:34:55 -07:00
core selftests/core: add regression test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC 2020-12-19 16:23:19 +01:00
cpu-hotplug
cpufreq
dma selftests/dma: add test application for DMA_MAP_BENCHMARK 2020-11-27 10:33:42 +01:00
dmabuf-heaps
drivers Networking fixes for 5.11-rc3, including fixes from netfilter, wireless 2021-01-05 12:38:56 -08:00
efivarfs
exec tools/testing/selftests: add self-test for verifying load alignment 2020-10-16 11:11:21 -07:00
filesystems selftests/filesystems: expand epoll with epoll_pwait2 2020-12-19 11:18:38 -08:00
firmware linux-kselftest-next-5.10-rc1 2020-10-15 15:14:32 -07:00
fpu
ftrace selftests/ftrace: check for do_sys_openat2 in user-memory test 2020-10-27 16:45:51 -06:00
futex
gpio selftests/gpio: Add to CLEAN rule rather than overriding 2020-11-10 14:40:13 -07:00
ia64
intel_pstate selftests: intel_pstate: ftime() is deprecated 2020-11-10 14:41:32 -07:00
ipc
ir
kcmp
kexec
kmod
kselftest tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
kvm KVM: selftests: Implement perf_test_util more conventionally 2021-01-07 18:07:31 -05:00
lib
livepatch selftests/livepatch: Do not check order when using "comm" for dmesg checking 2020-08-27 15:27:24 +02:00
lkdtm powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
locking
media_tests
membarrier
memfd selftests/memfd: Fix implicit declaration warnings 2020-11-10 14:42:04 -07:00
memory-hotplug
mincore
mount selftests: mount: add nosymfollow tests 2020-08-27 16:06:47 -04:00
mqueue
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-01-20 12:16:11 -08:00
netfilter selftests: netfilter: Pass family parameter "-f" to conntrack tool 2021-01-10 09:38:15 +01:00
nsfs
ntb
openat2 selftests: openat2: add RESOLVE_ conflict test 2020-12-03 10:16:28 +01:00
pid_namespace
pidfd selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c 2020-10-27 17:04:01 -06:00
powerpc selftests/powerpc: Fix uninitialized variable warning 2020-12-04 01:01:21 +11:00
prctl
proc selftests: proc: fix warning: _GNU_SOURCE redefined 2020-11-05 10:08:14 -07:00
pstore
ptp
ptrace selftests: Add missing gitignore entries 2020-09-23 10:19:25 -06:00
rcutorture Merge branches 'cpuinfo.2020.11.06a', 'doc.2020.11.06a', 'fixes.2020.11.19b', 'lockdep.2020.11.02a', 'tasks.2020.11.06a' and 'torture.2020.11.06a' into HEAD 2020-11-19 19:37:47 -08:00
resctrl
rseq rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch. 2020-12-07 14:09:45 -07:00
rtc
safesetid
seccomp selftests/seccomp: Update kernel config 2020-12-02 11:20:54 -08:00
sgx selftests/sgx: Use a statically generated 3072-bit RSA key 2020-11-18 18:26:00 +01:00
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch selftests: Add benchmark for syscall user dispatch 2020-12-02 15:07:57 +01:00
sysctl
tc-testing tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
timens selftests/timens: added selftest for /proc/stat btime 2020-11-03 11:05:40 +01:00
timers selftests/timers: Turn off timeout setting 2020-08-20 15:49:28 -06:00
tmpfs
tpm2
uevent
user
vDSO selftests/vDSO: fix -Wformat warning in vdso_test_correctness 2021-01-04 09:25:45 -07:00
vm selftests/vm: fix building protection keys test 2020-12-29 15:36:49 -08:00
watchdog
wireguard Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK 2020-12-02 13:47:17 +01:00
x86 linux-kselftest-next-5.11-rc1 2020-12-16 00:17:58 -08:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h linux-kselftest-fixes-5.10-rc3 2020-11-06 15:42:42 -08:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: filter kselftest headers from command in lib.mk 2020-10-27 16:51:06 -06:00
Makefile selftests: Skip BPF seftests by default 2021-01-04 09:27:20 -07:00
run_kselftest.sh selftests/run_kselftest.sh: fix dry-run typo 2020-11-10 14:51:39 -07:00