diff options
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/device.h | 51 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 1 |
2 files changed, 47 insertions, 5 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 049214642036..8985768e2c0d 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -39,6 +39,11 @@ | |||
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | 41 | ||
42 | #define MAX_MSIX_P_PORT 17 | ||
43 | #define MAX_MSIX 64 | ||
44 | #define MSIX_LEGACY_SZ 4 | ||
45 | #define MIN_MSIX_P_PORT 5 | ||
46 | |||
42 | enum { | 47 | enum { |
43 | MLX4_FLAG_MSI_X = 1 << 0, | 48 | MLX4_FLAG_MSI_X = 1 << 0, |
44 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, | 49 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, |
@@ -145,8 +150,10 @@ enum { | |||
145 | }; | 150 | }; |
146 | 151 | ||
147 | enum mlx4_protocol { | 152 | enum mlx4_protocol { |
148 | MLX4_PROTOCOL_IB, | 153 | MLX4_PROT_IB_IPV6 = 0, |
149 | MLX4_PROTOCOL_EN, | 154 | MLX4_PROT_ETH, |
155 | MLX4_PROT_IB_IPV4, | ||
156 | MLX4_PROT_FCOE | ||
150 | }; | 157 | }; |
151 | 158 | ||
152 | enum { | 159 | enum { |
@@ -173,6 +180,12 @@ enum mlx4_special_vlan_idx { | |||
173 | MLX4_VLAN_REGULAR | 180 | MLX4_VLAN_REGULAR |
174 | }; | 181 | }; |
175 | 182 | ||
183 | enum mlx4_steer_type { | ||
184 | MLX4_MC_STEER = 0, | ||
185 | MLX4_UC_STEER, | ||
186 | MLX4_NUM_STEERS | ||
187 | }; | ||
188 | |||
176 | enum { | 189 | enum { |
177 | MLX4_NUM_FEXCH = 64 * 1024, | 190 | MLX4_NUM_FEXCH = 64 * 1024, |
178 | }; | 191 | }; |
@@ -223,6 +236,7 @@ struct mlx4_caps { | |||
223 | int num_eqs; | 236 | int num_eqs; |
224 | int reserved_eqs; | 237 | int reserved_eqs; |
225 | int num_comp_vectors; | 238 | int num_comp_vectors; |
239 | int comp_pool; | ||
226 | int num_mpts; | 240 | int num_mpts; |
227 | int num_mtt_segs; | 241 | int num_mtt_segs; |
228 | int mtts_per_seg; | 242 | int mtts_per_seg; |
@@ -245,6 +259,9 @@ struct mlx4_caps { | |||
245 | u16 stat_rate_support; | 259 | u16 stat_rate_support; |
246 | int udp_rss; | 260 | int udp_rss; |
247 | int loopback_support; | 261 | int loopback_support; |
262 | int vep_uc_steering; | ||
263 | int vep_mc_steering; | ||
264 | int wol; | ||
248 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; | 265 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
249 | int max_gso_sz; | 266 | int max_gso_sz; |
250 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; | 267 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; |
@@ -334,6 +351,17 @@ struct mlx4_fmr { | |||
334 | struct mlx4_uar { | 351 | struct mlx4_uar { |
335 | unsigned long pfn; | 352 | unsigned long pfn; |
336 | int index; | 353 | int index; |
354 | struct list_head bf_list; | ||
355 | unsigned free_bf_bmap; | ||
356 | void __iomem *map; | ||
357 | void __iomem *bf_map; | ||
358 | }; | ||
359 | |||
360 | struct mlx4_bf { | ||
361 | unsigned long offset; | ||
362 | int buf_size; | ||
363 | struct mlx4_uar *uar; | ||
364 | void __iomem *reg; | ||
337 | }; | 365 | }; |
338 | 366 | ||
339 | struct mlx4_cq { | 367 | struct mlx4_cq { |
@@ -415,7 +443,7 @@ struct mlx4_dev { | |||
415 | unsigned long flags; | 443 | unsigned long flags; |
416 | struct mlx4_caps caps; | 444 | struct mlx4_caps caps; |
417 | struct radix_tree_root qp_table_tree; | 445 | struct radix_tree_root qp_table_tree; |
418 | u32 rev_id; | 446 | u8 rev_id; |
419 | char board_id[MLX4_BOARD_ID_LEN]; | 447 | char board_id[MLX4_BOARD_ID_LEN]; |
420 | }; | 448 | }; |
421 | 449 | ||
@@ -461,6 +489,8 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); | |||
461 | 489 | ||
462 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); | 490 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); |
463 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); | 491 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); |
492 | int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
493 | void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
464 | 494 | ||
465 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, | 495 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, |
466 | struct mlx4_mtt *mtt); | 496 | struct mlx4_mtt *mtt); |
@@ -508,9 +538,15 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | |||
508 | int block_mcast_loopback, enum mlx4_protocol protocol); | 538 | int block_mcast_loopback, enum mlx4_protocol protocol); |
509 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 539 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
510 | enum mlx4_protocol protocol); | 540 | enum mlx4_protocol protocol); |
541 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
542 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
543 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
544 | int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
545 | int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); | ||
511 | 546 | ||
512 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 547 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap); |
513 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 548 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn); |
549 | int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wrap); | ||
514 | 550 | ||
515 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | 551 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); |
516 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 552 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
@@ -526,5 +562,10 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | |||
526 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | 562 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); |
527 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | 563 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); |
528 | int mlx4_test_interrupts(struct mlx4_dev *dev); | 564 | int mlx4_test_interrupts(struct mlx4_dev *dev); |
565 | int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector); | ||
566 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | ||
567 | |||
568 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | ||
569 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | ||
529 | 570 | ||
530 | #endif /* MLX4_DEVICE_H */ | 571 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 0eeb2a1a867c..9e9eb21056ca 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -303,6 +303,7 @@ struct mlx4_wqe_data_seg { | |||
303 | 303 | ||
304 | enum { | 304 | enum { |
305 | MLX4_INLINE_ALIGN = 64, | 305 | MLX4_INLINE_ALIGN = 64, |
306 | MLX4_INLINE_SEG = 1 << 31, | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | struct mlx4_wqe_inline_seg { | 309 | struct mlx4_wqe_inline_seg { |