include/net/tc_act/tc_sample.h
Source file repositories/reference/linux-study-clean/include/net/tc_act/tc_sample.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/tc_act/tc_sample.h- Extension
.h- Size
- 752 bytes
- Lines
- 36
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/act_api.hlinux/tc_act/tc_sample.hnet/psample.h
Detected Declarations
struct tcf_samplefunction tcf_sample_ratefunction tcf_sample_truncatefunction tcf_sample_trunc_size
Annotated Snippet
struct tcf_sample {
struct tc_action common;
u32 rate;
bool truncate;
u32 trunc_size;
struct psample_group __rcu *psample_group;
u32 psample_group_num;
struct list_head tcfm_list;
};
#define to_sample(a) ((struct tcf_sample *)a)
static inline __u32 tcf_sample_rate(const struct tc_action *a)
{
return to_sample(a)->rate;
}
static inline bool tcf_sample_truncate(const struct tc_action *a)
{
return to_sample(a)->truncate;
}
static inline int tcf_sample_trunc_size(const struct tc_action *a)
{
return to_sample(a)->trunc_size;
}
#endif /* __NET_TC_SAMPLE_H */
Annotation
- Immediate include surface: `net/act_api.h`, `linux/tc_act/tc_sample.h`, `net/psample.h`.
- Detected declarations: `struct tcf_sample`, `function tcf_sample_rate`, `function tcf_sample_truncate`, `function tcf_sample_trunc_size`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.