IB/core: don't search the GID table twice
authorMatan Barak <matanb@mellanox.com>
Wed, 28 Oct 2015 14:52:41 +0000 (16:52 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 23 Dec 2015 15:32:06 +0000 (10:32 -0500)
commitcee3c4d0c56876f46f4584385603adb30a7cacf7
tree19506443c5e8265f92f8a3cb73077e61c6deedf0
parent9c584f04959620e587b3b3d358076dab48a8893c
IB/core: don't search the GID table twice

Previously, we've searched the GID table twice: first when we searched
the table for a GID matching the proposed new one, and second when we
didn't find a match, we searched again for an empty GID slot in the
table.  Instead, search the table once noting the first empty slot as
we search for our target GID.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cache.c