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

Jason Gunthorpe <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <178647669519.282103.10112232253077921606.b4-review@b4>
> @@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.