diff mbox series

[SRU,R:linux-gcp,v2,10/10] RDMA/irdma: Enforce local fence for IB_WR_REG_MR

Message ID 20260902193304.58714-11-ian.whitfield@canonical.com
State New
Headers show
Series Backport Linux 7.1-7.2 IRDMA patches to gcp 7.0 | expand

Commit Message

Ian Whitfield Sept. 2, 2026, 7:33 p.m. UTC
From: Jacob Moroni <jmoroni@google.com>

BugLink: https://bugs.launchpad.net/bugs/2165062

Enforce local fence for IB_WR_REG_MR to avoid spurious
FASTREG_VALID_MKEY async events during heavy invalidation
and registration activity.

Commit 69e8e429bca2 ("RDMA/irdma: Enforce local fence for LOCAL_INV WRs")
was very similar, but was not sufficient to prevent all occurrences
of these async events.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Link: https://patch.msgid.link/20260901160014.2026285-1-jmoroni@google.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
(cherry picked from commit 3fb905f07ea45b31c8f67ba6e4668de46f527e65 rdma/rdma)
Signed-off-by: Ian Whitfield <ian.whitfield@canonical.com>
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 95f968dd527ca..4ce091ed4eadd 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -4120,7 +4120,7 @@  static int irdma_post_send(struct ib_qp *ibqp,
 			stag_info.total_len = iwmr->ibmr.length;
 			stag_info.reg_addr_pa = *palloc->level1.addr;
 			stag_info.first_pm_pbl_index = palloc->level1.idx;
-			stag_info.local_fence = ib_wr->send_flags & IB_SEND_FENCE;
+			stag_info.local_fence = true;
 			if (iwmr->npages > IRDMA_MIN_PAGES_PER_FMR)
 				stag_info.chunk_size = 1;
 			err = irdma_sc_mr_fast_register(&iwqp->sc_qp, &stag_info,