net/openvswitch/datapath.c
Source file repositories/reference/linux-study-clean/net/openvswitch/datapath.c
File Facts
- System
- Linux kernel
- Corpus path
net/openvswitch/datapath.c- Extension
.c- Size
- 73201 bytes
- Lines
- 2893
- 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.
- 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/init.hlinux/module.hlinux/if_arp.hlinux/if_vlan.hlinux/in.hlinux/ip.hlinux/jhash.hlinux/delay.hlinux/time.hlinux/etherdevice.hlinux/kernel.hlinux/kthread.hlinux/mutex.hlinux/percpu.hlinux/rcupdate.hlinux/tcp.hlinux/udp.hlinux/ethtool.hlinux/wait.hasm/div64.hlinux/highmem.hlinux/netfilter_bridge.hlinux/netfilter_ipv4.hlinux/inetdevice.hlinux/list.hlinux/openvswitch.hlinux/rculist.hlinux/dmi.hnet/genetlink.hnet/gso.hnet/net_namespace.hnet/netns/generic.h
Detected Declarations
function ovs_must_notifyfunction ovs_notifyfunction ovs_lockfunction ovs_unlockfunction lockdep_ovsl_is_heldfunction get_dpifindexfunction destroy_dp_rcufunction lockdep_ovsl_is_heldfunction ovs_vport_update_upcall_statsfunction ovs_dp_detach_portfunction ovs_dp_process_packetfunction ovs_dp_upcallfunction queue_gso_packetsfunction upcall_msg_sizefunction pad_packetfunction queue_userspace_packetfunction nla_put_u16function nla_put_u32function skb_zerocopyfunction ovs_packet_cmd_executefunction get_dp_statsfunction for_each_possible_cpufunction should_fill_keyfunction should_fill_maskfunction should_fill_actionsfunction ovs_flow_cmd_msg_sizefunction ovs_flow_cmd_fill_statsfunction ovs_flow_cmd_fill_actionsfunction ovs_flow_cmd_fill_infofunction ovs_flow_cmd_newfunction ovs_nla_init_match_and_actionfunction ovs_flow_cmd_setfunction ovs_flow_cmd_getfunction ovs_flow_cmd_delfunction ovs_flow_cmd_dumpfunction ovs_dp_cmd_msg_sizefunction ovs_dp_cmd_fill_infofunction ovs_dp_reset_user_featuresfunction ovs_dp_set_upcall_portidsfunction ovs_dp_get_upcall_portidfunction ovs_dp_changefunction ovs_dp_stats_initfunction ovs_dp_vport_initfunction ovs_dp_cmd_newfunction __dp_destroyfunction ovs_dp_cmd_delfunction ovs_dp_cmd_setfunction ovs_dp_cmd_get
Annotated Snippet
module_init(dp_init);
module_exit(dp_cleanup);
MODULE_DESCRIPTION("Open vSwitch switching datapath");
MODULE_LICENSE("GPL");
MODULE_ALIAS_GENL_FAMILY(OVS_DATAPATH_FAMILY);
MODULE_ALIAS_GENL_FAMILY(OVS_VPORT_FAMILY);
MODULE_ALIAS_GENL_FAMILY(OVS_FLOW_FAMILY);
MODULE_ALIAS_GENL_FAMILY(OVS_PACKET_FAMILY);
MODULE_ALIAS_GENL_FAMILY(OVS_METER_FAMILY);
MODULE_ALIAS_GENL_FAMILY(OVS_CT_LIMIT_FAMILY);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/if_arp.h`, `linux/if_vlan.h`, `linux/in.h`, `linux/ip.h`, `linux/jhash.h`, `linux/delay.h`.
- Detected declarations: `function ovs_must_notify`, `function ovs_notify`, `function ovs_lock`, `function ovs_unlock`, `function lockdep_ovsl_is_held`, `function get_dpifindex`, `function destroy_dp_rcu`, `function lockdep_ovsl_is_held`, `function ovs_vport_update_upcall_stats`, `function ovs_dp_detach_port`.
- 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.
- 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.