bpf, sockmap: Pull socket helpers out of listen test for general use
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 23 May 2023 02:56:13 +0000 (19:56 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 May 2023 14:10:50 +0000 (16:10 +0200)
commit4e02588d9a95b21f8d25d66cb6c24f9df1532f6b
tree6ef50823b608a86c8a14a6e530506b92768ce4a5
parente5c6de5fa025882babf89cecbed80acf49b987fa
bpf, sockmap: Pull socket helpers out of listen test for general use

No functional change here we merely pull the helpers in sockmap_listen.c
into a header file so we can use these in other programs. The tests we
are about to add aren't really _listen tests so doesn't make sense
to add them here.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20230523025618.113937-10-john.fastabend@gmail.com
tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h [new file with mode: 0644]
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c