]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix broken MLX5_IB_INDEX() macro in mlx5ib(4).
authorhselasky <hselasky@FreeBSD.org>
Fri, 21 Feb 2020 10:14:02 +0000 (10:14 +0000)
committerhselasky <hselasky@FreeBSD.org>
Fri, 21 Feb 2020 10:14:02 +0000 (10:14 +0000)
commit6f9c87a07e3d08c049eca50b1309b58c8e79a184
tree6767b90b2dc2daa17df80821af4dfabb203af548
parent99dbc1848475726d277bb54a9a0e773632ed3e3d
Fix broken MLX5_IB_INDEX() macro in mlx5ib(4).

The index should be computed as distance from arg[0] and not
the beginning of struct mlx5_ib_congestion .

While at it fix a use of zero length array to avoid depending
on undefined compiler behaviour.

MFC after: 1 week
Sponsored by: Mellanox Technologies
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c