aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-02-04 16:14:29 -0800
committerDavid S. Miller <davem@davemloft.net>2015-02-04 16:14:29 -0800
commitce388fff3aa446d5a4895f8a757345f53daa200a (patch)
tree93990685d6fdba0784d68bf5ca0dbf523c930bb4 /drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
parentMerge branch 'tipc-next' (diff)
parentIB/mlx4: Load balance ports in port aggregation mode (diff)
downloadlinux-dev-ce388fff3aa446d5a4895f8a757345f53daa200a.tar.xz
linux-dev-ce388fff3aa446d5a4895f8a757345f53daa200a.zip
Merge branch 'mlx4-next'
Or Gerlitz says: ==================== Add HA and LAG support to mlx4 RoCE and SRIOV services This series takes advanges of bonding mlx4 Ethernet devices to support a model of High-Availability and Link Aggregation for more environments. The mlx4 driver reacts on netdev events generated by bonding when slave state changes happen by programming a HW V2P (Virt-to-Phys) port table. Bonding was extended to expose these state changes through netdev events. When an mlx4 interface such as the mlx4 IB/RoCE driver is subject to this policy, QPs are created over virtual ports which are mapped to one of the two physical ports. When a failure happens, the re-programming of the V2P table allows traffic to keep flowing. The mlx4 Ethernet driver interfaces are not subject to this policy and act as usual. A 2nd use-case for this model would be to add HA and Link Aggregation support to single ported mlx4 Ethernet VFs. In this case, the PF Ethernet intrfaces are bonded, all the VFs see single port devices (which is supported already today), and VF QPs are subject to V2P. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 79feeb6b0d87..c5f3dfca226b 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2944,6 +2944,9 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
qp_type = (be32_to_cpu(qp_ctx->flags) >> 16) & 0xff;
optpar = be32_to_cpu(*(__be32 *) inbox->buf);
+ if (slave != mlx4_master_func_num(dev))
+ qp_ctx->params2 &= ~MLX4_QP_BIT_FPP;
+
switch (qp_type) {
case MLX4_QP_ST_RC:
case MLX4_QP_ST_XRC: