tools/testing/selftests/bpf/prog_tests/test_csum_diff.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/prog_tests/test_csum_diff.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/prog_tests/test_csum_diff.c- Extension
.c- Size
- 7926 bytes
- Lines
- 409
- 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
test_progs.hcsum_diff_test.skel.h
Detected Declarations
struct testcasefunction trigger_csum_difffunction test_csum_difffunction test_test_csum_diff
Annotated Snippet
struct testcase {
unsigned long long to_buff[BUFF_SZ / 8];
unsigned int to_buff_len;
unsigned long long from_buff[BUFF_SZ / 8];
unsigned int from_buff_len;
unsigned short seed;
unsigned short result;
};
#define NUM_PUSH_TESTS 4
struct testcase push_tests[NUM_PUSH_TESTS] = {
{
.to_buff = {
0xdeadbeefdeadbeef,
},
.to_buff_len = 8,
.from_buff = {},
.from_buff_len = 0,
.seed = 0,
.result = 0x3b3b
},
{
.to_buff = {
0xdeadbeefdeadbeef,
0xbeefdeadbeefdead,
},
.to_buff_len = 16,
.from_buff = {},
.from_buff_len = 0,
.seed = 0x1234,
.result = 0x88aa
},
{
.to_buff = {
0xdeadbeefdeadbeef,
0xbeefdeadbeefdead,
},
.to_buff_len = 15,
.from_buff = {},
.from_buff_len = 0,
.seed = 0x1234,
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
.result = 0xcaa9
#else
.result = 0x87fd
#endif
},
{
.to_buff = {
0x327b23c66b8b4567,
0x66334873643c9869,
0x19495cff74b0dc51,
0x625558ec2ae8944a,
0x46e87ccd238e1f29,
0x507ed7ab3d1b58ba,
0x41b71efb2eb141f2,
0x7545e14679e2a9e3,
0x5bd062c2515f007c,
0x4db127f812200854,
0x1f16e9e80216231b,
0x66ef438d1190cde7,
0x3352255a140e0f76,
0x0ded7263109cf92e,
0x1befd79f7fdcc233,
0x6b68079a41a7c4c9,
0x25e45d324e6afb66,
0x431bd7b7519b500d,
0x7c83e4583f2dba31,
0x62bbd95a257130a3,
0x628c895d436c6125,
0x721da317333ab105,
0x2d1d5ae92443a858,
0x75a2a8d46763845e,
0x79838cb208edbdab,
0x0b03e0c64353d0cd,
0x54e49eb4189a769b,
0x2ca8861171f32454,
0x02901d820836c40e,
0x081386413a95f874,
0x7c3dbd3d1e7ff521,
0x6ceaf087737b8ddc,
0x4516dde922221a70,
0x614fd4a13006c83e,
0x5577f8e1419ac241,
0x05072367440badfc,
0x77465f013804823e,
0x5c482a977724c67e,
0x5e884adc2463b9ea,
0x2d51779651ead36b,
Annotation
- Immediate include surface: `test_progs.h`, `csum_diff_test.skel.h`.
- Detected declarations: `struct testcase`, `function trigger_csum_diff`, `function test_csum_diff`, `function test_test_csum_diff`.
- 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.