drivers/infiniband/hw/irdma/defs.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/irdma/defs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/irdma/defs.h- Extension
.h- Size
- 42588 bytes
- Lines
- 1189
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
enum irdma_protocol_usedenum irdma_cqp_op_typeenum irdma_qp_wqe_sizeenum irdma_ws_node_openum irdma_alignmentenum icrdma_protocol_usedfunction set_64bit_valfunction set_32bit_valfunction get_64bit_valfunction get_32bit_val
Annotated Snippet
if (!IRDMA_RING_FULL_ERR(_ring)) { \
(_ring).head = ((_ring).head + 1) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = -ENOMEM; \
} \
}
#define IRDMA_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \
{ \
register u32 size; \
size = (_ring).size; \
if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < size) { \
(_ring).head = ((_ring).head + (_count)) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = -ENOMEM; \
} \
}
#define IRDMA_SQ_RING_MOVE_HEAD(_ring, _retcode) \
{ \
register u32 size; \
size = (_ring).size; \
if (!IRDMA_SQ_RING_FULL_ERR(_ring)) { \
(_ring).head = ((_ring).head + 1) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = -ENOMEM; \
} \
}
#define IRDMA_SQ_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \
{ \
register u32 size; \
size = (_ring).size; \
if ((IRDMA_RING_USED_QUANTA(_ring) + (_count)) < (size - 256)) { \
(_ring).head = ((_ring).head + (_count)) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = -ENOMEM; \
} \
}
#define IRDMA_RING_MOVE_HEAD_BY_COUNT_NOCHECK(_ring, _count) \
(_ring).head = ((_ring).head + (_count)) % (_ring).size
#define IRDMA_RING_MOVE_TAIL(_ring) \
(_ring).tail = ((_ring).tail + 1) % (_ring).size
#define IRDMA_RING_MOVE_HEAD_NOCHECK(_ring) \
(_ring).head = ((_ring).head + 1) % (_ring).size
#define IRDMA_RING_MOVE_TAIL_BY_COUNT(_ring, _count) \
(_ring).tail = ((_ring).tail + (_count)) % (_ring).size
#define IRDMA_RING_SET_TAIL(_ring, _pos) \
(_ring).tail = (_pos) % (_ring).size
#define IRDMA_RING_FULL_ERR(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 1)) \
)
#define IRDMA_ERR_RING_FULL2(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 2)) \
)
#define IRDMA_ERR_RING_FULL3(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 3)) \
)
#define IRDMA_SQ_RING_FULL_ERR(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 257)) \
)
#define IRDMA_ERR_SQ_RING_FULL2(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 258)) \
)
#define IRDMA_ERR_SQ_RING_FULL3(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) == ((_ring).size - 259)) \
)
#define IRDMA_RING_MORE_WORK(_ring) \
( \
(IRDMA_RING_USED_QUANTA(_ring) != 0) \
)
#define IRDMA_RING_USED_QUANTA(_ring) \
( \
Annotation
- Detected declarations: `enum irdma_protocol_used`, `enum irdma_cqp_op_type`, `enum irdma_qp_wqe_size`, `enum irdma_ws_node_op`, `enum irdma_alignment`, `enum icrdma_protocol_used`, `function set_64bit_val`, `function set_32bit_val`, `function get_64bit_val`, `function get_32bit_val`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
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.