OSDN Git Service

IB/core: Refactor to avoid unnecessary check on GID lookup miss
authorParav Pandit <parav@mellanox.com>
Tue, 14 Nov 2017 12:52:05 +0000 (14:52 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Dec 2017 22:37:08 +0000 (15:37 -0700)
commit151ed9d7009769207cd71065f64f58e7d73add65
tree0a28daeba9b9f4ebc82f3349367b1c38d1c3b349
parentb0dd0d335364a2a748a63413ca4812c9398bf2ae
IB/core: Refactor to avoid unnecessary check on GID lookup miss

Currently on every gid entry comparison miss found variable is checked;
which is not needed as those two comparison fail already indicate that
GID is not found yet.
So refactor to avoid such check and copy the GID index when found.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cache.c