diff options
| author | Erez Shitrit <erezsh@mellanox.com> | 2017-04-27 10:01:34 -0400 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2017-05-04 16:22:08 -0400 |
| commit | 693dfd5a3f19efc44acf3a57217c0480e414f8ee (patch) | |
| tree | 0e008558a92587f41e3a56ba26ef9ad85f2005e6 /include | |
| parent | 4ac4d584886a4f47f8ff3bca0f32ff9a2987d3e5 (diff) | |
IB/mlx5: Enable IPoIB acceleration
Enable mlx5 IPoIB acceleration by declaring
mlx5_ib_{alloc,free}_rdma_netdev and assigning the mlx5
IPoIB rdma_netdev callbacks.
In addition, this patch brings in sync mlx5's IPoIB parts for net and IB
trees. As a precaution, we disabled IPoIB acceleration by default (in
the mlx5_core Kconfig file).
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mlx5/driver.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 3fece51dcf13..cef2b98d479f 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
| @@ -1102,6 +1102,25 @@ struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev); | |||
| 1102 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); | 1102 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); |
| 1103 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); | 1103 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); |
| 1104 | 1104 | ||
| 1105 | #ifndef CONFIG_MLX5_CORE_IPOIB | ||
| 1106 | static inline | ||
| 1107 | struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, | ||
| 1108 | struct ib_device *ibdev, | ||
| 1109 | const char *name, | ||
| 1110 | void (*setup)(struct net_device *)) | ||
| 1111 | { | ||
| 1112 | return ERR_PTR(-EOPNOTSUPP); | ||
| 1113 | } | ||
| 1114 | |||
| 1115 | static inline void mlx5_rdma_netdev_free(struct net_device *netdev) {} | ||
| 1116 | #else | ||
| 1117 | struct net_device *mlx5_rdma_netdev_alloc(struct mlx5_core_dev *mdev, | ||
| 1118 | struct ib_device *ibdev, | ||
| 1119 | const char *name, | ||
| 1120 | void (*setup)(struct net_device *)); | ||
| 1121 | void mlx5_rdma_netdev_free(struct net_device *netdev); | ||
| 1122 | #endif /* CONFIG_MLX5_CORE_IPOIB */ | ||
| 1123 | |||
| 1105 | struct mlx5_profile { | 1124 | struct mlx5_profile { |
| 1106 | u64 mask; | 1125 | u64 mask; |
| 1107 | u8 log_max_qp; | 1126 | u8 log_max_qp; |
