IB/core: Use GRH when the path hop-limit > 0
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 1 Mar 2016 16:52:23 +0000 (18:52 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 1 Apr 2016 00:54:36 +0000 (01:54 +0100)
commita1663179bb1707a285258870914536a64cc1c90a
treea76c49871a5082a0188d1435d8d7e6f3009f3e8a
parent32592edb940df95dce3b8fcc62fbaf4c1e5522bf
IB/core: Use GRH when the path hop-limit > 0

commit 11d8d645343efba0c975aefe7c2cf3b33c836c75 upstream.

According to IBTA spec v1.3 section 12.7.19, QPs should use GRH when
the path returned by the SA has hop-limit > 0. Currently, we do that
only for the > 1 case, fix that.

Fixes: 6d969a471ba1 ('IB/sa: Add ib_init_ah_from_path()')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/infiniband/core/sa_query.c