drivers/infiniband/hw/mlx4/main.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/mlx4/main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/mlx4/main.c- Extension
.c- Size
- 91169 bytes
- Lines
- 3394
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/module.hlinux/init.hlinux/slab.hlinux/errno.hlinux/netdevice.hlinux/inetdevice.hlinux/rtnetlink.hlinux/if_vlan.hlinux/sched/mm.hlinux/sched/task.hnet/ipv6.hnet/addrconf.hnet/devlink.hrdma/ib_smi.hrdma/ib_user_verbs.hrdma/ib_addr.hrdma/ib_cache.hrdma/uverbs_ioctl.hnet/bonding.hlinux/mlx4/driver.hlinux/mlx4/cmd.hlinux/mlx4/qp.hmlx4_ib.hrdma/mlx4-abi.h
Detected Declarations
struct mlx4_ib_steeringstruct default_rulesstruct diag_counterfunction check_flow_steering_supportfunction num_ib_portsfunction mlx4_ib_update_gids_v1function mlx4_ib_update_gids_v1_v2function mlx4_ib_update_gidsfunction free_gid_entryfunction mlx4_ib_add_gidfunction mlx4_ib_del_gidfunction mlx4_ib_gid_index_to_real_indexfunction mlx4_ib_query_devicefunction mlx4_ib_port_link_layerfunction ib_link_query_portfunction state_to_phys_statefunction eth_link_query_portfunction __mlx4_ib_query_portfunction mlx4_ib_query_portfunction __mlx4_ib_query_gidfunction mlx4_ib_query_gidfunction mlx4_ib_query_sl2vlfunction mlx4_init_sl2vl_tblfunction __mlx4_ib_query_pkeyfunction mlx4_ib_query_pkeyfunction mlx4_ib_modify_devicefunction mlx4_ib_SET_PORTfunction mlx4_ib_modify_portfunction mlx4_ib_alloc_ucontextfunction mlx4_ib_dealloc_ucontextfunction mlx4_ib_disassociate_ucontextfunction mlx4_ib_alloc_pdfunction mlx4_ib_dealloc_pdfunction mlx4_ib_alloc_xrcdfunction mlx4_ib_dealloc_xrcdfunction add_gid_entryfunction mlx4_ib_delete_counters_tablefunction mlx4_ib_add_mcfunction __mlx4_ib_default_rules_matchfunction __mlx4_ib_create_default_rulesfunction __mlx4_ib_create_flowfunction __mlx4_ib_destroy_flowfunction mlx4_ib_tunnel_steer_addfunction mlx4_ib_add_dont_trap_rulefunction mlx4_ib_destroy_flowfunction mlx4_ib_mcg_attachfunction list_for_each_entry_safefunction mlx4_ib_mcg_detach
Annotated Snippet
module_init(mlx4_ib_init);
module_exit(mlx4_ib_cleanup);
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/slab.h`, `linux/errno.h`, `linux/netdevice.h`, `linux/inetdevice.h`, `linux/rtnetlink.h`, `linux/if_vlan.h`.
- Detected declarations: `struct mlx4_ib_steering`, `struct default_rules`, `struct diag_counter`, `function check_flow_steering_support`, `function num_ib_ports`, `function mlx4_ib_update_gids_v1`, `function mlx4_ib_update_gids_v1_v2`, `function mlx4_ib_update_gids`, `function free_gid_entry`, `function mlx4_ib_add_gid`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.