]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cm: Refactor to avoid setting path record software only fields
authorParav Pandit <parav@mellanox.com>
Tue, 14 Nov 2017 12:52:18 +0000 (14:52 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Dec 2017 22:37:12 +0000 (15:37 -0700)
commit2cd71882c48b6f160bbe4683fc8c650a8c9e8cd5
treee449a6ecd48fc03365b42b62d8cc5e3720d987ac
parent1033d766392af0a5e3b3ff1ea8b7d1e479c2349e
IB/cm: Refactor to avoid setting path record software only fields

When path ah_attr initialization from path record
fails, ib_cm_send_rej() uses av.ah_attr fields to send out reject
message. In such cases initialization of path record software fields
is not needed. Code is simplified for same.

Additionally in current code in cm_req_handler, when ib_get_cached_gid
fails for a given sgid_index of the GID of the GRH of the incoming CM MAD,
error code 12 is sent. This error code refers to primary GID in incoming
CM REQ and not for the GID in in MAD packet.
Therefore code is refactored to send code 5 (unsupported request) for such
error.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c