net/mlx5: use static assert for compile-time sanity checks