drivers/infiniband/hw/cxgb4/iw_cxgb4.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/cxgb4/iw_cxgb4.h- Extension
.h- Size
- 27668 bytes
- Lines
- 1078
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hlinux/list.hlinux/spinlock.hlinux/xarray.hlinux/completion.hlinux/netdevice.hlinux/sched/mm.hlinux/pci.hlinux/dma-mapping.hlinux/inet.hlinux/wait.hlinux/kref.hlinux/timer.hlinux/io.hlinux/workqueue.hasm/byteorder.hnet/net_namespace.hrdma/ib_verbs.hrdma/iw_cm.hrdma/rdma_netlink.hrdma/iw_portmap.hrdma/restrack.hcxgb4.hcxgb4_uld.hl2t.hrdma/cxgb4-abi.ht4.h
Detected Declarations
struct c4iw_id_tablestruct c4iw_resourcestruct c4iw_qid_liststruct c4iw_dev_ucontextstruct c4iw_statstruct c4iw_statsstruct c4iw_hw_queuestruct wr_log_entrystruct c4iw_rdevstruct c4iw_wr_waitstruct c4iw_devstruct uld_ctxstruct c4iw_pdstruct tpt_attributesstruct c4iw_mrstruct c4iw_mwstruct c4iw_cqstruct c4iw_mpa_attributesstruct c4iw_qp_attributesstruct c4iw_qpstruct c4iw_srqstruct c4iw_ucontextstruct c4iw_mm_entrystruct mpa_messagestruct mpa_v2_conn_paramsstruct terminate_messagestruct c4iw_ep_commonstruct c4iw_listen_epstruct c4iw_ep_statsstruct c4iw_epenum c4iw_rdev_flagsenum db_stateenum c4iw_qp_attr_maskenum c4iw_qp_stateenum c4iw_mmid_stateenum c4iw_layers_typesenum c4iw_rdma_ecodesenum c4iw_ddp_ecodesenum c4iw_mpa_ecodesenum c4iw_ep_stateenum c4iw_ep_flagsenum c4iw_ep_historyenum conn_pre_alloc_buffersfunction Copyrightfunction c4iw_fatal_errorfunction c4iw_num_stagsfunction c4iw_put_wr_waitfunction c4iw_get_wr_wait
Annotated Snippet
struct c4iw_id_table {
u32 flags;
u32 start; /* logical minimal id */
u32 last; /* hint for find */
u32 max;
spinlock_t lock;
unsigned long *table;
};
struct c4iw_resource {
struct c4iw_id_table tpt_table;
struct c4iw_id_table qid_table;
struct c4iw_id_table pdid_table;
struct c4iw_id_table srq_table;
};
struct c4iw_qid_list {
struct list_head entry;
u32 qid;
};
struct c4iw_dev_ucontext {
struct list_head qpids;
struct list_head cqids;
struct mutex lock;
struct kref kref;
};
enum c4iw_rdev_flags {
T4_FATAL_ERROR = (1<<0),
T4_STATUS_PAGE_DISABLED = (1<<1),
};
struct c4iw_stat {
u64 total;
u64 cur;
u64 max;
u64 fail;
};
struct c4iw_stats {
struct mutex lock;
struct c4iw_stat qid;
struct c4iw_stat pd;
struct c4iw_stat stag;
struct c4iw_stat pbl;
struct c4iw_stat rqt;
struct c4iw_stat srqt;
struct c4iw_stat srq;
struct c4iw_stat ocqp;
u64 db_full;
u64 db_empty;
u64 db_drop;
u64 db_state_transitions;
u64 db_fc_interruptions;
u64 tcam_full;
u64 act_ofld_conn_fails;
u64 pas_ofld_conn_fails;
u64 neg_adv;
};
struct c4iw_hw_queue {
int t4_eq_status_entries;
int t4_max_eq_size;
int t4_max_iq_size;
int t4_max_rq_size;
int t4_max_sq_size;
int t4_max_qp_depth;
int t4_max_cq_depth;
int t4_stat_len;
};
struct wr_log_entry {
ktime_t post_host_time;
ktime_t poll_host_time;
u64 post_sge_ts;
u64 cqe_sge_ts;
u64 poll_sge_ts;
u16 qid;
u16 wr_id;
u8 opcode;
u8 valid;
};
struct c4iw_rdev {
struct c4iw_resource resource;
u32 qpmask;
u32 cqmask;
struct c4iw_dev_ucontext uctx;
struct gen_pool *pbl_pool;
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/list.h`, `linux/spinlock.h`, `linux/xarray.h`, `linux/completion.h`, `linux/netdevice.h`, `linux/sched/mm.h`, `linux/pci.h`.
- Detected declarations: `struct c4iw_id_table`, `struct c4iw_resource`, `struct c4iw_qid_list`, `struct c4iw_dev_ucontext`, `struct c4iw_stat`, `struct c4iw_stats`, `struct c4iw_hw_queue`, `struct wr_log_entry`, `struct c4iw_rdev`, `struct c4iw_wr_wait`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source 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.