Skip to content

Commit a8639a7

Browse files
kwan-intcjgunthorpe
authored andcommitted
IB/hfi1: Eliminate opcode tests on mr deref
When an old ack_queue entry is used to store an incoming request, it may need to clean up the old entry if it is still referencing the MR. Originally only RDMA READ request needed to reference MR on the responder side and therefore the opcode was tested when cleaning up the old entry. The introduction of tid rdma specific operations in the ack_queue makes the specific opcode tests wrong. Multiple opcodes (RDMA READ, TID RDMA READ, and TID RDMA WRITE) may need MR ref cleanup. Remove the opcode specific tests associated with the ack_queue. Fixes: f48ad61 ("IB/hfi1: Move driver out of staging") Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Kaike Wan <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 93b289b commit a8639a7

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/hfi1/rc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,7 +3088,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
30883088
update_ack_queue(qp, next);
30893089
}
30903090
e = &qp->s_ack_queue[qp->r_head_ack_queue];
3091-
if (e->opcode == OP(RDMA_READ_REQUEST) && e->rdma_sge.mr) {
3091+
if (e->rdma_sge.mr) {
30923092
rvt_put_mr(e->rdma_sge.mr);
30933093
e->rdma_sge.mr = NULL;
30943094
}
@@ -3166,7 +3166,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
31663166
update_ack_queue(qp, next);
31673167
}
31683168
e = &qp->s_ack_queue[qp->r_head_ack_queue];
3169-
if (e->opcode == OP(RDMA_READ_REQUEST) && e->rdma_sge.mr) {
3169+
if (e->rdma_sge.mr) {
31703170
rvt_put_mr(e->rdma_sge.mr);
31713171
e->rdma_sge.mr = NULL;
31723172
}

0 commit comments

Comments
 (0)