aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 18:29:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 18:29:48 -0400
commite0fd9affeb64088eff407dfc98bbd3a5c17ea479 (patch)
tree94ee7e3410fffb305aa6901053b85245686444a2 /include
parent3d15b798eafd3b6b3cc25f20747008ab9401a57f (diff)
parentea9627c800e99a902e2668ac8e6377f02d6f720a (diff)
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull InfiniBand/RDMA changes from Roland Dreier: - XRC transport fixes - Fix DHCP on IPoIB - mlx4 preparations for flow steering - iSER fixes - miscellaneous other fixes * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (23 commits) IB/iser: Add support for iser CM REQ additional info IB/iser: Return error to upper layers on EAGAIN registration failures IB/iser: Move informational messages from error to info level IB/iser: Add module version mlx4_core: Expose a few helpers to fill DMFS HW strucutures mlx4_core: Directly expose fields of DMFS HW rule control segment mlx4_core: Change a few DMFS fields names to match firmare spec mlx4: Match DMFS promiscuous field names to firmware spec mlx4_core: Move DMFS HW structs to common header file IB/mlx4: Set link type for RAW PACKET QPs in the QP context IB/mlx4: Disable VLAN stripping for RAW PACKET QPs mlx4_core: Reduce warning message for SRQ_LIMIT event to debug level RDMA/iwcm: Don't touch cmid after dropping reference IB/qib: Correct qib_verbs_register_sysfs() error handling IB/ipath: Correct ipath_verbs_register_sysfs() error handling RDMA/cxgb4: Fix SQ allocation when on-chip SQ is disabled SRPT: Fix odd use of WARN_ON() IPoIB: Fix ipoib_hard_header() return value RDMA: Rename random32() to prandom_u32() RDMA/cxgb3: Fix uninitialized variable ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/device.h104
-rw-r--r--include/linux/mlx4/srq.h2
2 files changed, 100 insertions, 6 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 53acaf64189f..a51b0134ce18 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -903,11 +903,12 @@ static inline int map_hw_to_sw_id(u16 header_id)
903} 903}
904 904
905enum mlx4_net_trans_promisc_mode { 905enum mlx4_net_trans_promisc_mode {
906 MLX4_FS_PROMISC_NONE = 0, 906 MLX4_FS_REGULAR = 1,
907 MLX4_FS_PROMISC_UPLINK, 907 MLX4_FS_ALL_DEFAULT,
908 /* For future use. Not implemented yet */ 908 MLX4_FS_MC_DEFAULT,
909 MLX4_FS_PROMISC_FUNCTION_PORT, 909 MLX4_FS_UC_SNIFFER,
910 MLX4_FS_PROMISC_ALL_MULTI, 910 MLX4_FS_MC_SNIFFER,
911 MLX4_FS_MODE_NUM, /* should be last */
911}; 912};
912 913
913struct mlx4_spec_eth { 914struct mlx4_spec_eth {
@@ -936,7 +937,7 @@ struct mlx4_spec_ipv4 {
936}; 937};
937 938
938struct mlx4_spec_ib { 939struct mlx4_spec_ib {
939 __be32 r_qpn; 940 __be32 l3_qpn;
940 __be32 qpn_msk; 941 __be32 qpn_msk;
941 u8 dst_gid[16]; 942 u8 dst_gid[16];
942 u8 dst_gid_msk[16]; 943 u8 dst_gid_msk[16];
@@ -969,6 +970,92 @@ struct mlx4_net_trans_rule {
969 u32 qpn; 970 u32 qpn;
970}; 971};
971 972
973struct mlx4_net_trans_rule_hw_ctrl {
974 __be16 prio;
975 u8 type;
976 u8 flags;
977 u8 rsvd1;
978 u8 funcid;
979 u8 vep;
980 u8 port;
981 __be32 qpn;
982 __be32 rsvd2;
983};
984
985struct mlx4_net_trans_rule_hw_ib {
986 u8 size;
987 u8 rsvd1;
988 __be16 id;
989 u32 rsvd2;
990 __be32 l3_qpn;
991 __be32 qpn_mask;
992 u8 dst_gid[16];
993 u8 dst_gid_msk[16];
994} __packed;
995
996struct mlx4_net_trans_rule_hw_eth {
997 u8 size;
998 u8 rsvd;
999 __be16 id;
1000 u8 rsvd1[6];
1001 u8 dst_mac[6];
1002 u16 rsvd2;
1003 u8 dst_mac_msk[6];
1004 u16 rsvd3;
1005 u8 src_mac[6];
1006 u16 rsvd4;
1007 u8 src_mac_msk[6];
1008 u8 rsvd5;
1009 u8 ether_type_enable;
1010 __be16 ether_type;
1011 __be16 vlan_tag_msk;
1012 __be16 vlan_tag;
1013} __packed;
1014
1015struct mlx4_net_trans_rule_hw_tcp_udp {
1016 u8 size;
1017 u8 rsvd;
1018 __be16 id;
1019 __be16 rsvd1[3];
1020 __be16 dst_port;
1021 __be16 rsvd2;
1022 __be16 dst_port_msk;
1023 __be16 rsvd3;
1024 __be16 src_port;
1025 __be16 rsvd4;
1026 __be16 src_port_msk;
1027} __packed;
1028
1029struct mlx4_net_trans_rule_hw_ipv4 {
1030 u8 size;
1031 u8 rsvd;
1032 __be16 id;
1033 __be32 rsvd1;
1034 __be32 dst_ip;
1035 __be32 dst_ip_msk;
1036 __be32 src_ip;
1037 __be32 src_ip_msk;
1038} __packed;
1039
1040struct _rule_hw {
1041 union {
1042 struct {
1043 u8 size;
1044 u8 rsvd;
1045 __be16 id;
1046 };
1047 struct mlx4_net_trans_rule_hw_eth eth;
1048 struct mlx4_net_trans_rule_hw_ib ib;
1049 struct mlx4_net_trans_rule_hw_ipv4 ipv4;
1050 struct mlx4_net_trans_rule_hw_tcp_udp tcp_udp;
1051 };
1052};
1053
1054/* translating DMFS verbs sniffer rule to the FW API would need two reg IDs */
1055struct mlx4_flow_handle {
1056 u64 reg_id[2];
1057};
1058
972int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, 1059int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn,
973 enum mlx4_net_trans_promisc_mode mode); 1060 enum mlx4_net_trans_promisc_mode mode);
974int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, 1061int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port,
@@ -1018,6 +1105,11 @@ void mlx4_counter_free(struct mlx4_dev *dev, u32 idx);
1018int mlx4_flow_attach(struct mlx4_dev *dev, 1105int mlx4_flow_attach(struct mlx4_dev *dev,
1019 struct mlx4_net_trans_rule *rule, u64 *reg_id); 1106 struct mlx4_net_trans_rule *rule, u64 *reg_id);
1020int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); 1107int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id);
1108int mlx4_map_sw_to_hw_steering_mode(struct mlx4_dev *dev,
1109 enum mlx4_net_trans_promisc_mode flow_type);
1110int mlx4_map_sw_to_hw_steering_id(struct mlx4_dev *dev,
1111 enum mlx4_net_trans_rule_id id);
1112int mlx4_hw_rule_sz(struct mlx4_dev *dev, enum mlx4_net_trans_rule_id id);
1021 1113
1022void mlx4_sync_pkey_table(struct mlx4_dev *dev, int slave, int port, 1114void mlx4_sync_pkey_table(struct mlx4_dev *dev, int slave, int port,
1023 int i, int val); 1115 int i, int val);
diff --git a/include/linux/mlx4/srq.h b/include/linux/mlx4/srq.h
index 799a0697a383..192e0f7784f2 100644
--- a/include/linux/mlx4/srq.h
+++ b/include/linux/mlx4/srq.h
@@ -39,4 +39,6 @@ struct mlx4_wqe_srq_next_seg {
39 u32 reserved2[3]; 39 u32 reserved2[3];
40}; 40};
41 41
42struct mlx4_srq *mlx4_srq_lookup(struct mlx4_dev *dev, u32 srqn);
43
42#endif /* MLX4_SRQ_H */ 44#endif /* MLX4_SRQ_H */