tools/testing/selftests/bpf/progs/test_xdp_noinline.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/test_xdp_noinline.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/progs/test_xdp_noinline.c- Extension
.c- Size
- 19551 bytes
- Lines
- 812
- 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
stddef.hstdbool.hstring.hlinux/pkt_cls.hlinux/bpf.hlinux/in.hlinux/if_ether.hlinux/ip.hlinux/ipv6.hlinux/icmp.hlinux/icmpv6.hlinux/tcp.hlinux/udp.hbpf/bpf_helpers.hbpf/bpf_endian.hbpf_compiler.h
Detected Declarations
struct flow_keystruct packet_descriptionstruct ctl_valuestruct vip_definitionstruct vip_metastruct real_pos_lrustruct real_definitionstruct lb_statsstruct eth_hdrfunction rol32function jhashfunction __jhash_nwordsfunction jhash_2wordsfunction calc_offsetfunction __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function __attribute__function get_packet_dstfunction connection_table_lookupfunction process_l3_headers_v6function process_l3_headers_v4function process_packetfunction balancer_ingress_v4function balancer_ingress_v6
Annotated Snippet
struct flow_key {
union {
__be32 src;
__be32 srcv6[4];
};
union {
__be32 dst;
__be32 dstv6[4];
};
union {
__u32 ports;
__u16 port16[2];
};
__u8 proto;
};
struct packet_description {
struct flow_key flow;
__u8 flags;
};
struct ctl_value {
union {
__u64 value;
__u32 ifindex;
__u8 mac[6];
};
};
struct vip_definition {
union {
__be32 vip;
__be32 vipv6[4];
};
__u16 port;
__u16 family;
__u8 proto;
};
struct vip_meta {
__u32 flags;
__u32 vip_num;
};
struct real_pos_lru {
__u32 pos;
__u64 atime;
};
struct real_definition {
union {
__be32 dst;
__be32 dstv6[4];
};
__u8 flags;
};
struct lb_stats {
__u64 v2;
__u64 v1;
};
struct {
__uint(type, BPF_MAP_TYPE_HASH);
__uint(max_entries, 512);
__type(key, struct vip_definition);
__type(value, struct vip_meta);
} vip_map SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_LRU_HASH);
__uint(max_entries, 300);
__uint(map_flags, 1U << 1);
__type(key, struct flow_key);
__type(value, struct real_pos_lru);
} lru_cache SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_ARRAY);
__uint(max_entries, 12 * 655);
__type(key, __u32);
__type(value, __u32);
} ch_rings SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_ARRAY);
__uint(max_entries, 40);
__type(key, __u32);
__type(value, struct real_definition);
} reals SEC(".maps");
Annotation
- Immediate include surface: `stddef.h`, `stdbool.h`, `string.h`, `linux/pkt_cls.h`, `linux/bpf.h`, `linux/in.h`, `linux/if_ether.h`, `linux/ip.h`.
- Detected declarations: `struct flow_key`, `struct packet_description`, `struct ctl_value`, `struct vip_definition`, `struct vip_meta`, `struct real_pos_lru`, `struct real_definition`, `struct lb_stats`, `struct eth_hdr`, `function rol32`.
- 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.