From 1cbc85fd04a387d24946d61ce7fcd4b92bf6cea6 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 30 Jan 2018 12:38:06 +0000 Subject: [PATCH] Move the mlx5 core device pointer first in the mlx5en priv. This help simplify checks to recognize own network devices when using mlx5ib. This patch fixes an issues where mlx5ib fails to recognize mceX network devices for use with RoCE. MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/dev/mlx5/mlx5_en/en.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index a0d42ab5b60..aba7bcb7d4d 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -661,6 +661,8 @@ struct mlx5e_clbr_point { }; struct mlx5e_priv { + struct mlx5_core_dev *mdev; /* must be first */ + /* priv data path fields - start */ int order_base_2_num_channels; int queue_mapping_channel_mask; @@ -698,7 +700,6 @@ struct mlx5e_priv { struct work_struct set_rx_mode_work; MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock) - struct mlx5_core_dev *mdev; struct ifnet *ifp; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_ifnet;