Re: [PATCH rdma-next 14/15] RDMA/mlx5: Support new Unordered access flag

From
Jason Gunthorpe <jgg@nvidia.com>
Date
2026-08-11 19:31:57
Also in
linux-rdma, lkml
Reply to
Michael Gur, 2026-07-26
quoted hunk ↗ jump to hunk
@@ -71,9 +71,14 @@ static void set_mkc_access_pd_addr_fields(void *mkc, int acc, u64 start_addr,
 	MLX5_SET(mkc, mkc, lw, !!(acc & IB_ACCESS_LOCAL_WRITE));
 	MLX5_SET(mkc, mkc, lr, 1);
 
-	if (acc & IB_ACCESS_RELAXED_ORDERING)
+	if (acc & (IB_ACCESS_RELAXED_ORDERING | IB_ACCESS_UNORDERED))
 		mlx5_core_mkey_set_relaxed_ordering(dev->mdev, mkc);
 
+	if ((acc & IB_ACCESS_UNORDERED) &&
+	    MLX5_CAP_GEN(dev->mdev, mkc_order_read_after_write))
+		MLX5_SET(mkc, mkc, order_read_after_write,
+			 MLX5_MKC_ORDER_READ_AFTER_WRITE_RO);
So we have this nice helper that sets all the bits then we open code other bits?
Let's have the helper do everything?

Since the new bit is not umr able I would have expected this patch to also
introduce some logic in the mkey key system so we are checking that the cached
mkeys have the right mkc? (even though on this HW we expect them to all be uniform)

-- 
Jason
Thread (33 messages) 33 messages, 3 authors, last reply 2026-08-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help