linux-stable/drivers/infiniband
Parav Pandit d52ef88a9f RDMA/core: Add GIDs while changing MAC addr only for registered ndev
Currently when MAC address is changed, regardless of the netdev reg_state,
GID entries are removed and added to reflect the new MAC address and new
default GID entries.

When a bonding device is used and the underlying PCI device is removed
several netdevice events are generated. Two events of the interest are
CHANGEADDR and UNREGISTER event on lower(slave) netdevice of the bond
netdevice.

Sometimes CHANGEADDR event is generated when netdev state is
UNREGISTERING (after UNREGISTER event is generated). In this scenario, GID
entries for default GIDs are added and never deleted because GID entries
are deleted only when netdev state is < UNREGISTERED.

This leads to non zero reference count on the netdevice. Due to this, PCI
device unbind operation is getting stuck.

To avoid it, when changing mac address, add GID entries only if netdev is
in REGISTERED state.

Fixes: 03db3a2d81 ("IB/core: Add RoCE GID table management")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-11-21 14:09:40 -07:00
..
core RDMA/core: Add GIDs while changing MAC addr only for registered ndev 2018-11-21 14:09:40 -07:00
hw RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR 2018-11-21 14:03:00 -07:00
sw RDMA/drivers: Use core provided API for registering device attributes 2018-10-17 03:45:01 -06:00
ulp First merge window pull request 2018-10-26 07:38:19 -07:00
Kconfig RDMA: Fix building with CONFIG_MMU=n 2018-10-03 16:01:03 -06:00
Makefile