drivers/infiniband/sw/rxe/rxe_resp.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/sw/rxe/rxe_resp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/sw/rxe/rxe_resp.c- Extension
.c- Size
- 43157 bytes
- Lines
- 1775
- 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/skbuff.hrxe.hrxe_loc.hrxe_queue.h
Detected Declarations
function rxe_resp_queue_pktfunction get_reqfunction check_psnfunction check_op_seqfunction check_qp_attr_accessfunction check_op_validfunction get_srq_wqefunction rxe_get_recv_wqefunction check_resourcefunction rxe_resp_check_lengthfunction qp_resp_from_rethfunction qp_resp_from_atmethfunction get_rkey_violation_statefunction check_rkeyfunction send_data_infunction write_data_infunction process_flushfunction atomic_replyfunction atomic_write_replyfunction read_replyfunction invalidate_rkeyfunction executefunction do_completefunction send_common_ackfunction send_ackfunction send_atomic_ackfunction send_read_response_ackfunction acknowledgefunction cleanupfunction duplicate_requestfunction do_qp_eventfunction do_class_ac_errorfunction do_class_d1e_errorfunction drain_req_pktsfunction flush_recv_wqefunction flush_recv_queuefunction rxe_receiverfunction qp_state
Annotated Snippet
if (diff > 0) {
if (qp->resp.sent_psn_nak)
return RESPST_CLEANUP;
qp->resp.sent_psn_nak = 1;
rxe_counter_inc(rxe, RXE_CNT_OUT_OF_SEQ_REQ);
return RESPST_ERR_PSN_OUT_OF_SEQ;
} else if (diff < 0) {
rxe_counter_inc(rxe, RXE_CNT_DUP_REQ);
return RESPST_DUPLICATE_REQUEST;
}
if (qp->resp.sent_psn_nak)
qp->resp.sent_psn_nak = 0;
break;
case IB_QPT_UC:
if (qp->resp.drop_msg || diff != 0) {
if (pkt->mask & RXE_START_MASK) {
qp->resp.drop_msg = 0;
return RESPST_CHK_OP_SEQ;
}
qp->resp.drop_msg = 1;
return RESPST_CLEANUP;
}
break;
default:
break;
}
return RESPST_CHK_OP_SEQ;
}
static enum resp_states check_op_seq(struct rxe_qp *qp,
struct rxe_pkt_info *pkt)
{
switch (qp_type(qp)) {
case IB_QPT_RC:
switch (qp->resp.opcode) {
case IB_OPCODE_RC_SEND_FIRST:
case IB_OPCODE_RC_SEND_MIDDLE:
switch (pkt->opcode) {
case IB_OPCODE_RC_SEND_MIDDLE:
case IB_OPCODE_RC_SEND_LAST:
case IB_OPCODE_RC_SEND_LAST_WITH_IMMEDIATE:
case IB_OPCODE_RC_SEND_LAST_WITH_INVALIDATE:
return RESPST_CHK_OP_VALID;
default:
return RESPST_ERR_MISSING_OPCODE_LAST_C;
}
case IB_OPCODE_RC_RDMA_WRITE_FIRST:
case IB_OPCODE_RC_RDMA_WRITE_MIDDLE:
switch (pkt->opcode) {
case IB_OPCODE_RC_RDMA_WRITE_MIDDLE:
case IB_OPCODE_RC_RDMA_WRITE_LAST:
case IB_OPCODE_RC_RDMA_WRITE_LAST_WITH_IMMEDIATE:
return RESPST_CHK_OP_VALID;
default:
return RESPST_ERR_MISSING_OPCODE_LAST_C;
}
default:
switch (pkt->opcode) {
case IB_OPCODE_RC_SEND_MIDDLE:
case IB_OPCODE_RC_SEND_LAST:
case IB_OPCODE_RC_SEND_LAST_WITH_IMMEDIATE:
case IB_OPCODE_RC_SEND_LAST_WITH_INVALIDATE:
case IB_OPCODE_RC_RDMA_WRITE_MIDDLE:
case IB_OPCODE_RC_RDMA_WRITE_LAST:
case IB_OPCODE_RC_RDMA_WRITE_LAST_WITH_IMMEDIATE:
return RESPST_ERR_MISSING_OPCODE_FIRST;
default:
return RESPST_CHK_OP_VALID;
}
}
break;
case IB_QPT_UC:
switch (qp->resp.opcode) {
case IB_OPCODE_UC_SEND_FIRST:
case IB_OPCODE_UC_SEND_MIDDLE:
switch (pkt->opcode) {
case IB_OPCODE_UC_SEND_MIDDLE:
case IB_OPCODE_UC_SEND_LAST:
case IB_OPCODE_UC_SEND_LAST_WITH_IMMEDIATE:
return RESPST_CHK_OP_VALID;
Annotation
- Immediate include surface: `linux/skbuff.h`, `rxe.h`, `rxe_loc.h`, `rxe_queue.h`.
- Detected declarations: `function rxe_resp_queue_pkt`, `function get_req`, `function check_psn`, `function check_op_seq`, `function check_qp_attr_access`, `function check_op_valid`, `function get_srq_wqe`, `function rxe_get_recv_wqe`, `function check_resource`, `function rxe_resp_check_length`.
- 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.