diff options
Diffstat (limited to 'include/linux/mlx4')
| -rw-r--r-- | include/linux/mlx4/cmd.h | 4 | ||||
| -rw-r--r-- | include/linux/mlx4/device.h | 258 | ||||
| -rw-r--r-- | include/linux/mlx4/driver.h | 5 |
3 files changed, 261 insertions, 6 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index 1f3860a8a109..260695186256 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -154,6 +154,10 @@ enum { | |||
| 154 | /* set port opcode modifiers */ | 154 | /* set port opcode modifiers */ |
| 155 | MLX4_SET_PORT_PRIO2TC = 0x8, | 155 | MLX4_SET_PORT_PRIO2TC = 0x8, |
| 156 | MLX4_SET_PORT_SCHEDULER = 0x9, | 156 | MLX4_SET_PORT_SCHEDULER = 0x9, |
| 157 | |||
| 158 | /* register/delete flow steering network rules */ | ||
| 159 | MLX4_QP_FLOW_STEERING_ATTACH = 0x65, | ||
| 160 | MLX4_QP_FLOW_STEERING_DETACH = 0x66, | ||
| 157 | }; | 161 | }; |
| 158 | 162 | ||
| 159 | enum { | 163 | enum { |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 6a8f002b8ed3..bd6c9fcdf2dd 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
| 37 | #include <linux/completion.h> | 37 | #include <linux/completion.h> |
| 38 | #include <linux/radix-tree.h> | 38 | #include <linux/radix-tree.h> |
| 39 | #include <linux/cpu_rmap.h> | ||
| 39 | 40 | ||
| 40 | #include <linux/atomic.h> | 41 | #include <linux/atomic.h> |
| 41 | 42 | ||
| @@ -56,6 +57,13 @@ enum { | |||
| 56 | MLX4_MAX_PORTS = 2 | 57 | MLX4_MAX_PORTS = 2 |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| 60 | /* base qkey for use in sriov tunnel-qp/proxy-qp communication. | ||
| 61 | * These qkeys must not be allowed for general use. This is a 64k range, | ||
| 62 | * and to test for violation, we use the mask (protect against future chg). | ||
| 63 | */ | ||
| 64 | #define MLX4_RESERVED_QKEY_BASE (0xFFFF0000) | ||
| 65 | #define MLX4_RESERVED_QKEY_MASK (0xFFFF0000) | ||
| 66 | |||
| 59 | enum { | 67 | enum { |
| 60 | MLX4_BOARD_ID_LEN = 64 | 68 | MLX4_BOARD_ID_LEN = 64 |
| 61 | }; | 69 | }; |
| @@ -70,6 +78,36 @@ enum { | |||
| 70 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) | 78 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) |
| 71 | }; | 79 | }; |
| 72 | 80 | ||
| 81 | /* Driver supports 3 diffrent device methods to manage traffic steering: | ||
| 82 | * -device managed - High level API for ib and eth flow steering. FW is | ||
| 83 | * managing flow steering tables. | ||
| 84 | * - B0 steering mode - Common low level API for ib and (if supported) eth. | ||
| 85 | * - A0 steering mode - Limited low level API for eth. In case of IB, | ||
| 86 | * B0 mode is in use. | ||
| 87 | */ | ||
| 88 | enum { | ||
| 89 | MLX4_STEERING_MODE_A0, | ||
| 90 | MLX4_STEERING_MODE_B0, | ||
| 91 | MLX4_STEERING_MODE_DEVICE_MANAGED | ||
| 92 | }; | ||
| 93 | |||
| 94 | static inline const char *mlx4_steering_mode_str(int steering_mode) | ||
| 95 | { | ||
| 96 | switch (steering_mode) { | ||
| 97 | case MLX4_STEERING_MODE_A0: | ||
| 98 | return "A0 steering"; | ||
| 99 | |||
| 100 | case MLX4_STEERING_MODE_B0: | ||
| 101 | return "B0 steering"; | ||
| 102 | |||
| 103 | case MLX4_STEERING_MODE_DEVICE_MANAGED: | ||
| 104 | return "Device managed flow steering"; | ||
| 105 | |||
| 106 | default: | ||
| 107 | return "Unrecognize steering mode"; | ||
| 108 | } | ||
| 109 | } | ||
| 110 | |||
| 73 | enum { | 111 | enum { |
| 74 | MLX4_DEV_CAP_FLAG_RC = 1LL << 0, | 112 | MLX4_DEV_CAP_FLAG_RC = 1LL << 0, |
| 75 | MLX4_DEV_CAP_FLAG_UC = 1LL << 1, | 113 | MLX4_DEV_CAP_FLAG_UC = 1LL << 1, |
| @@ -96,13 +134,15 @@ enum { | |||
| 96 | MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, | 134 | MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, |
| 97 | MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, | 135 | MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42, |
| 98 | MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, | 136 | MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48, |
| 99 | MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55 | 137 | MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55, |
| 138 | MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59, | ||
| 100 | }; | 139 | }; |
| 101 | 140 | ||
| 102 | enum { | 141 | enum { |
| 103 | MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, | 142 | MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, |
| 104 | MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, | 143 | MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, |
| 105 | MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2 | 144 | MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, |
| 145 | MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3 | ||
| 106 | }; | 146 | }; |
| 107 | 147 | ||
| 108 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) | 148 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) |
| @@ -138,6 +178,7 @@ enum mlx4_event { | |||
| 138 | MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, | 178 | MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18, |
| 139 | MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, | 179 | MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b, |
| 140 | MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, | 180 | MLX4_EVENT_TYPE_FLR_EVENT = 0x1c, |
| 181 | MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d, | ||
| 141 | MLX4_EVENT_TYPE_NONE = 0xff, | 182 | MLX4_EVENT_TYPE_NONE = 0xff, |
| 142 | }; | 183 | }; |
| 143 | 184 | ||
| @@ -235,12 +276,32 @@ enum { | |||
| 235 | MLX4_MAX_FAST_REG_PAGES = 511, | 276 | MLX4_MAX_FAST_REG_PAGES = 511, |
| 236 | }; | 277 | }; |
| 237 | 278 | ||
| 279 | enum { | ||
| 280 | MLX4_DEV_PMC_SUBTYPE_GUID_INFO = 0x14, | ||
| 281 | MLX4_DEV_PMC_SUBTYPE_PORT_INFO = 0x15, | ||
| 282 | MLX4_DEV_PMC_SUBTYPE_PKEY_TABLE = 0x16, | ||
| 283 | }; | ||
| 284 | |||
| 285 | /* Port mgmt change event handling */ | ||
| 286 | enum { | ||
| 287 | MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK = 1 << 0, | ||
| 288 | MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK = 1 << 1, | ||
| 289 | MLX4_EQ_PORT_INFO_LID_CHANGE_MASK = 1 << 2, | ||
| 290 | MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK = 1 << 3, | ||
| 291 | MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK = 1 << 4, | ||
| 292 | }; | ||
| 293 | |||
| 294 | #define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ | ||
| 295 | MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK) | ||
| 296 | |||
| 238 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 297 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
| 239 | { | 298 | { |
| 240 | return (major << 32) | (minor << 16) | subminor; | 299 | return (major << 32) | (minor << 16) | subminor; |
| 241 | } | 300 | } |
| 242 | 301 | ||
| 243 | struct mlx4_phys_caps { | 302 | struct mlx4_phys_caps { |
| 303 | u32 gid_phys_table_len[MLX4_MAX_PORTS + 1]; | ||
| 304 | u32 pkey_phys_table_len[MLX4_MAX_PORTS + 1]; | ||
| 244 | u32 num_phys_eqs; | 305 | u32 num_phys_eqs; |
| 245 | }; | 306 | }; |
| 246 | 307 | ||
| @@ -273,6 +334,8 @@ struct mlx4_caps { | |||
| 273 | int max_qp_init_rdma; | 334 | int max_qp_init_rdma; |
| 274 | int max_qp_dest_rdma; | 335 | int max_qp_dest_rdma; |
| 275 | int sqp_start; | 336 | int sqp_start; |
| 337 | u32 base_sqpn; | ||
| 338 | u32 base_tunnel_sqpn; | ||
| 276 | int num_srqs; | 339 | int num_srqs; |
| 277 | int max_srq_wqes; | 340 | int max_srq_wqes; |
| 278 | int max_srq_sge; | 341 | int max_srq_sge; |
| @@ -295,6 +358,8 @@ struct mlx4_caps { | |||
| 295 | int num_amgms; | 358 | int num_amgms; |
| 296 | int reserved_mcgs; | 359 | int reserved_mcgs; |
| 297 | int num_qp_per_mgm; | 360 | int num_qp_per_mgm; |
| 361 | int steering_mode; | ||
| 362 | int fs_log_max_ucast_qp_range_size; | ||
| 298 | int num_pds; | 363 | int num_pds; |
| 299 | int reserved_pds; | 364 | int reserved_pds; |
| 300 | int max_xrcds; | 365 | int max_xrcds; |
| @@ -509,8 +574,85 @@ struct mlx4_dev { | |||
| 509 | u8 rev_id; | 574 | u8 rev_id; |
| 510 | char board_id[MLX4_BOARD_ID_LEN]; | 575 | char board_id[MLX4_BOARD_ID_LEN]; |
| 511 | int num_vfs; | 576 | int num_vfs; |
| 577 | u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; | ||
| 578 | u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; | ||
| 512 | }; | 579 | }; |
| 513 | 580 | ||
| 581 | struct mlx4_eqe { | ||
| 582 | u8 reserved1; | ||
| 583 | u8 type; | ||
| 584 | u8 reserved2; | ||
| 585 | u8 subtype; | ||
| 586 | union { | ||
| 587 | u32 raw[6]; | ||
| 588 | struct { | ||
| 589 | __be32 cqn; | ||
| 590 | } __packed comp; | ||
| 591 | struct { | ||
| 592 | u16 reserved1; | ||
| 593 | __be16 token; | ||
| 594 | u32 reserved2; | ||
| 595 | u8 reserved3[3]; | ||
| 596 | u8 status; | ||
| 597 | __be64 out_param; | ||
| 598 | } __packed cmd; | ||
| 599 | struct { | ||
| 600 | __be32 qpn; | ||
| 601 | } __packed qp; | ||
| 602 | struct { | ||
| 603 | __be32 srqn; | ||
| 604 | } __packed srq; | ||
| 605 | struct { | ||
| 606 | __be32 cqn; | ||
| 607 | u32 reserved1; | ||
| 608 | u8 reserved2[3]; | ||
| 609 | u8 syndrome; | ||
| 610 | } __packed cq_err; | ||
| 611 | struct { | ||
| 612 | u32 reserved1[2]; | ||
| 613 | __be32 port; | ||
| 614 | } __packed port_change; | ||
| 615 | struct { | ||
| 616 | #define COMM_CHANNEL_BIT_ARRAY_SIZE 4 | ||
| 617 | u32 reserved; | ||
| 618 | u32 bit_vec[COMM_CHANNEL_BIT_ARRAY_SIZE]; | ||
| 619 | } __packed comm_channel_arm; | ||
| 620 | struct { | ||
| 621 | u8 port; | ||
| 622 | u8 reserved[3]; | ||
| 623 | __be64 mac; | ||
| 624 | } __packed mac_update; | ||
| 625 | struct { | ||
| 626 | __be32 slave_id; | ||
| 627 | } __packed flr_event; | ||
| 628 | struct { | ||
| 629 | __be16 current_temperature; | ||
| 630 | __be16 warning_threshold; | ||
| 631 | } __packed warming; | ||
| 632 | struct { | ||
| 633 | u8 reserved[3]; | ||
| 634 | u8 port; | ||
| 635 | union { | ||
| 636 | struct { | ||
| 637 | __be16 mstr_sm_lid; | ||
| 638 | __be16 port_lid; | ||
| 639 | __be32 changed_attr; | ||
| 640 | u8 reserved[3]; | ||
| 641 | u8 mstr_sm_sl; | ||
| 642 | __be64 gid_prefix; | ||
| 643 | } __packed port_info; | ||
| 644 | struct { | ||
| 645 | __be32 block_ptr; | ||
| 646 | __be32 tbl_entries_mask; | ||
| 647 | } __packed tbl_change_info; | ||
| 648 | } params; | ||
| 649 | } __packed port_mgmt_change; | ||
| 650 | } event; | ||
| 651 | u8 slave_id; | ||
| 652 | u8 reserved3[2]; | ||
| 653 | u8 owner; | ||
| 654 | } __packed; | ||
| 655 | |||
| 514 | struct mlx4_init_port_param { | 656 | struct mlx4_init_port_param { |
| 515 | int set_guid0; | 657 | int set_guid0; |
| 516 | int set_node_guid; | 658 | int set_node_guid; |
| @@ -534,6 +676,15 @@ struct mlx4_init_port_param { | |||
| 534 | if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ | 676 | if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ |
| 535 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) | 677 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) |
| 536 | 678 | ||
| 679 | #define MLX4_INVALID_SLAVE_ID 0xFF | ||
| 680 | |||
| 681 | void handle_port_mgmt_change_event(struct work_struct *work); | ||
| 682 | |||
| 683 | static inline int mlx4_master_func_num(struct mlx4_dev *dev) | ||
| 684 | { | ||
| 685 | return dev->caps.function; | ||
| 686 | } | ||
| 687 | |||
| 537 | static inline int mlx4_is_master(struct mlx4_dev *dev) | 688 | static inline int mlx4_is_master(struct mlx4_dev *dev) |
| 538 | { | 689 | { |
| 539 | return dev->flags & MLX4_FLAG_MASTER; | 690 | return dev->flags & MLX4_FLAG_MASTER; |
| @@ -623,9 +774,99 @@ int mlx4_unicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | |||
| 623 | int mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 774 | int mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 624 | enum mlx4_protocol prot); | 775 | enum mlx4_protocol prot); |
| 625 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 776 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 626 | int block_mcast_loopback, enum mlx4_protocol protocol); | 777 | u8 port, int block_mcast_loopback, |
| 778 | enum mlx4_protocol protocol, u64 *reg_id); | ||
| 627 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 779 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 628 | enum mlx4_protocol protocol); | 780 | enum mlx4_protocol protocol, u64 reg_id); |
| 781 | |||
| 782 | enum { | ||
| 783 | MLX4_DOMAIN_UVERBS = 0x1000, | ||
| 784 | MLX4_DOMAIN_ETHTOOL = 0x2000, | ||
| 785 | MLX4_DOMAIN_RFS = 0x3000, | ||
| 786 | MLX4_DOMAIN_NIC = 0x5000, | ||
| 787 | }; | ||
| 788 | |||
| 789 | enum mlx4_net_trans_rule_id { | ||
| 790 | MLX4_NET_TRANS_RULE_ID_ETH = 0, | ||
| 791 | MLX4_NET_TRANS_RULE_ID_IB, | ||
| 792 | MLX4_NET_TRANS_RULE_ID_IPV6, | ||
| 793 | MLX4_NET_TRANS_RULE_ID_IPV4, | ||
| 794 | MLX4_NET_TRANS_RULE_ID_TCP, | ||
| 795 | MLX4_NET_TRANS_RULE_ID_UDP, | ||
| 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ | ||
| 797 | }; | ||
| 798 | |||
| 799 | enum mlx4_net_trans_promisc_mode { | ||
| 800 | MLX4_FS_PROMISC_NONE = 0, | ||
| 801 | MLX4_FS_PROMISC_UPLINK, | ||
| 802 | /* For future use. Not implemented yet */ | ||
| 803 | MLX4_FS_PROMISC_FUNCTION_PORT, | ||
| 804 | MLX4_FS_PROMISC_ALL_MULTI, | ||
| 805 | }; | ||
| 806 | |||
| 807 | struct mlx4_spec_eth { | ||
| 808 | u8 dst_mac[6]; | ||
| 809 | u8 dst_mac_msk[6]; | ||
| 810 | u8 src_mac[6]; | ||
| 811 | u8 src_mac_msk[6]; | ||
| 812 | u8 ether_type_enable; | ||
| 813 | __be16 ether_type; | ||
| 814 | __be16 vlan_id_msk; | ||
| 815 | __be16 vlan_id; | ||
| 816 | }; | ||
| 817 | |||
| 818 | struct mlx4_spec_tcp_udp { | ||
| 819 | __be16 dst_port; | ||
| 820 | __be16 dst_port_msk; | ||
| 821 | __be16 src_port; | ||
| 822 | __be16 src_port_msk; | ||
| 823 | }; | ||
| 824 | |||
| 825 | struct mlx4_spec_ipv4 { | ||
| 826 | __be32 dst_ip; | ||
| 827 | __be32 dst_ip_msk; | ||
| 828 | __be32 src_ip; | ||
| 829 | __be32 src_ip_msk; | ||
| 830 | }; | ||
| 831 | |||
| 832 | struct mlx4_spec_ib { | ||
| 833 | __be32 r_qpn; | ||
| 834 | __be32 qpn_msk; | ||
| 835 | u8 dst_gid[16]; | ||
| 836 | u8 dst_gid_msk[16]; | ||
| 837 | }; | ||
| 838 | |||
| 839 | struct mlx4_spec_list { | ||
| 840 | struct list_head list; | ||
| 841 | enum mlx4_net_trans_rule_id id; | ||
| 842 | union { | ||
| 843 | struct mlx4_spec_eth eth; | ||
| 844 | struct mlx4_spec_ib ib; | ||
| 845 | struct mlx4_spec_ipv4 ipv4; | ||
| 846 | struct mlx4_spec_tcp_udp tcp_udp; | ||
| 847 | }; | ||
| 848 | }; | ||
| 849 | |||
| 850 | enum mlx4_net_trans_hw_rule_queue { | ||
| 851 | MLX4_NET_TRANS_Q_FIFO, | ||
| 852 | MLX4_NET_TRANS_Q_LIFO, | ||
| 853 | }; | ||
| 854 | |||
| 855 | struct mlx4_net_trans_rule { | ||
| 856 | struct list_head list; | ||
| 857 | enum mlx4_net_trans_hw_rule_queue queue_mode; | ||
| 858 | bool exclusive; | ||
| 859 | bool allow_loopback; | ||
| 860 | enum mlx4_net_trans_promisc_mode promisc_mode; | ||
| 861 | u8 port; | ||
| 862 | u16 priority; | ||
| 863 | u32 qpn; | ||
| 864 | }; | ||
| 865 | |||
| 866 | int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, | ||
| 867 | enum mlx4_net_trans_promisc_mode mode); | ||
| 868 | int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, | ||
| 869 | enum mlx4_net_trans_promisc_mode mode); | ||
| 629 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 870 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 630 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | 871 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 631 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 872 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
| @@ -659,7 +900,8 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | |||
| 659 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | 900 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); |
| 660 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | 901 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); |
| 661 | int mlx4_test_interrupts(struct mlx4_dev *dev); | 902 | int mlx4_test_interrupts(struct mlx4_dev *dev); |
| 662 | int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector); | 903 | int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap, |
| 904 | int *vector); | ||
| 663 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | 905 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); |
| 664 | 906 | ||
| 665 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | 907 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); |
| @@ -668,4 +910,10 @@ int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | |||
| 668 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); | 910 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); |
| 669 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); | 911 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); |
| 670 | 912 | ||
| 913 | int mlx4_flow_attach(struct mlx4_dev *dev, | ||
| 914 | struct mlx4_net_trans_rule *rule, u64 *reg_id); | ||
| 915 | int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); | ||
| 916 | |||
| 917 | int mlx4_get_parav_qkey(struct mlx4_dev *dev, u32 qpn, u32 *qkey); | ||
| 918 | |||
| 671 | #endif /* MLX4_DEVICE_H */ | 919 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 5f1298b1b5ef..d813704b963b 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -37,18 +37,21 @@ | |||
| 37 | 37 | ||
| 38 | struct mlx4_dev; | 38 | struct mlx4_dev; |
| 39 | 39 | ||
| 40 | #define MLX4_MAC_MASK 0xffffffffffffULL | ||
| 41 | |||
| 40 | enum mlx4_dev_event { | 42 | enum mlx4_dev_event { |
| 41 | MLX4_DEV_EVENT_CATASTROPHIC_ERROR, | 43 | MLX4_DEV_EVENT_CATASTROPHIC_ERROR, |
| 42 | MLX4_DEV_EVENT_PORT_UP, | 44 | MLX4_DEV_EVENT_PORT_UP, |
| 43 | MLX4_DEV_EVENT_PORT_DOWN, | 45 | MLX4_DEV_EVENT_PORT_DOWN, |
| 44 | MLX4_DEV_EVENT_PORT_REINIT, | 46 | MLX4_DEV_EVENT_PORT_REINIT, |
| 47 | MLX4_DEV_EVENT_PORT_MGMT_CHANGE, | ||
| 45 | }; | 48 | }; |
| 46 | 49 | ||
| 47 | struct mlx4_interface { | 50 | struct mlx4_interface { |
| 48 | void * (*add) (struct mlx4_dev *dev); | 51 | void * (*add) (struct mlx4_dev *dev); |
| 49 | void (*remove)(struct mlx4_dev *dev, void *context); | 52 | void (*remove)(struct mlx4_dev *dev, void *context); |
| 50 | void (*event) (struct mlx4_dev *dev, void *context, | 53 | void (*event) (struct mlx4_dev *dev, void *context, |
| 51 | enum mlx4_dev_event event, int port); | 54 | enum mlx4_dev_event event, unsigned long param); |
| 52 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); | 55 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); |
| 53 | struct list_head list; | 56 | struct list_head list; |
| 54 | enum mlx4_protocol protocol; | 57 | enum mlx4_protocol protocol; |
