RDMA/mlx5: Round max_rd_atomic/max_dest_rd_atomic up instead of down
authorPatrisious Haddad <phaddad@nvidia.com>
Thu, 10 Oct 2024 08:50:23 +0000 (11:50 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 21 Oct 2024 16:25:44 +0000 (13:25 -0300)
commit78ed28e08e74da6265e49e19206e1bcb8b9a7f0d
tree7f65040a35176bf3a08d189f3f765af303a15e16
parent89f8c6f197f480fe05edf91eb9359d5425869d04
RDMA/mlx5: Round max_rd_atomic/max_dest_rd_atomic up instead of down

After the cited commit below max_dest_rd_atomic and max_rd_atomic values
are being rounded down to the next power of 2. As opposed to the old
behavior and mlx4 driver where they used to be rounded up instead.

In order to stay consistent with older code and other drivers, revert to
using fls round function which rounds up to the next power of 2.

Fixes: f18e26af6aba ("RDMA/mlx5: Convert modify QP to use MLX5_SET macros")
Link: https://patch.msgid.link/r/d85515d6ef21a2fa8ef4c8293dce9b58df8a6297.1728550179.git.leon@kernel.org
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/qp.c