projects/linux·commit 11d8d645

IB/core: Use GRH when the path hop-limit > 0

11d8d645 · Or Gerlitz <[email protected]> · 2016-03-01 18:52:23 +02:00

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 <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
Commit
11d8d645343efba0c975aefe7c2cf3b33c836c75
Parents
3d943c9d

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/infiniband/core/sa_query.cmodified+1−1View file

drivers/infiniband/core/sa_query.c

View file
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index f334090..1e37f35 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -1071,7 +1071,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
}
}
- if (rec->hop_limit > 1 || use_roce) {
+ if (rec->hop_limit > 0 || use_roce) {
ah_attr->ah_flags = IB_AH_GRH;
ah_attr->grh.dgid = rec->dgid;