aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.com>2015-02-03 09:48:32 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 19:14:24 -0500
commit59e14e325066be49b49b6c2503337c69a9ee29fc (patch)
tree4969e69e3ea30ed3f26a51b1729e715af1f69ddf /include/linux/mlx4
parent69e6113343cfe983511904ffca0d7a1466460b67 (diff)
net/mlx4_core: Port aggregation low level interface
Implement the hardware interface required for port aggregation. 1. Disable RX port check on receive - don't perform a validity check that matches to QP's port and the port where the packet is received. 2. Virtual to physical port remap - configure virtual to physical port mapping. Port remap capability for virtual functions. Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/cmd.h7
-rw-r--r--include/linux/mlx4/device.h10
-rw-r--r--include/linux/mlx4/qp.h1
3 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index ae95adc78509..7b6d4e9ff603 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -71,6 +71,7 @@ enum {
71 71
72 /*master notify fw on finish for slave's flr*/ 72 /*master notify fw on finish for slave's flr*/
73 MLX4_CMD_INFORM_FLR_DONE = 0x5b, 73 MLX4_CMD_INFORM_FLR_DONE = 0x5b,
74 MLX4_CMD_VIRT_PORT_MAP = 0x5c,
74 MLX4_CMD_GET_OP_REQ = 0x59, 75 MLX4_CMD_GET_OP_REQ = 0x59,
75 76
76 /* TPT commands */ 77 /* TPT commands */
@@ -171,6 +172,12 @@ enum {
171}; 172};
172 173
173enum { 174enum {
175 /* virtual to physical port mapping opcode modifiers */
176 MLX4_GET_PORT_VIRT2PHY = 0x0,
177 MLX4_SET_PORT_VIRT2PHY = 0x1,
178};
179
180enum {
174 MLX4_MAILBOX_SIZE = 4096, 181 MLX4_MAILBOX_SIZE = 4096,
175 MLX4_ACCESS_MEM_ALIGN = 256, 182 MLX4_ACCESS_MEM_ALIGN = 256,
176}; 183};
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index c95d659a39f2..d9afd99dde39 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -201,7 +201,8 @@ enum {
201 MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 17, 201 MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 17,
202 MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, 202 MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18,
203 MLX4_DEV_CAP_FLAG2_FS_A0 = 1LL << 19, 203 MLX4_DEV_CAP_FLAG2_FS_A0 = 1LL << 19,
204 MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 20 204 MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 20,
205 MLX4_DEV_CAP_FLAG2_PORT_REMAP = 1LL << 21
205}; 206};
206 207
207enum { 208enum {
@@ -253,9 +254,14 @@ enum {
253 MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, 254 MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9,
254 MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, 255 MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10,
255 MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, 256 MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11,
257 MLX4_BMME_FLAG_PORT_REMAP = 1 << 24,
256 MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28, 258 MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28,
257}; 259};
258 260
261enum {
262 MLX4_FLAG_PORT_REMAP = MLX4_BMME_FLAG_PORT_REMAP
263};
264
259enum mlx4_event { 265enum mlx4_event {
260 MLX4_EVENT_TYPE_COMP = 0x00, 266 MLX4_EVENT_TYPE_COMP = 0x00,
261 MLX4_EVENT_TYPE_PATH_MIG = 0x01, 267 MLX4_EVENT_TYPE_PATH_MIG = 0x01,
@@ -1378,6 +1384,8 @@ int mlx4_phys_to_slave_port(struct mlx4_dev *dev, int slave, int port);
1378int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port); 1384int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port);
1379 1385
1380int mlx4_config_vxlan_port(struct mlx4_dev *dev, __be16 udp_port); 1386int mlx4_config_vxlan_port(struct mlx4_dev *dev, __be16 udp_port);
1387int mlx4_disable_rx_port_check(struct mlx4_dev *dev, bool dis);
1388int mlx4_virt2phy_port_map(struct mlx4_dev *dev, u32 port1, u32 port2);
1381int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); 1389int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port);
1382int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); 1390int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port);
1383int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, 1391int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port,
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 467ccdf94c98..2bbc62aa818a 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -96,6 +96,7 @@ enum {
96 MLX4_QP_BIT_RRE = 1 << 15, 96 MLX4_QP_BIT_RRE = 1 << 15,
97 MLX4_QP_BIT_RWE = 1 << 14, 97 MLX4_QP_BIT_RWE = 1 << 14,
98 MLX4_QP_BIT_RAE = 1 << 13, 98 MLX4_QP_BIT_RAE = 1 << 13,
99 MLX4_QP_BIT_FPP = 1 << 3,
99 MLX4_QP_BIT_RIC = 1 << 4, 100 MLX4_QP_BIT_RIC = 1 << 4,
100}; 101};
101 102