IB/core: Fix no default GIDs when netdevice reregisters
Currently, when the netdevice returned by get_netdev is unregistered,
we delete all GIDs (including the default GIDs) and reset their
attributes. Therefore, when we re-register it, no default GIDs
will be assigned (as their "default GID") attribute will be reset.
Fixing this by keeping "default GID" attribute.
Fixes: 03db3a2d81
('IB/core: Add RoCE GID table management')
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
61c78eea95
commit
f336ae0314
|
@ -411,7 +411,9 @@ int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,
|
||||||
|
|
||||||
for (ix = 0; ix < table->sz; ix++)
|
for (ix = 0; ix < table->sz; ix++)
|
||||||
if (table->data_vec[ix].attr.ndev == ndev)
|
if (table->data_vec[ix].attr.ndev == ndev)
|
||||||
if (!del_gid(ib_dev, port, table, ix, false))
|
if (!del_gid(ib_dev, port, table, ix,
|
||||||
|
!!(table->data_vec[ix].props &
|
||||||
|
GID_TABLE_ENTRY_DEFAULT)))
|
||||||
deleted = true;
|
deleted = true;
|
||||||
|
|
||||||
write_unlock_irq(&table->rwlock);
|
write_unlock_irq(&table->rwlock);
|
||||||
|
|
Loading…
Reference in New Issue