drivers/infiniband/hw/mthca/mthca_wqe.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/mthca/mthca_wqe.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/mthca/mthca_wqe.h- Extension
.h- Size
- 3402 bytes
- Lines
- 132
- 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/types.h
Detected Declarations
struct mthca_next_segstruct mthca_tavor_ud_segstruct mthca_arbel_ud_segstruct mthca_bind_segstruct mthca_raddr_segstruct mthca_atomic_segstruct mthca_data_segstruct mthca_mlx_segfunction mthca_set_data_segfunction mthca_set_data_seg_inval
Annotated Snippet
struct mthca_next_seg {
__be32 nda_op; /* [31:6] next WQE [4:0] next opcode */
__be32 ee_nds; /* [31:8] next EE [7] DBD [6] F [5:0] next WQE size */
__be32 flags; /* [3] CQ [2] Event [1] Solicit */
__be32 imm; /* immediate data */
};
struct mthca_tavor_ud_seg {
u32 reserved1;
__be32 lkey;
__be64 av_addr;
u32 reserved2[4];
__be32 dqpn;
__be32 qkey;
u32 reserved3[2];
};
struct mthca_arbel_ud_seg {
__be32 av[8];
__be32 dqpn;
__be32 qkey;
u32 reserved[2];
};
struct mthca_bind_seg {
__be32 flags; /* [31] Atomic [30] rem write [29] rem read */
u32 reserved;
__be32 new_rkey;
__be32 lkey;
__be64 addr;
__be64 length;
};
struct mthca_raddr_seg {
__be64 raddr;
__be32 rkey;
u32 reserved;
};
struct mthca_atomic_seg {
__be64 swap_add;
__be64 compare;
};
struct mthca_data_seg {
__be32 byte_count;
__be32 lkey;
__be64 addr;
};
struct mthca_mlx_seg {
__be32 nda_op;
__be32 nds;
__be32 flags; /* [17] VL15 [16] SLR [14:12] static rate
[11:8] SL [3] C [2] E */
__be16 rlid;
__be16 vcrc;
};
static __always_inline void mthca_set_data_seg(struct mthca_data_seg *dseg,
struct ib_sge *sg)
{
dseg->byte_count = cpu_to_be32(sg->length);
dseg->lkey = cpu_to_be32(sg->lkey);
dseg->addr = cpu_to_be64(sg->addr);
}
static __always_inline void mthca_set_data_seg_inval(struct mthca_data_seg *dseg)
{
dseg->byte_count = 0;
dseg->lkey = cpu_to_be32(MTHCA_INVAL_LKEY);
dseg->addr = 0;
}
#endif /* MTHCA_WQE_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct mthca_next_seg`, `struct mthca_tavor_ud_seg`, `struct mthca_arbel_ud_seg`, `struct mthca_bind_seg`, `struct mthca_raddr_seg`, `struct mthca_atomic_seg`, `struct mthca_data_seg`, `struct mthca_mlx_seg`, `function mthca_set_data_seg`, `function mthca_set_data_seg_inval`.
- 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.