aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/helpers.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2023-07-20 17:30:12 +0200
committerMartin KaFai Lau <martin.lau@kernel.org>2023-07-25 14:02:47 -0700
commit22408d58a42cb59b88dcec3694f477a838dd68ed (patch)
tree3ab10cc4d9b1eaf4dc31abbb2840f41e4221bdde /kernel/bpf/helpers.c
parentbpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign (diff)
downloadlinux-rng-22408d58a42cb59b88dcec3694f477a838dd68ed.tar.xz
linux-rng-22408d58a42cb59b88dcec3694f477a838dd68ed.zip
selftests/bpf: Test that SO_REUSEPORT can be used with sk_assign helper
We use two programs to check that the new reuseport logic is executed appropriately. The first is a TC clsact program which bpf_sk_assigns the skb to a UDP or TCP socket created by user space. Since the test communicates via lo we see both directions of packets in the eBPF. Traffic ingressing to the reuseport socket is identified by looking at the destination port. For TCP, we additionally need to make sure that we only assign the initial SYN packets towards our listening socket. The network stack then creates a request socket which transitions to ESTABLISHED after the 3WHS. The second is a reuseport program which shares the fact that it has been executed with user space. This tells us that the delayed lookup mechanism is working. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Co-developed-by: Lorenz Bauer <lmb@isovalent.com> Signed-off-by: Lorenz Bauer <lmb@isovalent.com> Cc: Joe Stringer <joe@cilium.io> Link: https://lore.kernel.org/r/20230720-so-reuseport-v6-8-7021b683cdae@isovalent.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel/bpf/helpers.c')
0 files changed, 0 insertions, 0 deletions