net/sched/cls_api.c
Source file repositories/reference/linux-study-clean/net/sched/cls_api.c
File Facts
- System
- Linux kernel
- Corpus path
net/sched/cls_api.c- Extension
.c- Size
- 102610 bytes
- Lines
- 4126
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/types.hlinux/kernel.hlinux/string.hlinux/errno.hlinux/err.hlinux/skbuff.hlinux/init.hlinux/kmod.hlinux/slab.hlinux/idr.hlinux/jhash.hlinux/rculist.hlinux/rhashtable.hnet/net_namespace.hnet/sock.hnet/netlink.hnet/pkt_sched.hnet/pkt_cls.hnet/tc_act/tc_pedit.hnet/tc_act/tc_mirred.hnet/tc_act/tc_vlan.hnet/tc_act/tc_tunnel_key.hnet/tc_act/tc_csum.hnet/tc_act/tc_gact.hnet/tc_act/tc_police.hnet/tc_act/tc_sample.hnet/tc_act/tc_skbedit.hnet/tc_act/tc_ct.hnet/tc_act/tc_mpls.hnet/tc_act/tc_gate.hnet/flow_offload.h
Detected Declarations
struct tcf_exts_miss_cookie_nodestruct tcf_filter_chain_list_itemstruct tcf_netstruct tcf_block_owner_itemstruct tcf_chain_infostruct tcf_dump_argsfunction tcf_exts_miss_cookie_base_allocfunction tcf_exts_miss_cookie_base_destroyfunction tcf_exts_miss_cookie_lookupfunction tcf_exts_miss_cookie_base_allocfunction tcf_exts_miss_cookie_base_destroyfunction tc_skb_ext_tc_enablefunction tc_skb_ext_tc_disablefunction destroy_obj_hashfnfunction tcf_proto_signal_destroyingfunction tcf_proto_cmpfunction tcf_proto_exists_destroyingfunction tcf_proto_signal_destroyedfunction list_for_each_entryfunction tcf_proto_lookup_opsfunction register_tcf_proto_opsfunction unregister_tcf_proto_opsfunction tcf_queue_workfunction tcf_auto_priofunction tcf_proto_check_kindfunction tcf_proto_is_unlockedfunction tcf_proto_getfunction tcf_proto_count_useswfunction tcf_proto_destroyfunction tcf_proto_putfunction tcf_proto_check_deletefunction tcf_proto_mark_deletefunction tcf_proto_is_deletingfunction tcf_chain_head_change_itemfunction tcf_chain0_head_changefunction tcf_chain_detachfunction tcf_block_destroyfunction tcf_chain_destroyfunction tcf_chain_holdfunction tcf_chain_held_by_acts_onlyfunction list_for_each_entryfunction list_for_each_entry_rcufunction __tcf_chain_putfunction tcf_chain_putfunction tcf_chain_put_by_actfunction tcf_chain_put_explicitly_createdfunction tcf_chain_flushfunction tcf_block_offload_init
Annotated Snippet
subsys_initcall(tc_filter_init);
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/kernel.h`, `linux/string.h`, `linux/errno.h`, `linux/err.h`, `linux/skbuff.h`, `linux/init.h`.
- Detected declarations: `struct tcf_exts_miss_cookie_node`, `struct tcf_filter_chain_list_item`, `struct tcf_net`, `struct tcf_block_owner_item`, `struct tcf_chain_info`, `struct tcf_dump_args`, `function tcf_exts_miss_cookie_base_alloc`, `function tcf_exts_miss_cookie_base_destroy`, `function tcf_exts_miss_cookie_lookup`, `function tcf_exts_miss_cookie_base_alloc`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.