]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mlx5ib: Limit mkey page size to 2GB
authorHans Petter Selasky <hselasky@FreeBSD.org>
Wed, 16 Jun 2021 13:01:31 +0000 (15:01 +0200)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Mon, 26 Jul 2021 16:04:28 +0000 (18:04 +0200)
commitf1d4741b76000caad899a7f81a7ae71c2c7b511c
tree418ee6e84781a0dc5442c7d2bcf9df99f0ee6408
parentcae3be82c3cd16e73b94a7320314b7d402275e35
mlx5ib: Limit mkey page size to 2GB

The maximum page size in the mkey context is 2GB.

Until today, we didn't enforce this requirement in the code, and therefore,
if we got a page size larger than 2GB, we have passed zeros in the
log_page_shift instead of the actual value and the registration failed.

This patch limits the driver to use compound pages of 2GB for mkeys.

Linux commit:
762f899ae7875554284af92b821be8c083227092

Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

(cherry picked from commit 565cb4e8cc5efb4c493efe5cf2cb2ec36f69a413)
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c