Commit 2ead7b09 authored by Leon Romanovsky's avatar Leon Romanovsky
Browse files

RDMA/efa: Rely on CPU address in create‑QP

Align this code with other locations where efa_free_mapped() depends on the
presence of a valid CPU address, which is guaranteed when qp->rq_size != 0.

Link: https://patch.msgid.link/20260213-refactor-umem-v1-6-f3be85847922@nvidia.com


Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent 25c74104
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -579,7 +579,7 @@ static int qp_mmap_entries_setup(struct efa_qp *qp,

	resp->llq_desc_offset &= ~PAGE_MASK;

	if (qp->rq_size) {
	if (qp->rq_cpu_addr) {
		address = dev->db_bar_addr + resp->rq_db_offset;

		qp->rq_db_mmap_entry =
@@ -828,7 +828,7 @@ int efa_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
err_destroy_qp:
	efa_destroy_qp_handle(dev, create_qp_resp.qp_handle);
err_free_mapped:
	if (qp->rq_size)
	if (qp->rq_cpu_addr)
		efa_free_mapped(dev, qp->rq_cpu_addr, qp->rq_dma_addr,
				qp->rq_size, DMA_TO_DEVICE);
err_out: