drivers/infiniband/sw/siw/iwarp.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/sw/siw/iwarp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/sw/siw/iwarp.h- Extension
.h- Size
- 7991 bytes
- Lines
- 368
- 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
rdma/rdma_user_cm.hlinux/types.hasm/byteorder.h
Detected Declarations
struct mpa_rr_paramsstruct mpa_rrstruct mpa_v2_datastruct mpa_markerstruct mpa_trailerstruct iwarp_ctrlstruct iwarp_rdma_writestruct iwarp_rdma_rreqstruct iwarp_rdma_rrespstruct iwarp_sendstruct iwarp_send_invstruct iwarp_terminatestruct iwarp_ctrl_untaggedstruct iwarp_ctrl_taggedenum mpa_v2_ctrlenum term_elayerenum ddp_etypeenum ddp_ecodeenum rdmap_untagged_qnenum rdmap_etypeenum rdmap_ecodeenum llp_ecodeenum llp_etypeenum rdma_opcodefunction __mpa_rr_set_revisionfunction __mpa_rr_revisionfunction __ddp_get_versionfunction __rdmap_get_versionfunction __rdmap_get_opcodefunction __rdmap_set_opcodefunction __rdmap_term_layerfunction __rdmap_term_set_layerfunction __rdmap_term_etypefunction __rdmap_term_set_etypefunction __rdmap_term_ecodefunction __rdmap_term_set_ecode
Annotated Snippet
struct mpa_rr_params {
__be16 bits;
__be16 pd_len;
};
/*
* MPA request/response header bits & fields
*/
enum {
MPA_RR_FLAG_MARKERS = cpu_to_be16(0x8000),
MPA_RR_FLAG_CRC = cpu_to_be16(0x4000),
MPA_RR_FLAG_REJECT = cpu_to_be16(0x2000),
MPA_RR_FLAG_ENHANCED = cpu_to_be16(0x1000),
MPA_RR_FLAG_GSO_EXP = cpu_to_be16(0x0800),
MPA_RR_MASK_REVISION = cpu_to_be16(0x00ff)
};
/*
* MPA request/reply header
*/
struct mpa_rr {
__u8 key[16];
struct mpa_rr_params params;
};
static inline void __mpa_rr_set_revision(__be16 *bits, u8 rev)
{
*bits = (*bits & ~MPA_RR_MASK_REVISION) |
(cpu_to_be16(rev) & MPA_RR_MASK_REVISION);
}
static inline u8 __mpa_rr_revision(__be16 mpa_rr_bits)
{
__be16 rev = mpa_rr_bits & MPA_RR_MASK_REVISION;
return be16_to_cpu(rev);
}
enum mpa_v2_ctrl {
MPA_V2_PEER_TO_PEER = cpu_to_be16(0x8000),
MPA_V2_ZERO_LENGTH_RTR = cpu_to_be16(0x4000),
MPA_V2_RDMA_WRITE_RTR = cpu_to_be16(0x8000),
MPA_V2_RDMA_READ_RTR = cpu_to_be16(0x4000),
MPA_V2_RDMA_NO_RTR = cpu_to_be16(0x0000),
MPA_V2_MASK_IRD_ORD = cpu_to_be16(0x3fff)
};
struct mpa_v2_data {
__be16 ird;
__be16 ord;
};
struct mpa_marker {
__be16 rsvd;
__be16 fpdu_hmd; /* FPDU header-marker distance (= MPA's FPDUPTR) */
};
/*
* maximum MPA trailer
*/
struct mpa_trailer {
__u8 pad[4];
__be32 crc;
};
#define MPA_HDR_SIZE 2
#define MPA_CRC_SIZE 4
/*
* Common portion of iWARP headers (MPA, DDP, RDMAP)
* for any FPDU
*/
struct iwarp_ctrl {
__be16 mpa_len;
__be16 ddp_rdmap_ctrl;
};
/*
* DDP/RDMAP Hdr bits & fields
*/
enum {
DDP_FLAG_TAGGED = cpu_to_be16(0x8000),
DDP_FLAG_LAST = cpu_to_be16(0x4000),
DDP_MASK_RESERVED = cpu_to_be16(0x3C00),
DDP_MASK_VERSION = cpu_to_be16(0x0300),
RDMAP_MASK_VERSION = cpu_to_be16(0x00C0),
RDMAP_MASK_RESERVED = cpu_to_be16(0x0030),
RDMAP_MASK_OPCODE = cpu_to_be16(0x000f)
};
Annotation
- Immediate include surface: `rdma/rdma_user_cm.h`, `linux/types.h`, `asm/byteorder.h`.
- Detected declarations: `struct mpa_rr_params`, `struct mpa_rr`, `struct mpa_v2_data`, `struct mpa_marker`, `struct mpa_trailer`, `struct iwarp_ctrl`, `struct iwarp_rdma_write`, `struct iwarp_rdma_rreq`, `struct iwarp_rdma_rresp`, `struct iwarp_send`.
- 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.