提交 11d8d645 编写于 作者: O Or Gerlitz 提交者: Doug Ledford

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

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: 6d969a47 ('IB/sa: Add ib_init_ah_from_path()')
Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 3d943c9d
...@@ -1071,7 +1071,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num, ...@@ -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->ah_flags = IB_AH_GRH;
ah_attr->grh.dgid = rec->dgid; ah_attr->grh.dgid = rec->dgid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册