Commit bccb84f1 authored by Moni Shoua's avatar Moni Shoua Committed by Roland Dreier

IB/mlx4: Get upper dev addresses as RoCE GIDs when port comes up

When a RoCE port becomes active and the netdev of the port has upper
device (e.g bond/team), GIDs derived from the upper dev should appear
in the port's RoCE GID table.
Signed-off-by: default avatarMoni Shoua <monis@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 655b2aae
...@@ -1802,14 +1802,23 @@ static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, ...@@ -1802,14 +1802,23 @@ static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev,
port_state = (netif_running(curr_netdev) && netif_carrier_ok(curr_netdev)) ? port_state = (netif_running(curr_netdev) && netif_carrier_ok(curr_netdev)) ?
IB_PORT_ACTIVE : IB_PORT_DOWN; IB_PORT_ACTIVE : IB_PORT_DOWN;
mlx4_ib_set_default_gid(ibdev, curr_netdev, port); mlx4_ib_set_default_gid(ibdev, curr_netdev, port);
/* if using bonding/team and a slave port is down, we if (curr_master) {
* don't the bond IP based gids in the table since /* if using bonding/team and a slave port is down, we
* flows that select port by gid may get the down port. * don't want the bond IP based gids in the table since
*/ * flows that select port by gid may get the down port.
if (curr_master && (port_state == IB_PORT_DOWN)) { */
reset_gid_table(ibdev, port); if (port_state == IB_PORT_DOWN) {
mlx4_ib_set_default_gid(ibdev, reset_gid_table(ibdev, port);
curr_netdev, port); mlx4_ib_set_default_gid(ibdev,
curr_netdev,
port);
} else {
/* gids from the upper dev (bond/team)
* should appear in port's gid table
*/
mlx4_ib_get_dev_addr(curr_master,
ibdev, port);
}
} }
/* if bonding is used it is possible that we add it to /* if bonding is used it is possible that we add it to
* masters only after IP address is assigned to the * masters only after IP address is assigned to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment