bpf: Add SO_KEEPALIVE and related options to bpf_setsockopt
authorDmitry Yakunin <zeil@yandex-team.ru>
Sat, 20 Jun 2020 15:30:52 +0000 (18:30 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 24 Jun 2020 18:21:03 +0000 (11:21 -0700)
commitf9bcf96837f158db6ea982d15cd2c8161ca6bc23
treee12aa8a1816f41c7d1ccbc4c4a8455a99de4f1f4
parentaad4a0a9513af962137c4842463d11ed491eec37
bpf: Add SO_KEEPALIVE and related options to bpf_setsockopt

This patch adds support of SO_KEEPALIVE flag and TCP related options
to bpf_setsockopt() routine. This is helpful if we want to enable or tune
TCP keepalive for applications which don't do it in the userspace code.

v3:
  - update kernel-doc in uapi (Nikita Vetoshkin <nekto0n@yandex-team.ru>)

v4:
  - update kernel-doc in tools too (Alexei Starovoitov)
  - add test to selftests (Alexei Starovoitov)

Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200620153052.9439-3-zeil@yandex-team.ru
include/uapi/linux/bpf.h
net/core/filter.c
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/progs/connect4_prog.c