Message ID | 1456851143-138332-11-git-send-email-eli@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Mar 01, 2016 at 06:52:23PM +0200, Eli Cohen wrote: > From: Or Gerlitz <ogerlitz@mellanox.com> > > 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> Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 03/01/2016 12:38 PM, Jason Gunthorpe wrote: > On Tue, Mar 01, 2016 at 06:52:23PM +0200, Eli Cohen wrote: >> From: Or Gerlitz <ogerlitz@mellanox.com> >> >> 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> > > Jason > I've pulled patch 10/10 out of this series and applied it to my 4.5-rc branch as it's a valid fix for code already in the kernel and need not be part of this other patch series.
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index 833d2a99a311..6145ded45293 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -1076,7 +1076,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;