]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Reset RoCE VF gids when guest driver goes down
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 27 May 2014 06:26:38 +0000 (09:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 May 2014 23:57:52 +0000 (16:57 -0700)
commit77128f53dcac7d70f791d41e9f28d48e32eb9695
tree2f56a2490bdf14350b36dead3a521e087bbea09c
parente55c002adb48453439d3f6317618525746d76a8a
net/mlx4_core: Reset RoCE VF gids when guest driver goes down

Reset the GIDs assigned to a VF in the port RoCE GID table when
that guest goes down (either crashes or goes down cleanly).

As part of this fix, we refactor the RoCE gid table driver copy,
moving it to the mlx4_port_info structure (together with the MAC
and VLAN tables).

As with the MAC and VLAN tables, we now use a mutex per port
for the GID table so that modifying the driver copy and
modifying the firmware copy of a port GID table becomes an
atomic operation (thus avoiding driver-copy/FW-copy mismatches).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx4/port.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c