]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Fix false search of the IB_SA_WELL_KNOWN_GUID
authorEli Cohen <eli@mellanox.com>
Wed, 22 Jun 2016 14:27:24 +0000 (17:27 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 23 Jun 2016 14:03:57 +0000 (10:03 -0400)
commitfa0c1991c72d0983c06b917156d0a6f8c66f0004
treeafc74a8cdf5203613915ed3d85d3db90c5cdec91
parent51151210c2b1c000200b8c2bdb0c600bc8b27fab
IB/core: Fix false search of the IB_SA_WELL_KNOWN_GUID

When virtualziation is supported, VFs may send SA MADs to a GID formed
by the concatenation of the subnet prefix with the
IB_SA_WELL_KNOWN_GUID. When a response is required, the current code
will search the local HCA's port for the received GID to figure out the
GID index of the entry containing this GID. However, since this is not a
real GID it will not be found and error will be printed.

We change the logic to check if the destination GID is this special GID
and avoid lookup in this case and use GID index 0.

Fixes: 901f9141fd80 ('IB/core: Support accessing SA in virtualized environment')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c