Date: Tue, 07 Jul 2026 11:30:07 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ariel Ehrenberg <aehrenberg@nvidia.com> Subject: git: 80902b8b7cd4 - main - mlx5ib: advertise write-combining support for dynamic BlueFlame UARs Message-ID: <6a4ce33f.360b8.4050a7e2@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=80902b8b7cd409ade11048dc78212e7d43475c65 commit 80902b8b7cd409ade11048dc78212e7d43475c65 Author: Ariel Ehrenberg <aehrenberg@nvidia.com> AuthorDate: 2026-06-08 10:56:04 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-07-07 11:25:15 +0000 mlx5ib: advertise write-combining support for dynamic BlueFlame UARs Import Linux upstream commit 1f3db161881b7e21efb149e0ae8152b79a571a8f. dev->wc_support was never set, so it was always false and the UAR ioctl refused BlueFlame (write-combining) UAR allocations with EOPNOTSUPP. That breaks QP creation in pure dynamic-UAR mode, where user space asks for a BF doorbell UAR. Reviewed by: kib Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: Nvidia networking MFC after: 1 month --- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 66d8d511f2f0..ee5288c07b35 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -3551,6 +3551,16 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->mdev = mdev; + /* + * Write-combining is required to expose BlueFlame (WC) UARs through the + * dynamic MLX5_IB_OBJECT_UAR ioctl path. The legacy static UAR path + * already maps doorbell pages with pgprot_writecombine(), so advertise + * WC support whenever the platform actually provides it. + */ +#if defined(VM_MEMATTR_WRITE_COMBINING) + dev->wc_support = true; +#endif + dev->port = kcalloc(MLX5_CAP_GEN(mdev, num_ports), sizeof(*dev->port), GFP_KERNEL); if (!dev->port)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a4ce33f.360b8.4050a7e2>
