]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix out-of-order issue of requester when setting FENCE
authorJunxian Huang <huangjunxian6@hisilicon.com>
Fri, 8 Nov 2024 07:57:42 +0000 (15:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:02 +0000 (19:51 +0100)
commitef0613269a4fa5a0e6b245613ceb961502681a09
treed6109153bdf3732e053d4b66cf236bb00c6a8a02
parentbb8b45883eb072adba297922b67d1467082ac880
RDMA/hns: Fix out-of-order issue of requester when setting FENCE

[ Upstream commit 5dbcb1c1900f45182b5651c89257c272f1f3ead7 ]

The FENCE indicator in hns WQE doesn't ensure that response data from
a previous Read/Atomic operation has been written to the requester's
memory before the subsequent Send/Write operation is processed. This
may result in the subsequent Send/Write operation accessing the original
data in memory instead of the expected response data.

Unlike FENCE, the SO (Strong Order) indicator blocks the subsequent
operation until the previous response data is written to memory and a
bresp is returned. Set the SO indicator instead of FENCE to maintain
strict order.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20241108075743.2652258-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h