linux/drivers/infiniband/hw
Junxian Huang fa5867c496 RDMA/hns: Fix wrong WQE data when QP wraps around
[ Upstream commit fe9622011f ]

When QP wraps around, WQE data from the previous use at the same
position still remains as driver does not clear it. The WQE field
layout differs across different opcodes, causing that the fields
that are not explicitly assigned for the current opcode retain
stale values, and are issued to HW by mistake. Such fields are as
follows:

* MSG_START_SGE_IDX field in ATOMIC WQE
* BLOCK_SIZE and ZBVA fields in FRMR WQE
* DirectWQE fields when DirectWQE not used

For ATOMIC WQE, always set the latest sge index in MSG_START_SGE_IDX
as required by HW.

For FRMR WQE and DirectWQE, clear only those unassigned fields
instead of the entire WQE to avoid performance penalty.

Fixes: 68a997c5d2 ("RDMA/hns: Add FRMR support for hip08")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20251016114051.1963197-4-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-13 15:34:33 -05:00
..
bnxt_re RDMA/bnxt_re: Fix to initialize the PBL array 2025-08-28 16:31:12 +02:00
cxgb4 RDMA/cxgb4: Notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event 2025-02-08 09:57:51 +01:00
efa RDMA/efa: Reset device on probe failure 2025-02-21 14:01:22 +01:00
erdma RDMA/erdma: Fix ignored return value of init_kernel_qp 2025-08-28 16:31:12 +02:00
hfi1 RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask() 2025-08-20 18:30:43 +02:00
hns RDMA/hns: Fix wrong WQE data when QP wraps around 2025-11-13 15:34:33 -05:00
irdma RDMA/irdma: Set irdma_cq cq_num field during CQ create 2025-11-13 15:34:32 -05:00
mana RDMA/mana_ib: Fix DSCP value in modify QP 2025-08-15 12:13:54 +02:00
mlx4 RDMA/mlx4: Avoid false error about access to uninitialized gids array 2025-02-08 09:57:37 +01:00
mlx5 RDMA/mlx5: Fix vport loopback forcing for MPV device 2025-10-15 12:00:06 +02:00
mthca RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
ocrdma RDMA/ocrdma: Don't inline statistics functions 2024-07-11 13:25:11 +03:00
qedr RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
qib qibfs: fix _another_ leak 2025-05-02 07:59:20 +02:00
usnic RDMA/usnic: Fix passing zero to PTR_ERR in usnic_ib_pci_probe() 2025-04-25 10:47:39 +02:00
vmw_pvrdma RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
Makefile RDMA/hns: Clean up the legacy CONFIG_INFINIBAND_HNS 2025-02-08 09:57:46 +01:00