diff options
author | Talat Batheesh <talatb@mellanox.com> | 2016-06-22 14:27:22 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-23 14:03:57 (GMT) |
commit | f336ae03149725bb5844166c7b04f7f65f17eec9 (patch) | |
tree | d9c54cb603ec5bb60d2f54a3fbc5e14e44407a73 /drivers/infiniband/core | |
parent | 61c78eea9516a921799c17b4c20558e2aa780fd3 (diff) | |
download | linux-f336ae03149725bb5844166c7b04f7f65f17eec9.tar.xz |
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: 03db3a2d81e6 ('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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 0409667..1a2984c 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -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); |