summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorLang Cheng <chenglang@huawei.com>2021-02-05 17:39:32 +0800
committerJason Gunthorpe <jgg@nvidia.com>2021-02-08 20:25:25 -0400
commit62490fd5a8654f9639a6766921ee72f5dbc6a479 (patch)
tree6de2d04636190b2a42cb8b45e4d5cee98adc9792 /drivers/infiniband
parent993703370a6f929fcef39a14d1be17cbc1d26a30 (diff)
downloadlinux-stable-62490fd5a8654f9639a6766921ee72f5dbc6a479.tar.gz
linux-stable-62490fd5a8654f9639a6766921ee72f5dbc6a479.tar.bz2
linux-stable-62490fd5a8654f9639a6766921ee72f5dbc6a479.zip
RDMA/hns: Avoid unnecessary memset on WQEs in post_send
All fields of WQE will be rewrote, so the memset is unnecessary. And when SQ is working in OWNER mode, the pipeline may prefetch the WQEs beyond PI, the memset operation may flip the owner bit too early, then the pipeline may get a wrong WQ. Link: https://lore.kernel.org/r/1612517974-31867-11-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng <chenglang@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 7d1bfcfd2db6..45a11fdaaa50 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -469,7 +469,6 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp,
int ret;
valid_num_sge = calc_wr_sge_num(wr, &msg_len);
- memset(ud_sq_wqe, 0, sizeof(*ud_sq_wqe));
ret = set_ud_opcode(ud_sq_wqe, wr);
if (WARN_ON(ret))
@@ -575,7 +574,6 @@ static inline int set_rc_wqe(struct hns_roce_qp *qp,
int ret;
valid_num_sge = calc_wr_sge_num(wr, &msg_len);
- memset(rc_sq_wqe, 0, sizeof(*rc_sq_wqe));
rc_sq_wqe->msg_len = cpu_to_le32(msg_len);