diff options
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mlx4_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx4/mlx4_ib.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index 3486d7675e5..2a322f21049 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h | |||
@@ -112,6 +112,13 @@ enum mlx4_ib_qp_flags { | |||
112 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK = 1 << 1, | 112 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK = 1 << 1, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | struct mlx4_ib_gid_entry { | ||
116 | struct list_head list; | ||
117 | union ib_gid gid; | ||
118 | int added; | ||
119 | u8 port; | ||
120 | }; | ||
121 | |||
115 | struct mlx4_ib_qp { | 122 | struct mlx4_ib_qp { |
116 | struct ib_qp ibqp; | 123 | struct ib_qp ibqp; |
117 | struct mlx4_qp mqp; | 124 | struct mlx4_qp mqp; |
@@ -138,6 +145,8 @@ struct mlx4_ib_qp { | |||
138 | u8 resp_depth; | 145 | u8 resp_depth; |
139 | u8 sq_no_prefetch; | 146 | u8 sq_no_prefetch; |
140 | u8 state; | 147 | u8 state; |
148 | int mlx_type; | ||
149 | struct list_head gid_list; | ||
141 | }; | 150 | }; |
142 | 151 | ||
143 | struct mlx4_ib_srq { | 152 | struct mlx4_ib_srq { |
@@ -157,7 +166,14 @@ struct mlx4_ib_srq { | |||
157 | 166 | ||
158 | struct mlx4_ib_ah { | 167 | struct mlx4_ib_ah { |
159 | struct ib_ah ibah; | 168 | struct ib_ah ibah; |
160 | struct mlx4_av av; | 169 | union mlx4_ext_av av; |
170 | }; | ||
171 | |||
172 | struct mlx4_ib_iboe { | ||
173 | spinlock_t lock; | ||
174 | struct net_device *netdevs[MLX4_MAX_PORTS]; | ||
175 | struct notifier_block nb; | ||
176 | union ib_gid gid_table[MLX4_MAX_PORTS][128]; | ||
161 | }; | 177 | }; |
162 | 178 | ||
163 | struct mlx4_ib_dev { | 179 | struct mlx4_ib_dev { |
@@ -176,6 +192,7 @@ struct mlx4_ib_dev { | |||
176 | 192 | ||
177 | struct mutex cap_mask_mutex; | 193 | struct mutex cap_mask_mutex; |
178 | bool ib_active; | 194 | bool ib_active; |
195 | struct mlx4_ib_iboe iboe; | ||
179 | }; | 196 | }; |
180 | 197 | ||
181 | static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev) | 198 | static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev) |
@@ -314,9 +331,20 @@ int mlx4_ib_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, int npages, | |||
314 | int mlx4_ib_unmap_fmr(struct list_head *fmr_list); | 331 | int mlx4_ib_unmap_fmr(struct list_head *fmr_list); |
315 | int mlx4_ib_fmr_dealloc(struct ib_fmr *fmr); | 332 | int mlx4_ib_fmr_dealloc(struct ib_fmr *fmr); |
316 | 333 | ||
334 | int mlx4_ib_resolve_grh(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah_attr, | ||
335 | u8 *mac, int *is_mcast, u8 port); | ||
336 | |||
317 | static inline int mlx4_ib_ah_grh_present(struct mlx4_ib_ah *ah) | 337 | static inline int mlx4_ib_ah_grh_present(struct mlx4_ib_ah *ah) |
318 | { | 338 | { |
319 | return !!(ah->av.g_slid & 0x80); | 339 | u8 port = be32_to_cpu(ah->av.ib.port_pd) >> 24 & 3; |
340 | |||
341 | if (rdma_port_get_link_layer(ah->ibah.device, port) == IB_LINK_LAYER_ETHERNET) | ||
342 | return 1; | ||
343 | |||
344 | return !!(ah->av.ib.g_slid & 0x80); | ||
320 | } | 345 | } |
321 | 346 | ||
347 | int mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp, | ||
348 | union ib_gid *gid); | ||
349 | |||
322 | #endif /* MLX4_IB_H */ | 350 | #endif /* MLX4_IB_H */ |