mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 04:46:45 +07:00
RDMA/hns: Intercept illegal RDMA operation when use inline data
RDMA read operation is not supported inline data. If user cofigures issue a RDMA read and use inline data, it will happen a hardware error. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
215a8c09e5
commit
328d405b3d
@ -71,6 +71,11 @@ static int set_rwqe_data_seg(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (wr->opcode == IB_WR_RDMA_READ) {
|
||||
dev_err(hr_dev->dev, "Not support inline data!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < wr->num_sge; i++) {
|
||||
memcpy(wqe, ((void *)wr->sg_list[i].addr),
|
||||
wr->sg_list[i].length);
|
||||
|
Loading…
Reference in New Issue
Block a user