diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-08-03 08:40:41 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-09-30 20:33:31 -0700 |
commit | e2c76824ca16a3e8443cc7b26abcb21af7c27b10 (patch) | |
tree | 41d39111862e2e6faecb9ab356198e985c9bfe7d /drivers/net/ethernet/mellanox/mlx4/fw.c | |
parent | 1ffeb2eb8be9936e9dc1f9af2d5f4c14d69a0d36 (diff) | |
download | blackbird-op-linux-e2c76824ca16a3e8443cc7b26abcb21af7c27b10.tar.gz blackbird-op-linux-e2c76824ca16a3e8443cc7b26abcb21af7c27b10.zip |
mlx4_core: Add proxy and tunnel QPs to the reserved QP area
In addition, pass the proxy and tunnel QP numbers to slaves so the
driver can perform special QP paravirtualization.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/fw.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index c69648487321..35be90178bef 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -184,6 +184,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x28 #define QUERY_FUNC_CAP_MAX_EQ_OFFSET 0x2c #define QUERY_FUNC_CAP_RESERVED_EQ_OFFSET 0X30 +#define QUERY_FUNC_CAP_BASE_TUNNEL_QPN_OFFSET 0x44 +#define QUERY_FUNC_CAP_BASE_PROXY_QPN_OFFSET 0x48 #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 @@ -247,6 +249,12 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, size = dev->caps.num_mgms + dev->caps.num_amgms; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); + size = dev->caps.base_tunnel_sqpn + 8 * slave; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_BASE_TUNNEL_QPN_OFFSET); + + size = dev->caps.sqp_start + 8 * slave; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_BASE_PROXY_QPN_OFFSET); + } else err = -EINVAL; @@ -312,6 +320,12 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev *dev, struct mlx4_func_cap *func_cap) MLX4_GET(size, outbox, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); func_cap->mcg_quota = size & 0xFFFFFF; + MLX4_GET(size, outbox, QUERY_FUNC_CAP_BASE_TUNNEL_QPN_OFFSET); + func_cap->base_tunnel_qpn = size & 0xFFFFFF; + + MLX4_GET(size, outbox, QUERY_FUNC_CAP_BASE_PROXY_QPN_OFFSET); + func_cap->base_proxy_qpn = size & 0xFFFFFF; + for (i = 1; i <= func_cap->num_ports; ++i) { err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 1, MLX4_CMD_QUERY_FUNC_CAP, |