Message ID | 20191020065427.8772-4-leon@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Let IB core distribute cache update events | expand |
On Sun, Oct 20, 2019 at 09:54:27AM +0300, Leon Romanovsky wrote: > From: Parav Pandit <parav@mellanox.com> > > When IB device is undergoing unregistration, GID cache is cleaned up > after all clients are unregistered in below flow. > > __ib_unregister_device() > disable_device(); > ib_cache_cleanup_one() > gid_table_cleanup_one() > cleanup_gid_table_port() > > There is no use of generating a GID change event at such stage, where > there is no active client of the device and device is unregistered > state. > > Signed-off-by: Parav Pandit <parav@mellanox.com> > Reviewed-by: Daniel Jurgens <danielj@mellanox.com> > Reviewed-by: Leon Romanovsky <leonro@mellanox.com> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/core/cache.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) Yep, this is a consequence of the recent cleanups in device. Applied to for-next Jason
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index b626ca682004..53d8313e8309 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -818,22 +818,16 @@ static void cleanup_gid_table_port(struct ib_device *ib_dev, u8 port, struct ib_gid_table *table) { int i; - bool deleted = false; if (!table) return; mutex_lock(&table->lock); for (i = 0; i < table->sz; ++i) { - if (is_gid_entry_valid(table->data_vec[i])) { + if (is_gid_entry_valid(table->data_vec[i])) del_gid(ib_dev, port, table, i); - deleted = true; - } } mutex_unlock(&table->lock); - - if (deleted) - dispatch_gid_change_event(ib_dev, port); } void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,