aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-25 14:17:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-25 14:17:34 -0500
commit4ba9920e5e9c0e16b5ed24292d45322907bb9035 (patch)
tree7d023baea59ed0886ded1f0b6d1c6385690b88f7 /include/linux/mlx4
parent82c477669a4665eb4e52030792051e0559ee2a36 (diff)
parent8b662fe70c68282f78482dc272df0c4f355e49f5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) BPF debugger and asm tool by Daniel Borkmann. 2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann. 3) Correct reciprocal_divide and update users, from Hannes Frederic Sowa and Daniel Borkmann. 4) Currently we only have a "set" operation for the hw timestamp socket ioctl, add a "get" operation to match. From Ben Hutchings. 5) Add better trace events for debugging driver datapath problems, also from Ben Hutchings. 6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we have a small send and a previous packet is already in the qdisc or device queue, defer until TX completion or we get more data. 7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko. 8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel Borkmann. 9) Share IP header compression code between Bluetooth and IEEE802154 layers, from Jukka Rissanen. 10) Fix ipv6 router reachability probing, from Jiri Benc. 11) Allow packets to be captured on macvtap devices, from Vlad Yasevich. 12) Support tunneling in GRO layer, from Jerry Chu. 13) Allow bonding to be configured fully using netlink, from Scott Feldman. 14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can already get the TCI. From Atzm Watanabe. 15) New "Heavy Hitter" qdisc, from Terry Lam. 16) Significantly improve the IPSEC support in pktgen, from Fan Du. 17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom Herbert. 18) Add Proportional Integral Enhanced packet scheduler, from Vijay Subramanian. 19) Allow openvswitch to mmap'd netlink, from Thomas Graf. 20) Key TCP metrics blobs also by source address, not just destination address. From Christoph Paasch. 21) Support 10G in generic phylib. From Andy Fleming. 22) Try to short-circuit GRO flow compares using device provided RX hash, if provided. From Tom Herbert. The wireless and netfilter folks have been busy little bees too. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits) net/cxgb4: Fix referencing freed adapter ipv6: reallocate addrconf router for ipv6 address when lo device up fib_frontend: fix possible NULL pointer dereference rtnetlink: remove IFLA_BOND_SLAVE definition rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info qlcnic: update version to 5.3.55 qlcnic: Enhance logic to calculate msix vectors. qlcnic: Refactor interrupt coalescing code for all adapters. qlcnic: Update poll controller code path qlcnic: Interrupt code cleanup qlcnic: Enhance Tx timeout debugging. qlcnic: Use bool for rx_mac_learn. bonding: fix u64 division rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC sfc: Use the correct maximum TX DMA ring size for SFC9100 Add Shradha Shah as the sfc driver maintainer. net/vxlan: Share RX skb de-marking and checksum checks with ovs tulip: cleanup by using ARRAY_SIZE() ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called net/cxgb4: Don't retrieve stats during recovery ...
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/cmd.h1
-rw-r--r--include/linux/mlx4/cq.h5
-rw-r--r--include/linux/mlx4/device.h39
-rw-r--r--include/linux/mlx4/qp.h6
4 files changed, 50 insertions, 1 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index ff36620f88a7..79a347238168 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -181,6 +181,7 @@ enum {
181 MLX4_SET_PORT_GID_TABLE = 0x5, 181 MLX4_SET_PORT_GID_TABLE = 0x5,
182 MLX4_SET_PORT_PRIO2TC = 0x8, 182 MLX4_SET_PORT_PRIO2TC = 0x8,
183 MLX4_SET_PORT_SCHEDULER = 0x9, 183 MLX4_SET_PORT_SCHEDULER = 0x9,
184 MLX4_SET_PORT_VXLAN = 0xB
184}; 185};
185 186
186enum { 187enum {
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h
index e1862997f933..e7ecc12a1163 100644
--- a/include/linux/mlx4/cq.h
+++ b/include/linux/mlx4/cq.h
@@ -87,7 +87,12 @@ struct mlx4_ts_cqe {
87} __packed; 87} __packed;
88 88
89enum { 89enum {
90 MLX4_CQE_L2_TUNNEL_IPOK = 1 << 31,
90 MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29, 91 MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29,
92 MLX4_CQE_L2_TUNNEL = 1 << 27,
93 MLX4_CQE_L2_TUNNEL_CSUM = 1 << 26,
94 MLX4_CQE_L2_TUNNEL_IPV4 = 1 << 25,
95
91 MLX4_CQE_QPN_MASK = 0xffffff, 96 MLX4_CQE_QPN_MASK = 0xffffff,
92 MLX4_CQE_VID_MASK = 0xfff, 97 MLX4_CQE_VID_MASK = 0xfff,
93}; 98};
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index ac5cb1d92487..5edd2c68274d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -119,6 +119,11 @@ static inline const char *mlx4_steering_mode_str(int steering_mode)
119} 119}
120 120
121enum { 121enum {
122 MLX4_TUNNEL_OFFLOAD_MODE_NONE,
123 MLX4_TUNNEL_OFFLOAD_MODE_VXLAN
124};
125
126enum {
122 MLX4_DEV_CAP_FLAG_RC = 1LL << 0, 127 MLX4_DEV_CAP_FLAG_RC = 1LL << 0,
123 MLX4_DEV_CAP_FLAG_UC = 1LL << 1, 128 MLX4_DEV_CAP_FLAG_UC = 1LL << 1,
124 MLX4_DEV_CAP_FLAG_UD = 1LL << 2, 129 MLX4_DEV_CAP_FLAG_UD = 1LL << 2,
@@ -161,7 +166,8 @@ enum {
161 MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6, 166 MLX4_DEV_CAP_FLAG2_VLAN_CONTROL = 1LL << 6,
162 MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7, 167 MLX4_DEV_CAP_FLAG2_FSM = 1LL << 7,
163 MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8, 168 MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8,
164 MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9 169 MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9,
170 MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10,
165}; 171};
166 172
167enum { 173enum {
@@ -455,6 +461,8 @@ struct mlx4_caps {
455 u32 userspace_caps; /* userspace must be aware of these */ 461 u32 userspace_caps; /* userspace must be aware of these */
456 u32 function_caps; /* VFs must be aware of these */ 462 u32 function_caps; /* VFs must be aware of these */
457 u16 hca_core_clock; 463 u16 hca_core_clock;
464 u64 phys_port_id[MLX4_MAX_PORTS + 1];
465 int tunnel_offload_mode;
458}; 466};
459 467
460struct mlx4_buf_list { 468struct mlx4_buf_list {
@@ -909,6 +917,7 @@ enum mlx4_net_trans_rule_id {
909 MLX4_NET_TRANS_RULE_ID_IPV4, 917 MLX4_NET_TRANS_RULE_ID_IPV4,
910 MLX4_NET_TRANS_RULE_ID_TCP, 918 MLX4_NET_TRANS_RULE_ID_TCP,
911 MLX4_NET_TRANS_RULE_ID_UDP, 919 MLX4_NET_TRANS_RULE_ID_UDP,
920 MLX4_NET_TRANS_RULE_ID_VXLAN,
912 MLX4_NET_TRANS_RULE_NUM, /* should be last */ 921 MLX4_NET_TRANS_RULE_NUM, /* should be last */
913}; 922};
914 923
@@ -966,6 +975,12 @@ struct mlx4_spec_ib {
966 u8 dst_gid_msk[16]; 975 u8 dst_gid_msk[16];
967}; 976};
968 977
978struct mlx4_spec_vxlan {
979 __be32 vni;
980 __be32 vni_mask;
981
982};
983
969struct mlx4_spec_list { 984struct mlx4_spec_list {
970 struct list_head list; 985 struct list_head list;
971 enum mlx4_net_trans_rule_id id; 986 enum mlx4_net_trans_rule_id id;
@@ -974,6 +989,7 @@ struct mlx4_spec_list {
974 struct mlx4_spec_ib ib; 989 struct mlx4_spec_ib ib;
975 struct mlx4_spec_ipv4 ipv4; 990 struct mlx4_spec_ipv4 ipv4;
976 struct mlx4_spec_tcp_udp tcp_udp; 991 struct mlx4_spec_tcp_udp tcp_udp;
992 struct mlx4_spec_vxlan vxlan;
977 }; 993 };
978}; 994};
979 995
@@ -1060,6 +1076,15 @@ struct mlx4_net_trans_rule_hw_ipv4 {
1060 __be32 src_ip_msk; 1076 __be32 src_ip_msk;
1061} __packed; 1077} __packed;
1062 1078
1079struct mlx4_net_trans_rule_hw_vxlan {
1080 u8 size;
1081 u8 rsvd;
1082 __be16 id;
1083 __be32 rsvd1;
1084 __be32 vni;
1085 __be32 vni_mask;
1086} __packed;
1087
1063struct _rule_hw { 1088struct _rule_hw {
1064 union { 1089 union {
1065 struct { 1090 struct {
@@ -1071,9 +1096,19 @@ struct _rule_hw {
1071 struct mlx4_net_trans_rule_hw_ib ib; 1096 struct mlx4_net_trans_rule_hw_ib ib;
1072 struct mlx4_net_trans_rule_hw_ipv4 ipv4; 1097 struct mlx4_net_trans_rule_hw_ipv4 ipv4;
1073 struct mlx4_net_trans_rule_hw_tcp_udp tcp_udp; 1098 struct mlx4_net_trans_rule_hw_tcp_udp tcp_udp;
1099 struct mlx4_net_trans_rule_hw_vxlan vxlan;
1074 }; 1100 };
1075}; 1101};
1076 1102
1103enum {
1104 VXLAN_STEER_BY_OUTER_MAC = 1 << 0,
1105 VXLAN_STEER_BY_OUTER_VLAN = 1 << 1,
1106 VXLAN_STEER_BY_VSID_VNI = 1 << 2,
1107 VXLAN_STEER_BY_INNER_MAC = 1 << 3,
1108 VXLAN_STEER_BY_INNER_VLAN = 1 << 4,
1109};
1110
1111
1077int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, 1112int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn,
1078 enum mlx4_net_trans_promisc_mode mode); 1113 enum mlx4_net_trans_promisc_mode mode);
1079int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, 1114int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port,
@@ -1096,6 +1131,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
1096int mlx4_SET_PORT_PRIO2TC(struct mlx4_dev *dev, u8 port, u8 *prio2tc); 1131int mlx4_SET_PORT_PRIO2TC(struct mlx4_dev *dev, u8 port, u8 *prio2tc);
1097int mlx4_SET_PORT_SCHEDULER(struct mlx4_dev *dev, u8 port, u8 *tc_tx_bw, 1132int mlx4_SET_PORT_SCHEDULER(struct mlx4_dev *dev, u8 port, u8 *tc_tx_bw,
1098 u8 *pg, u16 *ratelimit); 1133 u8 *pg, u16 *ratelimit);
1134int mlx4_SET_PORT_VXLAN(struct mlx4_dev *dev, u8 port, u8 steering);
1099int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx); 1135int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx);
1100int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); 1136int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
1101int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); 1137int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
@@ -1115,6 +1151,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap,
1115 int *vector); 1151 int *vector);
1116void mlx4_release_eq(struct mlx4_dev *dev, int vec); 1152void mlx4_release_eq(struct mlx4_dev *dev, int vec);
1117 1153
1154int mlx4_get_phys_port_id(struct mlx4_dev *dev);
1118int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); 1155int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port);
1119int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); 1156int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port);
1120 1157
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 6d351473c292..59f8ba84568b 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -109,6 +109,10 @@ enum {
109 MLX4_RSS_TCP_IPV4 = 1 << 4, 109 MLX4_RSS_TCP_IPV4 = 1 << 4,
110 MLX4_RSS_IPV4 = 1 << 5, 110 MLX4_RSS_IPV4 = 1 << 5,
111 111
112 MLX4_RSS_BY_OUTER_HEADERS = 0 << 6,
113 MLX4_RSS_BY_INNER_HEADERS = 2 << 6,
114 MLX4_RSS_BY_INNER_HEADERS_IPONLY = 3 << 6,
115
112 /* offset of mlx4_rss_context within mlx4_qp_context.pri_path */ 116 /* offset of mlx4_rss_context within mlx4_qp_context.pri_path */
113 MLX4_RSS_OFFSET_IN_QPC_PRI_PATH = 0x24, 117 MLX4_RSS_OFFSET_IN_QPC_PRI_PATH = 0x24,
114 /* offset of being RSS indirection QP within mlx4_qp_context.flags */ 118 /* offset of being RSS indirection QP within mlx4_qp_context.flags */
@@ -252,6 +256,8 @@ enum { /* param3 */
252 256
253enum { 257enum {
254 MLX4_WQE_CTRL_NEC = 1 << 29, 258 MLX4_WQE_CTRL_NEC = 1 << 29,
259 MLX4_WQE_CTRL_IIP = 1 << 28,
260 MLX4_WQE_CTRL_ILP = 1 << 27,
255 MLX4_WQE_CTRL_FENCE = 1 << 6, 261 MLX4_WQE_CTRL_FENCE = 1 << 6,
256 MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2, 262 MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2,
257 MLX4_WQE_CTRL_SOLICITED = 1 << 1, 263 MLX4_WQE_CTRL_SOLICITED = 1 << 1,