IB/mlx4: Always use the correct port for mirrored multicast attachments
authorMoni Shoua <monis@mellanox.com>
Sun, 8 Feb 2015 09:49:33 +0000 (11:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Feb 2015 22:03:53 +0000 (14:03 -0800)
commit824c25c1abe70a527646056f6911d181facde9cc
tree7d4ea49587626baab5d863717c98504e5cc698e2
parent92e584fe443995bbb84069a4d13ea8ebedb5c5c8
IB/mlx4: Always use the correct port for mirrored multicast attachments

When attaching a QP to a multicast address in bonded mode, there was an
assumption that the port of the QP must be #1. This assumption isn't the
case under the flow which enables maximal usage of the physical ports.

Fix it by always checking the port of the original flow and create the
mirrored flow on the other port.

Fixes: c6215745b66a ('IB/mlx4: Load balance ports in port aggregation mode')
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>
drivers/infiniband/hw/mlx4/main.c