Re: [PATCH rdma-rc] RDMA/core: Add GIDs while changing MAC addr only for registered ndev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 19, 2018 at 09:58:24AM +0200, Leon Romanovsky wrote:
> From: Parav Pandit <parav@xxxxxxxxxxxx>
> 
> 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 bonding device is used and when 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 such scenario,
> GID entry 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 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: 03db3a2d81e6 ("IB/core: Add RoCE GID table management")
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> Reviewed-by: Mark Bloch <markb@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/core/roce_gid_mgmt.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Applied to for-rc

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux