kernel/bpf/devmap.c
Source file repositories/reference/linux-study-clean/kernel/bpf/devmap.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/bpf/devmap.c- Extension
.c- Size
- 32340 bytes
- Lines
- 1218
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bpf.hlinux/local_lock.hnet/xdp.hlinux/filter.htrace/events/xdp.hlinux/btf_ids.h
Detected Declarations
struct xdp_dev_bulk_queuestruct bpf_dtab_netdevstruct bpf_dtabfunction dev_map_alloc_checkfunction dev_map_init_mapfunction dev_map_freefunction hlist_for_each_entry_safefunction dev_map_get_next_keyfunction local_bh_disablefunction dev_map_hash_get_next_keyfunction dev_map_bpf_prog_runfunction bq_xmit_allfunction xdp_do_flushfunction list_for_each_entry_safefunction local_bh_disablefunction xdp_do_flushfunction __xdp_enqueuefunction dev_map_bpf_prog_run_skbfunction dev_xdp_enqueuefunction dev_map_enqueuefunction is_valid_dstfunction dev_map_enqueue_clonefunction is_ifindex_excludedfunction get_upper_ifindexesfunction netdev_for_each_upper_dev_rcufunction dev_map_enqueue_multifunction hlist_for_each_entry_rcufunction dev_map_generic_redirectfunction dev_map_redirect_clonefunction dev_map_redirect_multifunction hlist_for_each_entry_rcufunction __dev_map_entry_freefunction dev_map_delete_elemfunction dev_map_hash_delete_elemfunction __dev_map_update_elemfunction dev_map_update_elemfunction __dev_map_hash_update_elemfunction dev_map_hash_update_elemfunction dev_map_redirectfunction dev_hash_map_redirectfunction dev_map_mem_usagefunction dev_map_hash_remove_netdevfunction hlist_for_each_entry_safefunction dev_map_notificationfunction for_each_possible_cpufunction list_for_each_entry_rcufunction dev_map_initmodule init dev_map_init
Annotated Snippet
subsys_initcall(dev_map_init);
Annotation
- Immediate include surface: `linux/bpf.h`, `linux/local_lock.h`, `net/xdp.h`, `linux/filter.h`, `trace/events/xdp.h`, `linux/btf_ids.h`.
- Detected declarations: `struct xdp_dev_bulk_queue`, `struct bpf_dtab_netdev`, `struct bpf_dtab`, `function dev_map_alloc_check`, `function dev_map_init_map`, `function dev_map_free`, `function hlist_for_each_entry_safe`, `function dev_map_get_next_key`, `function local_bh_disable`, `function dev_map_hash_get_next_key`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.