Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-17 Thread Michael Wang
On 12/16/2015 07:16 PM, Jason Gunthorpe wrote: > On Wed, Dec 16, 2015 at 11:26:39AM +0100, Michael Wang wrote: [snip] >> >> I've rechecked the ib_init_ah_from_path() again, and found it >> still set IB_AH_GRH when the GID cache missing, but with: > > How do you mean? > > ah_attr

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-16 Thread Jason Gunthorpe
On Wed, Dec 16, 2015 at 11:26:39AM +0100, Michael Wang wrote: > > On 12/15/2015 06:30 PM, Jason Gunthorpe wrote: > > On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote: > >> The hop_limit is only suggest that the package allowed to be > >> routed, not have to, correct? > > > > If the ho

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-16 Thread Michael Wang
On 12/15/2015 06:30 PM, Jason Gunthorpe wrote: > On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote: >> The hop_limit is only suggest that the package allowed to be >> routed, not have to, correct? > > If the hop limit is >= 2 (?) then the GRH is mandatory. The > SM will return this inf

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-15 Thread ira.weiny
On Tue, Dec 15, 2015 at 10:30:22AM -0700, Jason Gunthorpe wrote: > On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote: > > The hop_limit is only suggest that the package allowed to be > > routed, not have to, correct? > > If the hop limit is >= 2 (?) then the GRH is mandatory. Yes >= 2.

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-15 Thread Jason Gunthorpe
On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote: > The hop_limit is only suggest that the package allowed to be > routed, not have to, correct? If the hop limit is >= 2 (?) then the GRH is mandatory. The SM will return this information in the PathRecord if it determines a GRH is requi

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-15 Thread Michael Wang
On 12/15/2015 04:52 PM, Nicholas Krause wrote: > This adds a needed error path in the function, cm_init_av_by_path > after the call to ib_init_ah_from_path in order to avoid incorrectly > accessing the path pointer of structure type ib_sa_path_rec if this > function call fails to complete its int