Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f336ae03 authored by Talat Batheesh's avatar Talat Batheesh Committed by Doug Ledford
Browse files

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: 03db3a2d ('IB/core: Add RoCE GID table management')
Signed-off-by: default avatarTalat Batheesh <talatb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 61c78eea
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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++)
		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;

	write_unlock_irq(&table->rwlock);