]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9d2f9e69e3dbf3b833731ef2fcae008e023daf26
tree0a28daeba9b9f4ebc82f3349367b1c38d1c3b349
parent9a6ef6c133f480840fc10125c35bbcf13b946d8e
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