drivers/vdpa/solidrun/snet_main.c
Source file repositories/reference/linux-study-clean/drivers/vdpa/solidrun/snet_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/solidrun/snet_main.c- Extension
.c- Size
- 27710 bytes
- Lines
- 1138
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/iopoll.hsnet_vdpa.h
Detected Declarations
function Copyrightfunction snet_cfg_irq_hndlrfunction snet_vq_irq_hndlrfunction snet_free_irqsfunction snet_set_vq_addressfunction snet_set_vq_numfunction snet_kick_vqfunction snet_kick_vq_with_datafunction snet_set_vq_cbfunction snet_set_vq_readyfunction snet_get_vq_readyfunction snet_vq_state_is_initialfunction snet_set_vq_statefunction snet_get_vq_statefunction snet_get_vq_irqfunction snet_get_vq_alignfunction snet_reset_devfunction snet_resetfunction snet_get_config_sizefunction snet_get_featuresfunction snet_set_drv_featuresfunction snet_get_drv_featuresfunction snet_get_vq_num_maxfunction snet_set_config_cbfunction snet_get_device_idfunction snet_get_vendor_idfunction snet_get_statusfunction snet_write_conffunction snet_request_irqsfunction snet_set_statusfunction snet_get_configfunction snet_set_configfunction snet_suspendfunction snet_resumefunction psnet_open_pf_barfunction snet_open_vf_barfunction snet_free_cfgfunction psnet_detect_barfunction psnet_unmap_unused_barsfunction psnet_read_cfgfunction psnet_alloc_irq_vectorfunction snet_alloc_irq_vectorfunction snet_free_vqsfunction snet_build_vqsfunction psnet_get_next_irq_numfunction snet_reserve_irq_idxfunction snet_vdpa_probe_pffunction snet_vdpa_probe_vf
Annotated Snippet
static struct pci_driver snet_vdpa_driver = {
.name = "snet-vdpa-driver",
.id_table = snet_driver_pci_ids,
.probe = snet_vdpa_probe,
.remove = snet_vdpa_remove,
};
module_pci_driver(snet_vdpa_driver);
MODULE_AUTHOR("Alvaro Karsz <alvaro.karsz@solid-run.com>");
MODULE_DESCRIPTION("SolidRun vDPA driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/iopoll.h`, `snet_vdpa.h`.
- Detected declarations: `function Copyright`, `function snet_cfg_irq_hndlr`, `function snet_vq_irq_hndlr`, `function snet_free_irqs`, `function snet_set_vq_address`, `function snet_set_vq_num`, `function snet_kick_vq`, `function snet_kick_vq_with_data`, `function snet_set_vq_cb`, `function snet_set_vq_ready`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: pattern 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.