tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c- Extension
.c- Size
- 6989 bytes
- Lines
- 276
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
netinet/in.harpa/inet.hunistd.hstdlib.hstring.herrno.hsched.hnet/if.hlinux/compiler.hbpf/libbpf.hnetwork_helpers.htest_progs.htest_btf_skc_cls_ingress.skel.h
Detected Declarations
struct testfunction reset_testfunction print_err_linefunction v6only_truefunction v6only_falsefunction run_testfunction test_conn_ipv4function test_conn_ipv6function test_conn_dualfunction test_syncookie_ipv4function test_syncookie_ipv6function test_syncookie_dualfunction test_btf_skc_cls_ingress
Annotated Snippet
struct test {
const char *desc;
void (*run)(struct test_btf_skc_cls_ingress *skel);
};
#define DEF_TEST(name) { #name, test_##name }
static struct test tests[] = {
DEF_TEST(conn_ipv4),
DEF_TEST(conn_ipv6),
DEF_TEST(conn_dual),
DEF_TEST(syncookie_ipv4),
DEF_TEST(syncookie_ipv6),
DEF_TEST(syncookie_dual),
};
void test_btf_skc_cls_ingress(void)
{
struct test_btf_skc_cls_ingress *skel;
struct netns_obj *ns;
int i;
skel = test_btf_skc_cls_ingress__open_and_load();
if (!ASSERT_OK_PTR(skel, "test_btf_skc_cls_ingress__open_and_load"))
return;
for (i = 0; i < ARRAY_SIZE(tests); i++) {
if (!test__start_subtest(tests[i].desc))
continue;
ns = prepare_netns(skel);
if (!ns)
break;
tests[i].run(skel);
print_err_line(skel);
reset_test(skel);
netns_free(ns);
}
test_btf_skc_cls_ingress__destroy(skel);
}
Annotation
- Immediate include surface: `netinet/in.h`, `arpa/inet.h`, `unistd.h`, `stdlib.h`, `string.h`, `errno.h`, `sched.h`, `net/if.h`.
- Detected declarations: `struct test`, `function reset_test`, `function print_err_line`, `function v6only_true`, `function v6only_false`, `function run_test`, `function test_conn_ipv4`, `function test_conn_ipv6`, `function test_conn_dual`, `function test_syncookie_ipv4`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.