drivers/infiniband/hw/erdma/erdma_cq.c

Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/erdma/erdma_cq.c

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/hw/erdma/erdma_cq.c
Extension
.c
Size
7857 bytes
Lines
269
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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (be32_to_cpu(cqe->qpn) == qpn) {
			++nqp_cqe;
		} else if (nqp_cqe) {
			dst_cqe = get_queue_entry(cq->kern_cq.qbuf,
						  cur_cq_ci + nqp_cqe,
						  cq->depth, CQE_SHIFT);
			owner = FIELD_GET(ERDMA_CQE_HDR_OWNER_MASK,
					  be32_to_cpu(dst_cqe->hdr));
			cqe->hdr = cpu_to_be32(
				(be32_to_cpu(cqe->hdr) &
				 ~ERDMA_CQE_HDR_OWNER_MASK) |
				FIELD_PREP(ERDMA_CQE_HDR_OWNER_MASK, owner));
			memcpy(dst_cqe, cqe, sizeof(*cqe));
		}

		--ncqe;
	}

	cq->kern_cq.ci = prev_cq_ci + nqp_cqe;
	spin_unlock_irqrestore(&cq->kern_cq.lock, flags);
}

Annotation

Implementation Notes