include/net/mana/gdma.h
Source file repositories/reference/linux-study-clean/include/net/mana/gdma.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/mana/gdma.h- Extension
.h- Size
- 23845 bytes
- Lines
- 1052
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma-mapping.hlinux/netdevice.hshm_channel.h
Detected Declarations
struct mana_service_workstruct gdma_resourcestruct gdma_msg_hdrstruct gdma_dev_idstruct gdma_req_hdrstruct gdma_resp_hdrstruct gdma_general_reqstruct gdma_general_respstruct gdma_sgestruct gdma_wqe_requeststruct mana_serv_workstruct gdma_mem_infostruct gdma_devstruct gdma_compstruct gdma_eventstruct gdma_queuestruct mana_eqstruct gdma_queuestruct gdma_queue_specstruct gdma_irq_contextstruct gdma_contextstruct gdma_wqestruct gdma_cqestruct gdma_eqestruct gdma_posted_wqe_infostruct gdma_generate_test_event_reqstruct gdma_verify_ver_reqstruct gdma_verify_ver_respstruct gdma_query_max_resources_respstruct gdma_list_devices_respstruct gdma_register_device_respstruct gdma_allocate_resource_range_reqstruct gdma_allocate_resource_range_respstruct gdma_destroy_resource_range_reqstruct gdma_create_queue_reqstruct gdma_create_queue_respstruct gdma_disable_queue_reqstruct gdma_query_hwc_timeout_reqstruct gdma_query_hwc_timeout_respstruct gdma_create_dma_region_reqstruct gdma_create_dma_region_respstruct gdma_dma_region_add_pages_reqstruct gdma_destroy_dma_region_reqstruct gdma_create_pd_reqstruct gdma_create_pd_respstruct gdma_destroy_pd_reqstruct gdma_destory_pd_respstruct gdma_create_mr_params
Annotated Snippet
struct mana_service_work {
struct work_struct work;
struct gdma_dev *gdma_dev;
enum gdma_service_type event;
};
struct gdma_resource {
/* Protect the bitmap */
spinlock_t lock;
/* The bitmap size in bits. */
u32 size;
/* The bitmap tracks the resources. */
unsigned long *map;
};
union gdma_doorbell_entry {
u64 as_uint64;
struct {
u64 id : 24;
u64 reserved : 8;
u64 tail_ptr : 31;
u64 arm : 1;
} cq;
struct {
u64 id : 24;
u64 wqe_cnt : 8;
u64 tail_ptr : 32;
} rq;
struct {
u64 id : 24;
u64 reserved : 8;
u64 tail_ptr : 32;
} sq;
struct {
u64 id : 16;
u64 reserved : 16;
u64 tail_ptr : 31;
u64 arm : 1;
} eq;
}; /* HW DATA */
struct gdma_msg_hdr {
u32 hdr_type;
u32 msg_type;
u16 msg_version;
u16 hwc_msg_id;
u32 msg_size;
}; /* HW DATA */
struct gdma_dev_id {
union {
struct {
u16 type;
u16 instance;
};
u32 as_uint32;
};
}; /* HW DATA */
struct gdma_req_hdr {
struct gdma_msg_hdr req;
struct gdma_msg_hdr resp; /* The expected response */
struct gdma_dev_id dev_id;
u32 activity_id;
}; /* HW DATA */
struct gdma_resp_hdr {
struct gdma_msg_hdr response;
struct gdma_dev_id dev_id;
u32 activity_id;
u32 status;
u32 reserved;
}; /* HW DATA */
struct gdma_general_req {
struct gdma_req_hdr hdr;
}; /* HW DATA */
#define GDMA_MESSAGE_V1 1
#define GDMA_MESSAGE_V2 2
#define GDMA_MESSAGE_V3 3
#define GDMA_MESSAGE_V4 4
Annotation
- Immediate include surface: `linux/dma-mapping.h`, `linux/netdevice.h`, `shm_channel.h`.
- Detected declarations: `struct mana_service_work`, `struct gdma_resource`, `struct gdma_msg_hdr`, `struct gdma_dev_id`, `struct gdma_req_hdr`, `struct gdma_resp_hdr`, `struct gdma_general_req`, `struct gdma_general_resp`, `struct gdma_sge`, `struct gdma_wqe_request`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- 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.