net/core/failover.c
Source file repositories/reference/linux-study-clean/net/core/failover.c
File Facts
- System
- Linux kernel
- Corpus path
net/core/failover.c- Extension
.c- Size
- 7701 bytes
- Lines
- 320
- 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.
- 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/module.hlinux/etherdevice.huapi/linux/if_arp.hlinux/rtnetlink.hlinux/if_vlan.hnet/netdev_lock.hnet/failover.h
Detected Declarations
function failover_slave_registerfunction failover_slave_unregisterfunction failover_slave_link_changefunction failover_slave_name_changefunction failover_eventfunction failover_existing_slave_registerfunction failover_unregisterfunction failover_initfunction failover_exitmodule init failover_initexport failover_slave_unregisterexport failover_registerexport failover_unregister
Annotated Snippet
module_init(failover_init);
static __exit
void failover_exit(void)
{
unregister_netdevice_notifier(&failover_notifier);
}
module_exit(failover_exit);
MODULE_DESCRIPTION("Generic failover infrastructure/interface");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/module.h`, `linux/etherdevice.h`, `uapi/linux/if_arp.h`, `linux/rtnetlink.h`, `linux/if_vlan.h`, `net/netdev_lock.h`, `net/failover.h`.
- Detected declarations: `function failover_slave_register`, `function failover_slave_unregister`, `function failover_slave_link_change`, `function failover_slave_name_change`, `function failover_event`, `function failover_existing_slave_register`, `function failover_unregister`, `function failover_init`, `function failover_exit`, `module init failover_init`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.