diff options
Diffstat (limited to 'include/linux/mlx4/device.h')
-rw-r--r-- | include/linux/mlx4/device.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 7338654c02b4..a7b15bc7648e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -67,7 +67,8 @@ enum { | |||
67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, | 67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, |
68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, | 68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, |
69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, | 69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, |
70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21 | 70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21, |
71 | MLX4_DEV_CAP_FLAG_IBOE = 1 << 30 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | enum { | 74 | enum { |
@@ -171,6 +172,10 @@ enum { | |||
171 | MLX4_NUM_FEXCH = 64 * 1024, | 172 | MLX4_NUM_FEXCH = 64 * 1024, |
172 | }; | 173 | }; |
173 | 174 | ||
175 | enum { | ||
176 | MLX4_MAX_FAST_REG_PAGES = 511, | ||
177 | }; | ||
178 | |||
174 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 179 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
175 | { | 180 | { |
176 | return (major << 32) | (minor << 16) | subminor; | 181 | return (major << 32) | (minor << 16) | subminor; |
@@ -379,6 +384,27 @@ struct mlx4_av { | |||
379 | u8 dgid[16]; | 384 | u8 dgid[16]; |
380 | }; | 385 | }; |
381 | 386 | ||
387 | struct mlx4_eth_av { | ||
388 | __be32 port_pd; | ||
389 | u8 reserved1; | ||
390 | u8 smac_idx; | ||
391 | u16 reserved2; | ||
392 | u8 reserved3; | ||
393 | u8 gid_index; | ||
394 | u8 stat_rate; | ||
395 | u8 hop_limit; | ||
396 | __be32 sl_tclass_flowlabel; | ||
397 | u8 dgid[16]; | ||
398 | u32 reserved4[2]; | ||
399 | __be16 vlan; | ||
400 | u8 mac[6]; | ||
401 | }; | ||
402 | |||
403 | union mlx4_ext_av { | ||
404 | struct mlx4_av ib; | ||
405 | struct mlx4_eth_av eth; | ||
406 | }; | ||
407 | |||
382 | struct mlx4_dev { | 408 | struct mlx4_dev { |
383 | struct pci_dev *pdev; | 409 | struct pci_dev *pdev; |
384 | unsigned long flags; | 410 | unsigned long flags; |
@@ -407,6 +433,12 @@ struct mlx4_init_port_param { | |||
407 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ | 433 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ |
408 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) | 434 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) |
409 | 435 | ||
436 | #define mlx4_foreach_ib_transport_port(port, dev) \ | ||
437 | for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ | ||
438 | if (((dev)->caps.port_mask & 1 << ((port) - 1)) || \ | ||
439 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) | ||
440 | |||
441 | |||
410 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 442 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
411 | struct mlx4_buf *buf); | 443 | struct mlx4_buf *buf); |
412 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 444 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
@@ -474,6 +506,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | |||
474 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 506 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); |
475 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 507 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); |
476 | 508 | ||
509 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | ||
477 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 510 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
478 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); | 511 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); |
479 | 512 | ||