mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:20:50 +07:00
IB/hns: Fix the bug with rdma operation
When opcode of work request is RDMA read and write, it should use rdma_wr to get remote_addr and rkey. This patch fixes it. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
58c4f0d85f
commit
9de61d3fcd
@ -228,14 +228,14 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
|||||||
switch (wr->opcode) {
|
switch (wr->opcode) {
|
||||||
case IB_WR_RDMA_READ:
|
case IB_WR_RDMA_READ:
|
||||||
ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_READ;
|
ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_READ;
|
||||||
set_raddr_seg(wqe, atomic_wr(wr)->remote_addr,
|
set_raddr_seg(wqe, rdma_wr(wr)->remote_addr,
|
||||||
atomic_wr(wr)->rkey);
|
rdma_wr(wr)->rkey);
|
||||||
break;
|
break;
|
||||||
case IB_WR_RDMA_WRITE:
|
case IB_WR_RDMA_WRITE:
|
||||||
case IB_WR_RDMA_WRITE_WITH_IMM:
|
case IB_WR_RDMA_WRITE_WITH_IMM:
|
||||||
ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_WRITE;
|
ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_WRITE;
|
||||||
set_raddr_seg(wqe, atomic_wr(wr)->remote_addr,
|
set_raddr_seg(wqe, rdma_wr(wr)->remote_addr,
|
||||||
atomic_wr(wr)->rkey);
|
rdma_wr(wr)->rkey);
|
||||||
break;
|
break;
|
||||||
case IB_WR_SEND:
|
case IB_WR_SEND:
|
||||||
case IB_WR_SEND_WITH_INV:
|
case IB_WR_SEND_WITH_INV:
|
||||||
|
Loading…
Reference in New Issue
Block a user