aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorHadar Hen Zion <hadarh@mellanox.com>2013-04-24 09:58:44 -0400
committerRoland Dreier <roland@purestorage.com>2013-04-24 20:51:28 -0400
commit3cd0e1789ad39c3b7ed006ce53a83328bdadbee8 (patch)
tree33ec91ea2c011974aca81e4c21b7c728aa9ccf60 /include/linux/mlx4
parent3528f69637723183f997573c7ec50ca869f219ba (diff)
mlx4_core: Move DMFS HW structs to common header file
Move flow steering HW structures to be on the public mlx4 include directory, as a pre-step for the mlx4 IB driver to use them too. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 811f91cf5e8c..9fbf416fa694 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -962,6 +962,85 @@ struct mlx4_net_trans_rule {
962 u32 qpn; 962 u32 qpn;
963}; 963};
964 964
965struct mlx4_net_trans_rule_hw_ctrl {
966 __be32 ctrl;
967 u8 rsvd1;
968 u8 funcid;
969 u8 vep;
970 u8 port;
971 __be32 qpn;
972 __be32 rsvd2;
973};
974
975struct mlx4_net_trans_rule_hw_ib {
976 u8 size;
977 u8 rsvd1;
978 __be16 id;
979 u32 rsvd2;
980 __be32 qpn;
981 __be32 qpn_mask;
982 u8 dst_gid[16];
983 u8 dst_gid_msk[16];
984} __packed;
985
986struct mlx4_net_trans_rule_hw_eth {
987 u8 size;
988 u8 rsvd;
989 __be16 id;
990 u8 rsvd1[6];
991 u8 dst_mac[6];
992 u16 rsvd2;
993 u8 dst_mac_msk[6];
994 u16 rsvd3;
995 u8 src_mac[6];
996 u16 rsvd4;
997 u8 src_mac_msk[6];
998 u8 rsvd5;
999 u8 ether_type_enable;
1000 __be16 ether_type;
1001 __be16 vlan_id_msk;
1002 __be16 vlan_id;
1003} __packed;
1004
1005struct mlx4_net_trans_rule_hw_tcp_udp {
1006 u8 size;
1007 u8 rsvd;
1008 __be16 id;
1009 __be16 rsvd1[3];
1010 __be16 dst_port;
1011 __be16 rsvd2;
1012 __be16 dst_port_msk;
1013 __be16 rsvd3;
1014 __be16 src_port;
1015 __be16 rsvd4;
1016 __be16 src_port_msk;
1017} __packed;
1018
1019struct mlx4_net_trans_rule_hw_ipv4 {
1020 u8 size;
1021 u8 rsvd;
1022 __be16 id;
1023 __be32 rsvd1;
1024 __be32 dst_ip;
1025 __be32 dst_ip_msk;
1026 __be32 src_ip;
1027 __be32 src_ip_msk;
1028} __packed;
1029
1030struct _rule_hw {
1031 union {
1032 struct {
1033 u8 size;
1034 u8 rsvd;
1035 __be16 id;
1036 };
1037 struct mlx4_net_trans_rule_hw_eth eth;
1038 struct mlx4_net_trans_rule_hw_ib ib;
1039 struct mlx4_net_trans_rule_hw_ipv4 ipv4;
1040 struct mlx4_net_trans_rule_hw_tcp_udp tcp_udp;
1041 };
1042};
1043
965int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, 1044int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn,
966 enum mlx4_net_trans_promisc_mode mode); 1045 enum mlx4_net_trans_promisc_mode mode);
967int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, 1046int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port,